STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions
stapl::skeletons::local_env Class Reference

This environment tries to behave as a taskgraph_env on a single location. In other words, it runs the workfunctions instead of creating tasks, and stores the values produced by tasks and keeps them as long as they are needed (num_succs is not 0). You should consider this environment as the sequential version of the taskgraph_env. More...

Public Member Functions

template<bool isResult, typename WF , typename ... In>
void spawn_element (std::size_t tid, int result_id, WF const &wf, std::size_t num_succs, In &&... in)
 Runs the workfunction given on the given inputs and stores the value in the directory of the dependencies. More...
 
template<bool isResult, typename WF , typename... In>
void spawn_element (std::false_type, std::size_t tid, std::size_t result_id, std::vector< std::size_t > const &notifications, WF const &wf, std::size_t num_succs, In &&... in)
 Runs the workfunction given on the given inputs and stores the value in the directory of the dependencies. More...
 
template<bool isResult, typename WF , typename... In>
void spawn_element (std::true_type, std::size_t tid, std::size_t result_id, std::vector< std::size_t > const &notifications, WF const &wf, std::size_t num_succs, In &&... in)
 A specialization of spawn_element for the case that workfunction's result type is void and the notification list is also provided.
 
template<typename... Args>
void pre_spawn (Args &&... args) const
 
template<typename... Args>
void post_spawn (Args &&... args) const
 
void set_num_succs (std::size_t tid, std::size_t num_succs) const
 
void init_location_info (std::size_t num_PEs, runtime::location_id loc_id)
 
std::size_t get_num_PEs () const
 
std::size_t get_PE_id () const
 

Detailed Description

This environment tries to behave as a taskgraph_env on a single location. In other words, it runs the workfunctions instead of creating tasks, and stores the values produced by tasks and keeps them as long as they are needed (num_succs is not 0). You should consider this environment as the sequential version of the taskgraph_env.

See also
taskgraph_env

Member Function Documentation

◆ spawn_element() [1/2]

template<bool isResult, typename WF , typename ... In>
void stapl::skeletons::local_env::spawn_element ( std::size_t  tid,
int  result_id,
WF const &  wf,
std::size_t  num_succs,
In &&...  in 
)

Runs the workfunction given on the given inputs and stores the value in the directory of the dependencies.

Parameters
tidthe unique id assigned for the result of the invocation of the workfunction
wfthe workfunction to be executed
result_idresult_id of this task if it has one
num_succsthe exact number of successors for this element. Remember that in some cases this value is set to stapl::defer_specs (when the spawner is in SET_HOLD mode)
in...the producer information for the task's input arguments.

◆ spawn_element() [2/2]

template<bool isResult, typename WF , typename... In>
void stapl::skeletons::local_env::spawn_element ( std::false_type  ,
std::size_t  tid,
std::size_t  result_id,
std::vector< std::size_t > const &  notifications,
WF const &  wf,
std::size_t  num_succs,
In &&...  in 
)

Runs the workfunction given on the given inputs and stores the value in the directory of the dependencies.

Parameters
tidthe unique id assigned for the result of the invocation of the workfunction
wfthe workfunction to be executed
notificationslist of the nodes which can proceed as soon as this node is done
num_succsthe exact number of successors for this element. Remember that in some cases this value is set to stapl::defer_specs (when the spawner is in SET_HOLD mode)
in...the producer information for the task's input arguments.

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