Kokkos Core Kernels Package  Version of the Day
Public Member Functions | List of all members
Kokkos::Experimental::TaskPolicy< Arg0 > Class Template Reference

If the argument is an execution space then a serial task in that space. More...

#include <Kokkos_TaskPolicy.hpp>

Public Member Functions

template<class FunctorType >
Future< typename FunctorType::value_type, execution_space > create (const FunctorType &functor, const unsigned dependence_capacity) const
 Create a serial task with storage for dependences. More...
 
template<class ExecPolicy , class FunctorType >
Future< typename FunctorType::value_type, execution_space > create_foreach (const ExecPolicy &policy, const FunctorType &functor, const unsigned dependence_capacity) const
 Create a foreach task with storage for dependences. More...
 
template<class ExecPolicy , class FunctorType >
Future< typename FunctorType::value_type, execution_space > create_reduce (const ExecPolicy &policy, const FunctorType &functor, const unsigned dependence_capacity) const
 Create a reduce task with storage for dependences. More...
 
template<class ExecPolicy , class FunctorType >
Future< typename FunctorType::value_type, execution_space > create_scan (const ExecPolicy &policy, const FunctorType &functor, const unsigned dependence_capacity) const
 Create a scan task with storage for dependences. More...
 
template<class TA , class TB >
void set_dependence (const Future< TA, execution_space > &after, const Future< TB, execution_space > &before) const
 Set dependence that 'after' cannot start execution until 'before' has completed. More...
 
template<class T >
const Future< T, execution_space > & spawn (const Future< T, execution_space > &) const
 Spawn a task in the 'Constructing' state. More...
 
template<class FunctorType >
Future< execution_space > get_dependence (FunctorType *, const int) const
 Query dependence of an executing task. More...
 
template<class FunctorType >
void clear_dependence (FunctorType *) const
 Clear current dependences of an executing task in preparation for setting new dependences and respawning. More...
 
template<class FunctorType , class TB >
void set_dependence (FunctorType *after, const Future< TB, execution_space > &before) const
 Set dependence that 'after' cannot start execution until 'before' has completed. More...
 
template<class FunctorType >
void respawn (FunctorType *) const
 Respawn (reschedule) an executing task to be called again after all dependences have completed. More...
 

Detailed Description

template<class Arg0 = Kokkos::DefaultExecutionSpace>
class Kokkos::Experimental::TaskPolicy< Arg0 >

If the argument is an execution space then a serial task in that space.

Definition at line 217 of file Kokkos_TaskPolicy.hpp.

Member Function Documentation

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class FunctorType >
Future< typename FunctorType::value_type , execution_space > Kokkos::Experimental::TaskPolicy< Arg0 >::create ( const FunctorType &  functor,
const unsigned  dependence_capacity 
) const

Create a serial task with storage for dependences.

Postcondition: Task is in the 'constructing' state.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class ExecPolicy , class FunctorType >
Future< typename FunctorType::value_type , execution_space > Kokkos::Experimental::TaskPolicy< Arg0 >::create_foreach ( const ExecPolicy &  policy,
const FunctorType &  functor,
const unsigned  dependence_capacity 
) const

Create a foreach task with storage for dependences.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class ExecPolicy , class FunctorType >
Future< typename FunctorType::value_type , execution_space > Kokkos::Experimental::TaskPolicy< Arg0 >::create_reduce ( const ExecPolicy &  policy,
const FunctorType &  functor,
const unsigned  dependence_capacity 
) const

Create a reduce task with storage for dependences.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class ExecPolicy , class FunctorType >
Future< typename FunctorType::value_type , execution_space > Kokkos::Experimental::TaskPolicy< Arg0 >::create_scan ( const ExecPolicy &  policy,
const FunctorType &  functor,
const unsigned  dependence_capacity 
) const

Create a scan task with storage for dependences.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class TA , class TB >
void Kokkos::Experimental::TaskPolicy< Arg0 >::set_dependence ( const Future< TA, execution_space > &  after,
const Future< TB, execution_space > &  before 
) const

Set dependence that 'after' cannot start execution until 'before' has completed.

Precondition: The 'after' task must be in then 'Constructing' state.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class T >
const Future<T,execution_space>& Kokkos::Experimental::TaskPolicy< Arg0 >::spawn ( const Future< T, execution_space > &  ) const

Spawn a task in the 'Constructing' state.

Precondition: Task is in the 'constructing' state. Postcondition: Task is waiting, executing, or complete.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class FunctorType >
Future< execution_space > Kokkos::Experimental::TaskPolicy< Arg0 >::get_dependence ( FunctorType *  ,
const int   
) const

Query dependence of an executing task.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class FunctorType >
void Kokkos::Experimental::TaskPolicy< Arg0 >::clear_dependence ( FunctorType *  ) const

Clear current dependences of an executing task in preparation for setting new dependences and respawning.

Precondition: The functor must be a task in the executing state.

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class FunctorType , class TB >
void Kokkos::Experimental::TaskPolicy< Arg0 >::set_dependence ( FunctorType *  after,
const Future< TB, execution_space > &  before 
) const

Set dependence that 'after' cannot start execution until 'before' has completed.

The 'after' functor must be in the executing state

template<class Arg0 = Kokkos::DefaultExecutionSpace>
template<class FunctorType >
void Kokkos::Experimental::TaskPolicy< Arg0 >::respawn ( FunctorType *  ) const

Respawn (reschedule) an executing task to be called again after all dependences have completed.


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