Compadre  1.5.7
Public Attributes | List of all members
Compadre::ParallelManager Class Reference

Parallel Manager. More...

Detailed Description

Parallel Manager.

This class sets and manages thread / teams levels, scratch memory sizes, and kernel executions. ex: Compadre::ConvertLayoutLeftToRight clr; Compadre::ParallelManager pm; // no tag specified pm.CallFunctorWithTeamThreads(clr, 100, "MyFunctorName"); // some tag specified pm.CallFunctorWithTeamThreads<DefaultTag>(clr, 100);

Definition at line 21 of file Compadre_ParallelManager.hpp.

#include <Compadre_ParallelManager.hpp>

Public Member Functions

Instantiation / Destruction
 ParallelManager ()
 
Accessors

Retrieve member variables through public member functions

Kokkos::TeamPolicy< device_execution_spaceTeamPolicyThreadsAndVectors (const global_index_type batch_size, const int threads_per_team=-1, const int vector_lanes_per_thread=-1) const
 Creates a team policy for a parallel_for parallel_for will break out over loops over teams with each vector lane executing code be default. More...
 
template<typename Tag , class C >
void CallFunctorWithTeamThreadsAndVectors (C functor, const global_index_type batch_size, const int threads_per_team=-1, const int vector_lanes_per_thread=-1) const
 Calls a parallel_for parallel_for will break out over loops over teams with each vector lane executing code be default. More...
 
template<class C >
void CallFunctorWithTeamThreadsAndVectors (C functor, const global_index_type batch_size, const int threads_per_team=-1, const int vector_lanes_per_thread=-1, std::string functor_name=typeid(C).name()) const
 Calls a parallel_for parallel_for will break out over loops over teams with each vector lane executing code be default. More...
 
template<typename Tag , class C >
void CallFunctorWithTeamThreads (C functor, const global_index_type batch_size) const
 Calls a parallel_for parallel_for will break out over loops over teams with each thread executing code be default. More...
 
template<class C >
void CallFunctorWithTeamThreads (C functor, const global_index_type batch_size, std::string functor_name=typeid(C).name()) const
 Calls a parallel_for parallel_for will break out over loops over teams with each thread executing code be default. More...
 
KOKKOS_INLINE_FUNCTION int getTeamScratchLevel (const int level) const
 
KOKKOS_INLINE_FUNCTION int getThreadScratchLevel (const int level) const
 
KOKKOS_INLINE_FUNCTION int getTeamScratchSize (const int level) const
 
KOKKOS_INLINE_FUNCTION int getThreadScratchSize (const int level) const
 
Modifiers

Changed member variables through public member functions

void setTeamScratchLevel (const int level, const int value)
 
void setThreadScratchLevel (const int level, const int value)
 
void setTeamScratchSize (const int level, const int value)
 
void setThreadScratchSize (const int level, const int value)
 
void clearScratchSizes ()
 

Public Attributes

int _scratch_team_level_a
 lowest level memory for Kokkos::parallel_for for team access memory More...
 
int _team_scratch_size_a
 
int _scratch_thread_level_a
 higher (slower) level memory for Kokkos::parallel_for for team access memory More...
 
int _thread_scratch_size_a
 
int _scratch_team_level_b
 lowest level memory for Kokkos::parallel_for for thread access memory More...
 
int _team_scratch_size_b
 
int _scratch_thread_level_b
 higher (slower) level memory for Kokkos::parallel_for for thread access memory More...
 
int _thread_scratch_size_b
 
int _default_threads
 largest team size More...
 
int _default_vector_lanes
 

Constructor & Destructor Documentation

◆ ParallelManager()

Compadre::ParallelManager::ParallelManager ( )
inline

Definition at line 70 of file Compadre_ParallelManager.hpp.

Member Function Documentation

◆ CallFunctorWithTeamThreads() [1/2]

template<typename Tag , class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreads ( functor,
const global_index_type  batch_size 
) const
inline

Calls a parallel_for parallel_for will break out over loops over teams with each thread executing code be default.

Definition at line 550 of file Compadre_ParallelManager.hpp.

◆ CallFunctorWithTeamThreads() [2/2]

template<class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreads ( functor,
const global_index_type  batch_size,
std::string  functor_name = typeid(C).name() 
) const
inline

Calls a parallel_for parallel_for will break out over loops over teams with each thread executing code be default.

Definition at line 558 of file Compadre_ParallelManager.hpp.

◆ CallFunctorWithTeamThreadsAndVectors() [1/2]

template<typename Tag , class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreadsAndVectors ( functor,
const global_index_type  batch_size,
const int  threads_per_team = -1,
const int  vector_lanes_per_thread = -1 
) const
inline

Calls a parallel_for parallel_for will break out over loops over teams with each vector lane executing code be default.

Definition at line 230 of file Compadre_ParallelManager.hpp.

◆ CallFunctorWithTeamThreadsAndVectors() [2/2]

template<class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreadsAndVectors ( functor,
const global_index_type  batch_size,
const int  threads_per_team = -1,
const int  vector_lanes_per_thread = -1,
std::string  functor_name = typeid(C).name() 
) const
inline

Calls a parallel_for parallel_for will break out over loops over teams with each vector lane executing code be default.

Definition at line 391 of file Compadre_ParallelManager.hpp.

◆ clearScratchSizes()

void Compadre::ParallelManager::clearScratchSizes ( )
inline

Definition at line 639 of file Compadre_ParallelManager.hpp.

◆ getTeamScratchLevel()

KOKKOS_INLINE_FUNCTION int Compadre::ParallelManager::getTeamScratchLevel ( const int  level) const
inline

Definition at line 564 of file Compadre_ParallelManager.hpp.

◆ getTeamScratchSize()

KOKKOS_INLINE_FUNCTION int Compadre::ParallelManager::getTeamScratchSize ( const int  level) const
inline

Definition at line 582 of file Compadre_ParallelManager.hpp.

◆ getThreadScratchLevel()

KOKKOS_INLINE_FUNCTION int Compadre::ParallelManager::getThreadScratchLevel ( const int  level) const
inline

Definition at line 573 of file Compadre_ParallelManager.hpp.

◆ getThreadScratchSize()

KOKKOS_INLINE_FUNCTION int Compadre::ParallelManager::getThreadScratchSize ( const int  level) const
inline

Definition at line 591 of file Compadre_ParallelManager.hpp.

◆ setTeamScratchLevel()

void Compadre::ParallelManager::setTeamScratchLevel ( const int  level,
const int  value 
)
inline

Definition at line 607 of file Compadre_ParallelManager.hpp.

◆ setTeamScratchSize()

void Compadre::ParallelManager::setTeamScratchSize ( const int  level,
const int  value 
)
inline

Definition at line 623 of file Compadre_ParallelManager.hpp.

◆ setThreadScratchLevel()

void Compadre::ParallelManager::setThreadScratchLevel ( const int  level,
const int  value 
)
inline

Definition at line 615 of file Compadre_ParallelManager.hpp.

◆ setThreadScratchSize()

void Compadre::ParallelManager::setThreadScratchSize ( const int  level,
const int  value 
)
inline

Definition at line 631 of file Compadre_ParallelManager.hpp.

◆ TeamPolicyThreadsAndVectors()

Kokkos::TeamPolicy<device_execution_space> Compadre::ParallelManager::TeamPolicyThreadsAndVectors ( const global_index_type  batch_size,
const int  threads_per_team = -1,
const int  vector_lanes_per_thread = -1 
) const
inline

Creates a team policy for a parallel_for parallel_for will break out over loops over teams with each vector lane executing code be default.

Definition at line 117 of file Compadre_ParallelManager.hpp.

Member Data Documentation

◆ _default_threads

int Compadre::ParallelManager::_default_threads

largest team size

Definition at line 41 of file Compadre_ParallelManager.hpp.

◆ _default_vector_lanes

int Compadre::ParallelManager::_default_vector_lanes

Definition at line 42 of file Compadre_ParallelManager.hpp.

◆ _scratch_team_level_a

int Compadre::ParallelManager::_scratch_team_level_a

lowest level memory for Kokkos::parallel_for for team access memory

Definition at line 25 of file Compadre_ParallelManager.hpp.

◆ _scratch_team_level_b

int Compadre::ParallelManager::_scratch_team_level_b

lowest level memory for Kokkos::parallel_for for thread access memory

Definition at line 33 of file Compadre_ParallelManager.hpp.

◆ _scratch_thread_level_a

int Compadre::ParallelManager::_scratch_thread_level_a

higher (slower) level memory for Kokkos::parallel_for for team access memory

Definition at line 29 of file Compadre_ParallelManager.hpp.

◆ _scratch_thread_level_b

int Compadre::ParallelManager::_scratch_thread_level_b

higher (slower) level memory for Kokkos::parallel_for for thread access memory

Definition at line 37 of file Compadre_ParallelManager.hpp.

◆ _team_scratch_size_a

int Compadre::ParallelManager::_team_scratch_size_a

Definition at line 26 of file Compadre_ParallelManager.hpp.

◆ _team_scratch_size_b

int Compadre::ParallelManager::_team_scratch_size_b

Definition at line 34 of file Compadre_ParallelManager.hpp.

◆ _thread_scratch_size_a

int Compadre::ParallelManager::_thread_scratch_size_a

Definition at line 30 of file Compadre_ParallelManager.hpp.

◆ _thread_scratch_size_b

int Compadre::ParallelManager::_thread_scratch_size_b

Definition at line 38 of file Compadre_ParallelManager.hpp.


The documentation for this class was generated from the following file: