Kokkos Core Kernels Package
Version of the Day
|
Execution policy for parallel work over a league of teams of threads. More...
#include <Kokkos_ExecPolicy.hpp>
Inherits Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >.
Public Member Functions | |
TeamPolicy (const typename traits::execution_space &, int league_size_request, int team_size_request, int vector_length_request=1) | |
Construct policy with the given instance of the execution space. More... | |
TeamPolicy (int league_size_request, int team_size_request, int vector_length_request=1) | |
Construct policy with the default instance of the execution space. More... | |
KOKKOS_INLINE_FUNCTION int | league_size () const |
The actual league size (number of teams) of the policy. More... | |
KOKKOS_INLINE_FUNCTION int | team_size () const |
The actual team size (number of threads per team) of the policy. More... | |
Static Public Member Functions | |
template<class FunctorType > | |
static int | team_size_max (const FunctorType &) |
Query maximum team size for a given functor. More... | |
template<class FunctorType > | |
static int | team_size_recommended (const FunctorType &) |
Query recommended team size for a given functor. More... | |
Execution policy for parallel work over a league of teams of threads.
The work functor is called for each thread of each team such that the team's member threads are guaranteed to be concurrent.
The team's threads have access to team shared scratch memory and team collective operations.
If the WorkTag is non-void then the first calling argument of the work functor's parentheses operator is 'const WorkTag &'. This allows a functor to have multiple work member functions.
Order of template arguments does not matter, since the implementation uses variadic templates. Each and any of the template arguments can be omitted.
Possible Template arguments and their default values: ExecutionSpace (DefaultExecutionSpace): where to execute code. Must be enabled. WorkTag (none): Tag which is used as the first argument for the functor operator. Schedule<Type> (Schedule<Static>): Scheduling Policy (Dynamic, or Static). IndexType<Type> (IndexType<ExecutionSpace::size_type>: Integer Index type used to iterate over the Index space. LaunchBounds<unsigned,unsigned> Launch Bounds for CUDA compilation, default of LaunchBounds<0,0> indicates no launch bounds specified.
Definition at line 518 of file Kokkos_ExecPolicy.hpp.
|
inline |
Construct policy with the given instance of the execution space.
Definition at line 534 of file Kokkos_ExecPolicy.hpp.
|
inline |
Construct policy with the default instance of the execution space.
Definition at line 541 of file Kokkos_ExecPolicy.hpp.
|
staticinherited |
Query maximum team size for a given functor.
This size takes into account execution space concurrency limitations and scratch memory space limitations for reductions, team reduce/scan, and team shared memory.
This function only works for single-operator functors. With multi-operator functors it cannot be determined which operator will be called.
|
staticinherited |
Query recommended team size for a given functor.
This size takes into account execution space concurrency limitations and scratch memory space limitations for reductions, team reduce/scan, and team shared memory.
This function only works for single-operator functors. With multi-operator functors it cannot be determined which operator will be called.
|
inherited |
The actual league size (number of teams) of the policy.
This may be smaller than the requested league size due to limitations of the execution space.
|
inherited |
The actual team size (number of threads per team) of the policy.
This may be smaller than the requested team size due to limitations of the execution space.