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

Every parametric dependency is wrapped by this class in order to represent an executable, expandable skeleton. This class has a generic interface for spawning parametric dependencies, and for accessing the flows connected to each node. More...

Public Member Functions

 elem (Skeleton skeleton, Span span=Span())
 
auto dimensions_metadata (void) const STAPL_AUTO_RETURN((dimensions_metadata_type< span_type >
 
span_type span ()
 
span_type span () const
 
std::size_t last_id () const
 
Skeleton const & nested_skeleton () const
 
Skeleton & nested_skeleton ()
 
in_port_type in_port (std::size_t lid_offset) const
 
template<typename In >
out_port_type< In >::type out_port (In const &in, std::size_t lid_offset) const
 
template<typename Spawner , typename Coord , typename In , typename Out >
bool spawn (Spawner &spawner, std::size_t lid_offset, Coord const &skeleton_size, Coord const &coord, In &in, Out &out, std::size_t=0)
 spawns elements of the expanded parametric dependency using the given spawner. It does this by hiding spawn_element details from the parametric dependency and passing a spawn_visitor to the parametric dependencies. More...
 

Static Public Member Functions

static type call (Span const &span)
 

Public Types

using span_type = Span
 
using dims_type = typename Span::size_type
 
using index_type = typename Span::index_type
 
using op_type = typename Skeleton::op_type
 
using nested_p_type = Skeleton
 
using ports_t = typename Flows::template port_types< elem >
 
using in_port_type = typename ports_t::in_port_type
 
using skeleton_tag_type = tags::unnamed_skeleton
 
using type = typename Span::metadata_type
 
using metadata_type = type
 

Static Public Attributes

static constexpr std::size_t in_port_size = ports_t::in_port_size
 

Detailed Description

template<typename Skeleton, typename Span, typename Flows>
class stapl::skeletons::skeletons_impl::elem< Skeleton, Span, Flows >

Every parametric dependency is wrapped by this class in order to represent an executable, expandable skeleton. This class has a generic interface for spawning parametric dependencies, and for accessing the flows connected to each node.

An expanded parametric dependency is a skeleton for which the dimensions are set based on the given span and can be spawned in a given environment.

Template Parameters
Skeletonthe enclosed skeleton that should be spawned
Spanthe span (iteration space) of the enclosed parametric dependency
Flowsthe flow that should be used for the expanded parametric dependency. flows::forked is usually used

Member Function Documentation

◆ spawn()

template<typename Skeleton , typename Span , typename Flows >
template<typename Spawner , typename Coord , typename In , typename Out >
bool stapl::skeletons::skeletons_impl::elem< Skeleton, Span, Flows >::spawn ( Spawner &  spawner,
std::size_t  lid_offset,
Coord const &  skeleton_size,
Coord const &  coord,
In &  in,
Out &  out,
std::size_t  = 0 
)

spawns elements of the expanded parametric dependency using the given spawner. It does this by hiding spawn_element details from the parametric dependency and passing a spawn_visitor to the parametric dependencies.

Parameters
spawnerthe spawner that is going to be used to spawn elements of the enclosed parametric dependency. Typically, the given spawner is associated with taskgraph_env and would create a task per spawn_element request
lid_offsetthe offset from which the underlying elementary skeleton should spawn
skeleton_sizethe size of the skeleton as a tuple of dimensions
coordthe coordinate for the parametric dependency. The given coordinate will be extended with one new dimension in this level and will traverse the iteration space specified by the Span
inthe input flow to the underlying elementary.
outthe output flow from this elementary and it is used to determine the number of successors of each spawned element in the final dependence graph
cur_stagecurrent stage of the spawning process of this skeleton

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