Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
Kokkos::TeamPolicy< Properties > Class Template Reference

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 &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...
 
bool impl_auto_team_size () const
 Whether the policy has an automatically determined team size. More...
 
bool impl_auto_vector_length () const
 Whether the policy has an automatically determined vector length. 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...
 

Detailed Description

template<class... Properties>
class Kokkos::TeamPolicy< Properties >

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 605 of file Kokkos_ExecPolicy.hpp.

Constructor & Destructor Documentation

template<class... Properties>
Kokkos::TeamPolicy< Properties >::TeamPolicy ( const typename traits::execution_space &  space_,
int  league_size_request,
int  team_size_request,
int  vector_length_request = 1 
)
inline

Construct policy with the given instance of the execution space.

Definition at line 624 of file Kokkos_ExecPolicy.hpp.

template<class... Properties>
Kokkos::TeamPolicy< Properties >::TeamPolicy ( int  league_size_request,
int  team_size_request,
int  vector_length_request = 1 
)
inline

Construct policy with the default instance of the execution space.

Definition at line 648 of file Kokkos_ExecPolicy.hpp.

Member Function Documentation

template<class ExecSpace, class... Properties>
template<class FunctorType >
static int Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >::team_size_max ( const FunctorType &  )
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.

template<class ExecSpace, class... Properties>
template<class FunctorType >
static int Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >::team_size_recommended ( const FunctorType &  )
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.

template<class ExecSpace, class... Properties>
KOKKOS_INLINE_FUNCTION int Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >::league_size ( ) const
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.

template<class ExecSpace, class... Properties>
KOKKOS_INLINE_FUNCTION int Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >::team_size ( ) const
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.

template<class ExecSpace, class... Properties>
bool Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >::impl_auto_team_size ( ) const
inlineinherited

Whether the policy has an automatically determined team size.

template<class ExecSpace, class... Properties>
bool Kokkos::Impl::TeamPolicyInternal< ExecSpace, Properties >::impl_auto_vector_length ( ) const
inlineinherited

Whether the policy has an automatically determined vector length.


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