The main environment for spawning skeletons in STAPL and evaluating them as taskgraphs is taskgraph_env
. It gets the workfunction, unwraps the inputs which are given as producer_info
(indexed_producer
, view_element_producer
, etc.) and calls add_task
or set_num_succs
from the given PARAGRAPH
via the given taskgraph view (TGV
)
More...
|
| taskgraph_env (TGV tgv) |
|
template<bool isResult, typename WF , typename Mapper , typename... In> |
std::enable_if< !skeletons::is_nested_skeleton< typename std::decay< WF >::type >::value, void >::type | spawn_element (std::size_t tid, std::size_t result_id, WF &&wf, Mapper &&mapper, std::size_t num_succs, In &&... in) |
| Spawns an element in a given taskgraph. It first unwraps the input given as various types of producer_info and converts them to acceptable arguments to PARAGRAPH's input arguments for add_task requests. More...
|
|
template<bool isResult, typename S , bool Reducer, typename ExecutionParams , bool B, typename Mapper , typename... In> |
void | spawn_element (std::size_t tid, std::size_t result_id, wrapped_skeleton< S, tags::nested_execution< Reducer >, ExecutionParams, B > const &wf, Mapper &&mapper, std::size_t num_succs, In &&... in) |
| A specialization of spawn_element for the case that the given workfunction is a skeleton itself and the skeleton is not reducing to a single element. Examples of such are zip(zip(op)) , map(butterfly(op)) . More...
|
|
template<bool isResult, typename WF , typename Mapper , typename ... In> |
void | spawn_element (std::size_t tid, std::size_t result_id, std::vector< std::size_t > const ¬ifications, WF &&wf, Mapper &&mapper, std::size_t num_succs, In &&... in) |
| A specialization of spawn_element where the notification dependencies are also specified (notifications ). More...
|
|
template<typename WF , typename Farm , typename ... In> |
void | spawn_farm_element (WF &&wf, Farm &&farm, In &&... in) |
| Spawn a task generated by a farm. More...
|
|
template<typename... Args> |
void | pre_spawn (Args &&...) const |
|
template<typename... Args> |
void | post_spawn (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 |
|
runtime::location_id | get_PE_id () const |
|
template<typename TGV>
class stapl::skeletons::taskgraph_env< TGV >
The main environment for spawning skeletons in STAPL and evaluating them as taskgraphs is taskgraph_env
. It gets the workfunction, unwraps the inputs which are given as producer_info
(indexed_producer
, view_element_producer
, etc.) and calls add_task
or set_num_succs
from the given PARAGRAPH
via the given taskgraph view (TGV
)
- Template Parameters
-
TGV | taskgraph view that can be used to create tasks and modify their metadata in STAPL |
template<typename TGV >
template<bool isResult, typename S , bool Reducer, typename ExecutionParams , bool B, typename Mapper , typename... In>
void stapl::skeletons::taskgraph_env< TGV >::spawn_element |
( |
std::size_t |
tid, |
|
|
std::size_t |
result_id, |
|
|
wrapped_skeleton< S, tags::nested_execution< Reducer >, ExecutionParams, B > const & |
wf, |
|
|
Mapper && |
mapper, |
|
|
std::size_t |
num_succs, |
|
|
In &&... |
in |
|
) |
| |
A specialization of spawn_element for the case that the given workfunction is a skeleton itself and the skeleton is not reducing to a single element. Examples of such are zip(zip(op))
, map(butterfly(op))
.
Internally, nested skeletons are wrapped inside the adapter class called wrapped_skeleton
, which contains the preference for execution.
- Parameters
-
tid | the unique task id assigned for this element |
result_id | result_id of this task if it has one |
wf | a wrapped_skeleton with a nested_execution execution tag |
mapper | the output to output mapper for mapping the results of the child paragraph to current paragraph |
num_succs | the exact number of successors for this task. Remember that in some cases this value is set to stapl::defer_specs (when the spawner is in SET_HOLD mode) |
in | inputs |