Concrete implementation of abstract class task_base, used to invoke the factory (the initial task executed for any PARAGRAPH which populates the graph with additional tasks) from the PARAGRAPH's executor. More...
Public Member Functions | |
factory_task (Factory factory, ViewSet &&vs) | |
Factory const & | factory (void) const |
ViewSet & | views (void) |
result_type | operator() (tg_callback const &cb) final |
Invokes factory to populate PARAGRAPH with tasks. | |
bool | finished (void) const final |
Return true if the factory has created all tasks it wishes to insert into the PARAGRAPH. | |
bool | reinvoke (tg_callback const &cb) final |
Used by PARAGRAPH for subsequent calls to the factory to create any additional tasks. More... | |
bool | is_factory_task (void) const noexcept final |
Implementation of pure virtual method defined in abstract class task . More... | |
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 | is_nested_pg_task (void) const noexcept |
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. | |
Public Types | |
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... | |
Concrete implementation of abstract class task_base, used to invoke the factory (the initial task executed for any PARAGRAPH which populates the graph with additional tasks) from the PARAGRAPH's executor.
Factory | Type type of the factory passed to the PARAGRAPH at initialization. |
ViewSet | The type of the post coarsening set of PARAGRAPH input views to be passed to the factory. |
PGV | The type of the paragraph_view for this PARAGRAPH. No need for member, can be trivially default constructed. |
|
inherited |
|
finalvirtual |
Used by PARAGRAPH for subsequent calls to the factory to create any additional tasks.
Guards reinvocation with finished
== false to avoid calling a factory with no further tasks to create.
true
if it needs to be reinvoked again, otherwise false
. Reimplemented from stapl::paragraph_impl::task_base.
|
finalvirtualnoexcept |
Implementation of pure virtual method defined in abstract class task
.
Implements stapl::paragraph_impl::task_base.
|
virtualinherited |
Method overridden in Task
to request migration of this task by task_graph.
dest_loc | The location the task should be migrated to. |
cb | Callback wrapper to the associated PARAGRAPH. |
Reimplemented in stapl::paragraph_impl::identity_task_impl< SchedulerEntry, EnableMigration, EnablePersistence, ViewSet >, stapl::paragraph_impl::identity_task_impl< SchedulerEntry, EnableMigration, EnablePersistence, Storage< lazy_edge_reference< T > > >, and stapl::paragraph_impl::Task< SchedulerEntry, EnableMigration, EnablePersistence, WF, ViewSet >.
|
protectedinherited |
Extract the has successors boolean trait from the bit field and return.
|
protectedinherited |
Notify the PARAGRAPH that the task has finished execution and provide the return value to trigger data flow. Signature for void return values.
ignore | Parameter passed in place of void for genericity. Unused. |
Called from derived class function operator implementations.
|
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.
val | The return value of the workfunction invocation. |
Called from derived class function operator implementations.
|
inherited |
Use presence/lack of intra-PARAGRAPH successors to inform the execution in which task communication group this task's traffic should be placed.
cb | Callback mechanism to PARAGRAPH passed to task by its executor. |
|
virtualnoexceptinherited |
Return true
if task can be migrated.
This default implementation is used by the factory task, where migration is not allowed.
Reimplemented in stapl::paragraph_impl::identity_task_impl< SchedulerEntry, EnableMigration, EnablePersistence, ViewSet >, stapl::paragraph_impl::identity_task_impl< SchedulerEntry, EnableMigration, EnablePersistence, Storage< lazy_edge_reference< T > > >, and stapl::paragraph_impl::Task< SchedulerEntry, EnableMigration, EnablePersistence, WF, ViewSet >.