Compadre  1.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Protected 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(100, clr, "MyFunctorName"); // some tag specified pm.CallFunctorWithTeamThreads<DefaultTag>(100, clr);

Definition at line 20 of file Compadre_ParallelManager.hpp.

#include <Compadre_ParallelManager.hpp>

Public Member Functions

Instantiation / Destruction
 ParallelManager ()
 
Accessors

Retrieve member variables through public member functions

template<typename Tag , class C >
void CallFunctorWithTeamThreadsAndVectors (const global_index_type batch_size, const int threads_per_team, const int vector_lanes_per_thread, C functor) 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 (const global_index_type batch_size, const int threads_per_team, const int vector_lanes_per_thread, C functor, 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 (const global_index_type batch_size, C functor) 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 (const global_index_type batch_size, C functor, 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
 
KOKKOS_INLINE_FUNCTION int getThreadsPerTeam (const int vector_lanes_per_thread=1) const
 
KOKKOS_INLINE_FUNCTION int getVectorLanesPerThread () 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 ()
 
void setThreadsPerTeam (const int value)
 
void setVectorLanesPerThread (const int value)
 

Protected 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 _threads_per_team
 calculated number of threads per team More...
 
int _vector_lanes_per_thread
 

Constructor & Destructor Documentation

Compadre::ParallelManager::ParallelManager ( )
inline

Definition at line 69 of file Compadre_ParallelManager.hpp.

Member Function Documentation

template<typename Tag , class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreads ( const global_index_type  batch_size,
functor 
) 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 189 of file Compadre_ParallelManager.hpp.

template<class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreads ( const global_index_type  batch_size,
functor,
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 197 of file Compadre_ParallelManager.hpp.

template<typename Tag , class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreadsAndVectors ( const global_index_type  batch_size,
const int  threads_per_team,
const int  vector_lanes_per_thread,
functor 
) 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 105 of file Compadre_ParallelManager.hpp.

template<class C >
void Compadre::ParallelManager::CallFunctorWithTeamThreadsAndVectors ( const global_index_type  batch_size,
const int  threads_per_team,
const int  vector_lanes_per_thread,
functor,
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 147 of file Compadre_ParallelManager.hpp.

void Compadre::ParallelManager::clearScratchSizes ( )
inline

Definition at line 288 of file Compadre_ParallelManager.hpp.

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

Definition at line 203 of file Compadre_ParallelManager.hpp.

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

Definition at line 221 of file Compadre_ParallelManager.hpp.

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

Definition at line 212 of file Compadre_ParallelManager.hpp.

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

Definition at line 230 of file Compadre_ParallelManager.hpp.

KOKKOS_INLINE_FUNCTION int Compadre::ParallelManager::getThreadsPerTeam ( const int  vector_lanes_per_thread = 1) const
inline

Definition at line 239 of file Compadre_ParallelManager.hpp.

KOKKOS_INLINE_FUNCTION int Compadre::ParallelManager::getVectorLanesPerThread ( ) const
inline

Definition at line 244 of file Compadre_ParallelManager.hpp.

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

Definition at line 256 of file Compadre_ParallelManager.hpp.

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

Definition at line 272 of file Compadre_ParallelManager.hpp.

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

Definition at line 264 of file Compadre_ParallelManager.hpp.

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

Definition at line 280 of file Compadre_ParallelManager.hpp.

void Compadre::ParallelManager::setThreadsPerTeam ( const int  value)
inline

Definition at line 295 of file Compadre_ParallelManager.hpp.

void Compadre::ParallelManager::setVectorLanesPerThread ( const int  value)
inline

Definition at line 299 of file Compadre_ParallelManager.hpp.

Member Data Documentation

int Compadre::ParallelManager::_scratch_team_level_a
protected

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

Definition at line 24 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_scratch_team_level_b
protected

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

Definition at line 32 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_scratch_thread_level_a
protected

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

Definition at line 28 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_scratch_thread_level_b
protected

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

Definition at line 36 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_team_scratch_size_a
protected

Definition at line 25 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_team_scratch_size_b
protected

Definition at line 33 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_thread_scratch_size_a
protected

Definition at line 29 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_thread_scratch_size_b
protected

Definition at line 37 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_threads_per_team
protected

calculated number of threads per team

Definition at line 40 of file Compadre_ParallelManager.hpp.

int Compadre::ParallelManager::_vector_lanes_per_thread
protected

Definition at line 41 of file Compadre_ParallelManager.hpp.


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