STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Attributes
stapl::skeletons::skeletons_impl::paragraph_skeleton_manager< Skeleton, ExecutionParams > Class Template Reference

This is a wrapper over the core skeleton_manager that allows the creating of tasks in STAPL task graphs. More...

Public Member Functions

 paragraph_skeleton_manager (Skeleton const &skeleton, ExecutionParams ep)
 
coarsener_type get_coarsener () const
 
scheduler_type get_scheduler (void) const
 
Skeleton get_skeleton (void) const
 
template<typename TGV >
taskgraph_env< TGV > create_envs (TGV tgv, std::true_type)
 A simple optimization to avoid the empty_env from being called during the spawning process.
 
template<typename TGV >
combined_env< extra_env_type, taskgraph_env< TGV > > create_envs (TGV tgv, std::false_type)
 If the extra environment passed to the paragraph skeleton manager is not an empty environment, it should be bundled with the taskgraph environment before starting the spawning process.
 
template<typename TGV , typename ... V>
void operator() (TGV tgv, V &&... view)
 This function combines a taskgraph_env with a user-provided environment (if any) and then executes the skeleton in the combined environment. More...
 
bool finished (void) const
 
template<typename View , typename... Views>
auto get_task_id_mapper (View const &view, Views const &...) const -> decltype(task_id_mapper(view))
 
void resume ()
 This method resumes the spawning process by spawning the element in the front of the memento deque if it is not a lazy element. More...
 
template<typename Skeleton , typename Env , typename ... V>
void execute (Skeleton &&skeleton, Env env, V &... view)
 The execute method starts the spawning process of a skeleton, given a set of input, in a given environment. This method is called once per skeleton execution. It processes inputs and makes proper flows out of the inputs and sets the size of the skeletons in order to make them ready for the execution. More...
 

Public Types

using coarsener_type = typename ExecutionParams::coarsener_type
 
using extra_env_type = typename ExecutionParams::extra_env_type
 
using result_type = typename ExecutionParams::result_type
 
using scheduler_type = typename ExecutionParams::scheduler_type
 
using skeleton_tag_type = typename Skeleton::skeleton_tag_type
 
using span_type = void
 
using task_id_mapper_type = stapl::use_default
 
template<typename In >
using out_port_type = typename Skeleton::template out_port_type< In >
 

Protected Attributes

bool m_is_done
 

Detailed Description

template<typename Skeleton, typename ExecutionParams>
class stapl::skeletons::skeletons_impl::paragraph_skeleton_manager< Skeleton, ExecutionParams >

This is a wrapper over the core skeleton_manager that allows the creating of tasks in STAPL task graphs.

Template Parameters
Skeletonthe skeleton to be executed.
ExecutionParamsextra configurations to customize the execution of the given skeleton.
See also
skeleton_manager
combined_env
graphviz_env
local_env

Member Function Documentation

◆ operator()()

template<typename Skeleton , typename ExecutionParams >
template<typename TGV , typename ... V>
void stapl::skeletons::skeletons_impl::paragraph_skeleton_manager< Skeleton, ExecutionParams >::operator() ( TGV  tgv,
V &&...  view 
)

This function combines a taskgraph_env with a user-provided environment (if any) and then executes the skeleton in the combined environment.

This method will be called by PARAGRAPH until this factory specifies that it is done with task creation (m_is_done). Upon each invocation it asks the skeleton_manager to continue spawning the enclosed skeleton.

Parameters
tgvtask graph view is passed to this method by PARAGRAPH using this argument
viewset of input views to the algorithm

◆ resume()

void stapl::skeletons::skeleton_manager::resume ( )
inherited

This method resumes the spawning process by spawning the element in the front of the memento deque if it is not a lazy element.

If all the elements of the memento double-ended queue are already resumed and there is nothing else left to spawn, the skeleton manager assumes it is done with the spawning process and will not be invoked anymore by the paragraph.

◆ execute()

template<typename Skeleton , typename Env , typename ... V>
void stapl::skeletons::skeleton_manager::execute ( Skeleton &&  skeleton,
Env  env,
V &...  view 
)
inherited

The execute method starts the spawning process of a skeleton, given a set of input, in a given environment. This method is called once per skeleton execution. It processes inputs and makes proper flows out of the inputs and sets the size of the skeletons in order to make them ready for the execution.

Parameters
skeletonthe skeleton to be spawned
envthe environment that this skeleton is going to be evaluated in
viewthe set of input/output data passed to the skeleton

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