|
| spawner (env_type env, memento &memento_stack) |
|
template<typename Skeleton , typename Coord , typename In , typename Out > |
bool | spawn (Skeleton &skeleton, std::size_t lid_offset, Coord const &skeleton_size, Coord const &coord, In const &in, Out const &out, std::size_t cur_stage=0) |
| This method is a simple redirection back and forth to the skeleton. It helps in tracking the spawning process in a centralized fashion, and can be further changed to perform various operations upon the invocation. More...
|
|
env_type | get_env () |
|
memento & | get_memento_stack () |
|
void | set_spawn_mode (enum spawn_mode cur_spawn_mode) |
|
enum spawn_mode | spawn_mode () const |
|
std::size_t | get_num_PEs () const |
|
runtime::location_id | get_PE_id () const |
|
template<typename Skeleton , typename Coord , typename In , typename Out > |
void | record_state (Skeleton &skeleton, std::size_t lid_offset, Coord &skeleton_size, Coord &coord, In const &in, Out const &out, std::size_t cur_stage, bool is_lazy=false, bool front=false) |
| This method records the current state of a partially spawned skeleton in the memento double-ended queue of the skeleton_manager . More...
|
|
template<bool isResult, typename WF , typename Mapper , typename... In> |
void | spawn_element (std::size_t tid, std::size_t result_id, WF &&wf, Mapper &&mapper, std::size_t no_succs, In &&... in) |
| When a spawner is asked to spawn an element, it checks the spawn_mode that it is now at. This is regardless of which environment the spawn_element request is going to be evaluated in. It would be then the responsibility of an environment to perform the appropriate action on such spawn_element or set_num_succs requests. 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 no_succs, In &&... in) |
| When a spawner is asked to spawn an element, it checks the spawn_mode that is now at. This is regardless of which environment the spawn_element request is going to be evaluated in. It would be then the responsibility of an environment to perform the appropriate action on such spawn_element or set_num_succs requests. More...
|
|
template<typename Env>
class stapl::skeletons::spawner< Env >
The spawner is used in conjunction with the skeleton_manager
to create nodes in the given environment. It is the main interface between skeletons and skeleton_manager
and also the environment being used. Therefore, it offers an interface for recording the state of a skeleton's spawning process, and provides spawn_element
interface that would do different activities depending on the spawn_mode
that the spawner is currently set as.
- Template Parameters
-
Env | the environment that the spawning process should happen in |
template<typename Env >
template<typename Skeleton , typename Coord , typename In , typename Out >
bool stapl::skeletons::spawner< Env >::spawn |
( |
Skeleton & |
skeleton, |
|
|
std::size_t |
lid_offset, |
|
|
Coord const & |
skeleton_size, |
|
|
Coord const & |
coord, |
|
|
In const & |
in, |
|
|
Out const & |
out, |
|
|
std::size_t |
cur_stage = 0 |
|
) |
| |
This method is a simple redirection back and forth to the skeleton. It helps in tracking the spawning process in a centralized fashion, and can be further changed to perform various operations upon the invocation.
- Parameters
-
skeleton | the skeleton to be spawned by this spawner |
lid_offset | the safe id to start the spawning from |
skeleton_size | the size of skeletons |
coord | the coordinate of the skeleton |
in | the input flow of the skeleton |
out | the output flow of the skeleton |
cur_stage | the current stage/state of the skeleton |
- Returns
- true if spawning of the skeleton is finished
template<typename Env >
template<bool isResult, typename WF , typename Mapper , typename... In>
void stapl::skeletons::spawner< Env >::spawn_element |
( |
std::size_t |
tid, |
|
|
std::size_t |
result_id, |
|
|
WF && |
wf, |
|
|
Mapper && |
mapper, |
|
|
std::size_t |
no_succs, |
|
|
In &&... |
in |
|
) |
| |
When a spawner is asked to spawn an element, it checks the spawn_mode
that it is now at. This is regardless of which environment the spawn_element
request is going to be evaluated in. It would be then the responsibility of an environment to perform the appropriate action on such spawn_element
or set_num_succs
requests.
- Parameters
-
tid | the unique element id that is going to be assigned to this element |
result_id | the result id of the task if it has any |
wf | the work function to be executed on the given inputs |
mapper | the output to output mapper for mapping the results of the child paragraph to current paragraph |
in | the input producer_info to the workfunction |
template<typename Env >
template<bool isResult, typename WF , typename Mapper , typename... In>
void stapl::skeletons::spawner< Env >::spawn_element |
( |
std::size_t |
tid, |
|
|
std::size_t |
result_id, |
|
|
std::vector< std::size_t > const & |
notifications, |
|
|
WF && |
wf, |
|
|
Mapper && |
mapper, |
|
|
std::size_t |
no_succs, |
|
|
In &&... |
in |
|
) |
| |
When a spawner is asked to spawn an element, it checks the spawn_mode
that is now at. This is regardless of which environment the spawn_element
request is going to be evaluated in. It would be then the responsibility of an environment to perform the appropriate action on such spawn_element
or set_num_succs
requests.
- Parameters
-
tid | the unique element id that is going to be assigned to this element |
result_id | the result id of the task if it has any |
wf | the work function to be executed on the given inputs |
in | the input producer_info to the workfunction |