STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
Classes | Functions
Paragraph Task Classes
+ Collaboration diagram for Paragraph Task Classes:

Classes

struct  stapl::paragraph_impl::promotion_resolver< WF, GlobalVS, Result >
 Functor that attempts to deduce what input parameter to the workfunction the return value is based on and exactly of what it is a reference to (e.g., reference to some portion of a view element, etc). It then redirects to an appropriate invocation of promote_ref to perform the actual promotion and returns the promoted result.Primary template used when framework doesn't know how to perform promotion. Unconditionally asserts at compile time. More...
 
struct  stapl::paragraph_impl::promotion_resolver< WF, GlobalVS, typename tuple_element< 0, GlobalVS >::type::reference >
 Functor specialization used when WF::result_type == View0::reference and View::reference is a proxy. More...
 
struct  stapl::paragraph_impl::promotion_resolver< WF, GlobalVS, typename tuple_element< 0, GlobalVS >::type::reference::reference >
 Functor specialization used when WF::result_type == View0::reference::reference (e.g., reference from element (view) of a partitioned view) and View0::reference::reference is a proxy. More...
 
struct  stapl::paragraph_impl::promote_wf< WF, GlobalVS >
 Workfunction wrapper that facilitates promotion of a localized return value to the global scope (i.e., that of the PARAGRAPH instead of the task. More...
 
struct  stapl::paragraph_impl::compute_promotion_wf< WF, GlobalVS, LocalVS, b >
 Functor invoked by the task creation process. Compares the return types of the workfunction when given the global and local viewsets. If they differ the workfunction that task uses is changed to facilitate the promotion of the return value based on the localized viewset to a form valid in the global / enclosing scope. More...
 
struct  stapl::paragraph_impl::compute_promotion_wf< WF, GlobalVS, LocalVS, false >
 Functor class specialization matching cases where a promotion wrapper is needed to generalize the localized return value from the workfunction.Wrap the workfunction with promote_wf, initialized the wrapper with both the base workfunction and the non localized view set. More...
 
struct  stapl::paragraph_impl::compute_demotion_wf< WF >
 Functor that recovers the original workfunction passed to task creation prior to any wrappers to support the promotion of localized return values. More...
 
struct  stapl::paragraph_impl::compute_demotion_wf< promote_wf< WF, GlobalVS > >
 Functor class specialization matching task workfunctions that were wrapped with promote_wf to support localization.Extracts and return the original workfunction. More...
 
class  stapl::tg_callback
 Callback to PARAGRAPH used by tasks to inform it of task completion, migration requests, etc.Tasks can be migrated to execute at locations outside where the associated PARAGRAPH is defined. This class generalizes task access to the PARAGRAPH to support such cases. More...
 
struct  stapl::paragraph_impl::result_storage_mf< Result >
 Metafunction to compute storage type for lhs side of workfunction invocation in Task::operator(). Allows void and nonvoid types to be handled uniformly to avoid a complete specialization the Task class template. More...
 
struct  stapl::paragraph_impl::result_storage_mf< void >
 Class specialization for workfunction returning void. Reflect empty_class. More...
 
struct  stapl::paragraph_impl::task_base
 Encapsulates all information needed to execute a task. Constructed by the PARAGRAPH and passed to executor when all dependences have been satisfied. More...
 
class  stapl::paragraph_impl::task_base_intermediate< SchedulerEntry >
 Intermediate class in task_base / Task inheritance relationship which encodes the scheduler metadata type so that a virtual function signature can be defined and polymorphically invoked by the scheduler (who doesn't know concrete type of Task) to initiate task migration. More...
 
struct  stapl::paragraph_impl::pre_execute_impl< T, bool >
 Implementation class of pre_execute_func. Uses partial specialization to call method in object if and only if it is a view. More...
 
struct  stapl::paragraph_impl::post_execute_impl< T, bool >
 Implementation class of post_execute_func. Uses partial specialization to call method in object if and only if it is a view. More...
 
struct  stapl::paragraph_impl::pre_execute_func
 Function object used by Task to invoke pre_execute on each element of the viewset unless it is a proxy or paragraph_view. More...
 
struct  stapl::paragraph_impl::post_execute_func
 Function object used by Task to invoke post_execute on each element of the viewset unless it is a proxy or paragraph_view. More...
 
struct  stapl::detail::compute_invoked_wf< WF, b_persistent >
 Metafunction that inserts a const qualification on the workfunction if persistency mode in the PARAGRAPH is enabled. More...
 
struct  stapl::detail::compute_invoked_wf< WF, true >
 Specialization when b_persistent == true. Reflect WF with const qualification added (if not already present). More...
 
class  stapl::paragraph_impl::Task< SchedulerEntry, EnableMigration, EnablePersistence, WF, ViewSet >
 Concrete implementation of abstract class task, used to invoke user workfunction with views that were defined as task via an add_task method call on the paragraph_view. More...
 
struct  stapl::paragraph_impl::check_finished< Factory, bool >
 Metafunction that invokes member finished on the factory if it inherits from incremental_wf, denoting that it implements the incremental workfunction concept.Primary template matches incremental case. Invoke finished on the factory. More...
 
struct  stapl::paragraph_impl::check_finished< Factory, false >
 Specialization matching case when Factory conforms to the incremental workfunction concept.Return true, no invocation is required. More...
 
class  stapl::paragraph_impl::factory_task< Factory, ViewSet, SchedulerEntry, PGV >
 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...
 
struct  stapl::detail::create_task_impl< Localize >
 Called after a tasks' views have been created to make the task object. Statically guards localization with is_localizable< metafunction. More...
 

Functions

template<typename GReturn , typename LReturn , typename LView , typename GView , typename IsPView >
GReturn stapl::promote_ref (LReturn const &, LView const &, GView const &, IsPView)
 Called by promotion resolver to perform actual promotion of localized workfunction return value. More...
 
template<typename GReturn , typename C , typename T , typename LView , typename GView >
GReturn stapl::promote_ref (proxy< T, local_accessor< C > > ref, LView const &, GView const &gv, std::integral_constant< bool, false >)
 Signature for promoting a local_accessor to GReturn.
 
template<typename GReturn , typename T , typename LView , typename GView >
GReturn stapl::promote_ref (proxy< T, ref_accessor< T > > ref, LView const &lv, GView const &gv, std::integral_constant< bool, false >)
 Signature for promoting a ref_accessor to GReturn. More...
 
template<typename GReturn , typename T , typename LView , typename GView >
GReturn stapl::promote_ref (proxy< T, ref_accessor< T > > ref, LView const &lv, GView const &gv, std::integral_constant< bool, true >)
 Signature for promoting a ref_accessor to GReturn when: (1) GView is a partitioned view and (2) ref is a reference to an element of an element of that view.
 
template<typename GReturn , typename T , typename C , typename LView , typename GView >
GReturn stapl::promote_ref (proxy< T, local_accessor< C > > ref, LView const &lv, GView const &gv, std::integral_constant< bool, true >)
 Signature for promoting a local_accessor to GReturn when: (1) GView is a partitioned view and (2) ref is a reference to an element of an element of that view.
 
template<typename GReturn , typename C , typename T , typename LView , typename GView >
GReturn stapl::promote_ref (proxy< T, local_accessor_graph< C > > ref, LView const &lv, GView const &gv, std::integral_constant< bool, false >)
 Signature for promoting a local_accessor_graph to GReturn.
 
template<typename SchedulerEntry , typename Migratable , typename Persistent , typename SchedulerInfoParam , typename WFParam , typename ... ViewParams>
paragraph_impl::task_base_intermediate< SchedulerEntry > * stapl::detail::standard_task_creator (detail::edge_entry_base *edge_entry_ptr, SchedulerInfoParam &&scheduler_info, WFParam &&wf, ViewParams &&... views)
 Initialize view set for task with no localization applied. Construct Task object on heap and return a pointer to it. More...
 
template<typename SchedulerEntry , typename Migratable , typename Persistent , typename SchedulerInfoParam , typename WFParam , typename ... ViewParams>
paragraph_impl::task_base_intermediate< SchedulerEntry > * stapl::detail::fast_task_creator (tg_callback const &cb, detail::edge_entry_base *edge_entry_ptr, SchedulerInfoParam &&scheduler_info, WFParam &&wf, ViewParams &&... views)
 Initialize view set for task with localization transformation applied. Wraps the workfunction passed to the task with mechanism to promote a return value from workfunction which is dependent on an input localized view. Construct Task object on heap and return a pointer to it. More...
 
template<typename SchedulerEntry , typename Migratable , typename Persistent , typename SchedulerInfoParam , typename WFParam , typename ... ViewParams>
paragraph_impl::task_base_intermediate< SchedulerEntry > * stapl::detail::create_task (tg_callback const &cb, detail::edge_entry_base *edge_entry_ptr, SchedulerInfoParam &&scheduler_info, WFParam &&wf, ViewParams &&... views)
 Checks static localizability of task based on views and dispatches to appropriate task creation mechanism. More...
 

Detailed Description

Function Documentation

◆ promote_ref() [1/2]

template<typename GReturn , typename LReturn , typename LView , typename GView , typename IsPView >
GReturn stapl::promote_ref ( LReturn const &  ,
LView const &  ,
GView const &  ,
IsPView   
)

Called by promotion resolver to perform actual promotion of localized workfunction return value.

Template Parameters
GReturnReturn type of the workfunction when invoked with a non-localized view set. The target type of the promotion operation.
LReturnReturn type of the workfunction when invoked with a localized view set. The input result to the promotion operation.
LViewLocalized view type.
GViewType of view before localization transformation.
IsPViewBoolean type parameter denoting whether GView is a partitioned view.
Returns
The promoted return value.

GReturn explicitly specified by caller, others are deduced.

This least specialized, default signature asserts out at compile time because we don't know how to promote LReturn.

◆ promote_ref() [2/2]

template<typename GReturn , typename T , typename LView , typename GView >
GReturn stapl::promote_ref ( proxy< T, ref_accessor< T > >  ref,
LView const &  lv,
GView const &  gv,
std::integral_constant< bool, false >   
)

Signature for promoting a ref_accessor to GReturn.

◆ standard_task_creator()

template<typename SchedulerEntry , typename Migratable , typename Persistent , typename SchedulerInfoParam , typename WFParam , typename ... ViewParams>
paragraph_impl::task_base_intermediate<SchedulerEntry>* stapl::detail::standard_task_creator ( detail::edge_entry_base edge_entry_ptr,
SchedulerInfoParam &&  scheduler_info,
WFParam &&  wf,
ViewParams &&...  views 
)

Initialize view set for task with no localization applied. Construct Task object on heap and return a pointer to it.

◆ fast_task_creator()

template<typename SchedulerEntry , typename Migratable , typename Persistent , typename SchedulerInfoParam , typename WFParam , typename ... ViewParams>
paragraph_impl::task_base_intermediate<SchedulerEntry>* stapl::detail::fast_task_creator ( tg_callback const &  cb,
detail::edge_entry_base edge_entry_ptr,
SchedulerInfoParam &&  scheduler_info,
WFParam &&  wf,
ViewParams &&...  views 
)

Initialize view set for task with localization transformation applied. Wraps the workfunction passed to the task with mechanism to promote a return value from workfunction which is dependent on an input localized view. Construct Task object on heap and return a pointer to it.

See also
paragraph_impl::compute_promotion_wf

◆ create_task()

template<typename SchedulerEntry , typename Migratable , typename Persistent , typename SchedulerInfoParam , typename WFParam , typename ... ViewParams>
paragraph_impl::task_base_intermediate<SchedulerEntry>* stapl::detail::create_task ( tg_callback const &  cb,
detail::edge_entry_base edge_entry_ptr,
SchedulerInfoParam &&  scheduler_info,
WFParam &&  wf,
ViewParams &&...  views 
)

Checks static localizability of task based on views and dispatches to appropriate task creation mechanism.

Template Parameters
SchedulerEntryIntrusive entry for scheduler which stores scheduling metadata and container related fields.
MigratableBoolean type parameter denoting whether task migration enabled for the associated PARAGRAPH.
PersistentBoolean type parameter denoting whether persistency enabled for the associated PARAGRAPH.
Parameters
edge_entry_ptrEdge entry that this task writes its results to.
sched_infoInformation used to determine relative priority of task.
wfThe workfunction for the task.
viewsThe pre-localization views for this task.