Kokkos Core Kernels Package  Version of the Day
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace > Class Template Reference

Execution policy for parallel work over a league of teams of threads. More...

#include <Kokkos_ExecPolicy.hpp>

Classes

struct  member_type
 Parallel execution of a functor calls the functor once with each member of the execution policy. More...
 

Public Types

typedef TeamPolicy execution_policy
 Tag this class as an execution policy. More...
 

Public Member Functions

 TeamPolicy (const 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...
 

Detailed Description

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
class Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >

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.

template argument option with specified execution space: < ExecSpace , WorkTag > < ExecSpace , void >

template argument option with default execution space: < WorkTag , void > < void , void >

Definition at line 299 of file Kokkos_ExecPolicy.hpp.

Member Typedef Documentation

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
typedef TeamPolicy Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::execution_policy

Tag this class as an execution policy.

Definition at line 311 of file Kokkos_ExecPolicy.hpp.

Constructor & Destructor Documentation

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::TeamPolicy ( const 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.

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::TeamPolicy ( int  league_size_request,
int  team_size_request,
int  vector_length_request = 1 
)

Construct policy with the default instance of the execution space.

Member Function Documentation

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
template<class FunctorType >
static int Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::team_size_max ( const FunctorType &  )
static

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.

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
template<class FunctorType >
static int Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::team_size_recommended ( const FunctorType &  )
static

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.

template<class Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
KOKKOS_INLINE_FUNCTION int Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::league_size ( ) const

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 Arg0 = void, class Arg1 = void, class ExecSpace = typename std::conditional < Impl::is_execution_space< Arg0 >::value , Arg0 , Kokkos::DefaultExecutionSpace >::type>
KOKKOS_INLINE_FUNCTION int Kokkos::TeamPolicy< Arg0, Arg1, ExecSpace >::team_size ( ) const

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.


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