STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions
stapl::paragraph_impl::nested_pg_task< SchedulerEntry, PG > Class Template Reference

Task wrapper for nested PARAGRAPH. Used to reinvoke the paragraph in from a persistent parent paragraph. More...

Public Member Functions

template<typename SchedInfoParam >
 nested_pg_task (rmi_handle::reference handle, SchedInfoParam &&si)
 
result_type operator() (tg_callback const &) final
 Invoke the task. Called by the executor. Implemented in derived class that knows the workfunction and view types. More...
 
bool is_factory_task (void) const noexcept final
 Pure virtual method implemented by derived classes to report whether or not they are instance of the class template factory_task. More...
 
bool is_nested_pg_task (void) const noexcept final
 Allows detection of derived class acting as holder for nested paragraph. Used paragraph::operator() to detect starting tasks which are actually nested paragraphs to avoid passing them to the executor.
 
 ~nested_pg_task ()
 Triggers asynchronous deletion of paragraph this task encapsulates.
 
virtual void migrate (size_t, tg_callback const &)
 Method overridden in Task to request migration of this task by task_graph. More...
 
std::size_t task_id () const
 Extract task identifier from bit field and return it.
 
p_object const & comm_p_object (tg_callback const &cb) const
 Use presence/lack of intra-PARAGRAPH successors to inform the execution in which task communication group this task's traffic should be placed. More...
 
virtual bool migratable (void) const noexcept
 Return true if task can be migrated. More...
 
virtual bool finished (void) const
 Return true if task has completed and does not need reinvocation. This default implementation is used by the non factory tasks, where the method should never be called.
 
virtual bool reinvoke (tg_callback const &)
 Reinvoke the task if it has not completed. This default implementation is used by the non factory tasks, where the method should never be called. More...
 

Public Types

using task_base_intermediate_t = task_base_intermediate< SchedulerEntry >
 
using result_type = typename task_base_intermediate_t::result_type
 
enum  status_type { Active, Idle, Finished }
 Return values for function operator. More...
 

Protected Member Functions

bool has_succs () const
 Extract the has successors boolean trait from the bit field and return. More...
 
void processed (empty_class &&ignore, bool b_has_succs, tg_callback const &) const
 Notify the PARAGRAPH that the task has finished execution and provide the return value to trigger data flow. Signature for void return values. More...
 
template<typename Return >
void processed (Return &&val, bool b_has_succs, tg_callback const &) const
 Notify the PARAGRAPH that the task has finished execution and provide the return value to trigger data flow. Signature for non void return values. More...
 

Detailed Description

template<typename SchedulerEntry, typename PG>
class stapl::paragraph_impl::nested_pg_task< SchedulerEntry, PG >

Task wrapper for nested PARAGRAPH. Used to reinvoke the paragraph in from a persistent parent paragraph.

Member Enumeration Documentation

◆ status_type

Return values for function operator.

Enumerator
Active 

Runnable object is active.

Idle 

Runnable object is idle.

Finished 

Runnable object has finished.

Member Function Documentation

◆ operator()()

template<typename SchedulerEntry , typename PG >
result_type stapl::paragraph_impl::nested_pg_task< SchedulerEntry, PG >::operator() ( tg_callback const &  cb)
finalvirtual

Invoke the task. Called by the executor. Implemented in derived class that knows the workfunction and view types.

Parameters
cbCallback mechanism to PARAGRAPH passed to task by its executor.

Implements stapl::paragraph_impl::task_base.

◆ is_factory_task()

template<typename SchedulerEntry , typename PG >
bool stapl::paragraph_impl::nested_pg_task< SchedulerEntry, PG >::is_factory_task ( void  ) const
finalvirtualnoexcept

Pure virtual method implemented by derived classes to report whether or not they are instance of the class template factory_task.

Used by the runtime executor and scheduler to specialize scheduling (i.e., execute once immediately upon being made runnable).

Implements stapl::paragraph_impl::task_base.

◆ migrate()

template<typename SchedulerEntry>
virtual void stapl::paragraph_impl::task_base_intermediate< SchedulerEntry >::migrate ( size_t  ,
tg_callback const &   
)
virtualinherited

◆ has_succs()

bool stapl::paragraph_impl::task_base::has_succs ( ) const
protectedinherited

Extract the has successors boolean trait from the bit field and return.

Returns
True if this task has successors in the PARAGRAPH.

◆ processed() [1/2]

void stapl::paragraph_impl::task_base::processed ( empty_class &&  ignore,
bool  b_has_succs,
tg_callback const &  cb 
) const
protectedinherited

Notify the PARAGRAPH that the task has finished execution and provide the return value to trigger data flow. Signature for void return values.

Parameters
ignoreParameter passed in place of void for genericity. Unused.

Called from derived class function operator implementations.

◆ processed() [2/2]

template<typename Return >
void stapl::paragraph_impl::task_base::processed ( Return &&  val,
bool  b_has_succs,
tg_callback const &  cb 
) const
protectedinherited

Notify the PARAGRAPH that the task has finished execution and provide the return value to trigger data flow. Signature for non void return values.

Parameters
valThe return value of the workfunction invocation.

Called from derived class function operator implementations.

◆ comm_p_object()

p_object const & stapl::paragraph_impl::task_base::comm_p_object ( tg_callback const &  cb) const
inherited

Use presence/lack of intra-PARAGRAPH successors to inform the execution in which task communication group this task's traffic should be placed.

Parameters
cbCallback mechanism to PARAGRAPH passed to task by its executor.

◆ migratable()

virtual bool stapl::paragraph_impl::task_base::migratable ( void  ) const
virtualnoexceptinherited

◆ reinvoke()

virtual bool stapl::paragraph_impl::task_base::reinvoke ( tg_callback const &  )
virtualinherited

Reinvoke the task if it has not completed. This default implementation is used by the non factory tasks, where the method should never be called.

Returns
true if it needs to be reinvoked again, otherwise false.

Reimplemented in stapl::paragraph_impl::factory_task< Factory, ViewSet, SchedulerEntry, PGV >, and stapl::paragraph_impl::factory_task< Factory, view_manager< coarsener_type< Factory >::type, Views... >::result_type, Scheduler::entry_type, paragraph_impl::paragraph_view< Scheduler > >.


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