STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Static Public Attributes
stapl::skeletons::skeletons_impl::zip_pd< Op, i, dims, F, Mappers, SetResult > Class Template Reference

A zip parametric dependency is usually used in zip skeleton. It sends input with the same index of each flow to the given Op. More...

Public Member Functions

 zip_pd (Op op, F f, Mappers mappers)
 
template<typename Coord , typename Visitor , typename In >
void case_of (Coord const &, Coord const &coord, Visitor &visitor, In &&in_flow) const
 If coord is <idx, ...> it wraps the Op with the following inputs and sends it to the visitor along with the m_op. More...
 
template<typename Size , typename Coord , typename FlowIndex >
std::size_t consumer_count (Size const &, Coord const &, FlowIndex) const
 determines how many of the instances of this parametric dependency will be consuming from a producer with a given coordinate. This is a reverse query as compared to case_of More...
 
template<typename Coord >
int get_result_id (Coord const &skeleton_size, Coord const &coord) const
 
Op get_op () const
 
get_filter () const
 
template<typename Coord , typename Span >
void configure (Coord &&cur_coord, Span &&span)
 

Public Types

using op_type = Op
 

Static Public Attributes

static constexpr std::size_t in_port_size = i
 
static constexpr std::size_t op_arity = i
 

Detailed Description

template<typename Op, int i, std::size_t dims, typename F, typename Mappers, bool SetResult>
class stapl::skeletons::skeletons_impl::zip_pd< Op, i, dims, F, Mappers, SetResult >

A zip parametric dependency is usually used in zip skeleton. It sends input with the same index of each flow to the given Op.

Example - the inputs to a spawned element created by this skeleton would be:

Template Parameters
Opthe workfunction to be applied on each element
ithe number of input flows
See also
zip

Member Function Documentation

◆ case_of()

template<typename Op , int i, std::size_t dims, typename F , typename Mappers , bool SetResult>
template<typename Coord , typename Visitor , typename In >
void stapl::skeletons::skeletons_impl::zip_pd< Op, i, dims, F, Mappers, SetResult >::case_of ( Coord const &  ,
Coord const &  coord,
Visitor &  visitor,
In &&  in_flow 
) const

If coord is <idx, ...> it wraps the Op with the following inputs and sends it to the visitor along with the m_op.

  • in<0>[idx]
  • in<1>[idx]
  • ...
Parameters
coord<i, j, k, ...> where i < n, j < m, k < p
visitorthe information about Op and input is passed so that later this information can be converted to a node in the dependence graph
in_flowa tuple of input flows to consume from

◆ consumer_count()

template<typename Op , int i, std::size_t dims, typename F , typename Mappers , bool SetResult>
template<typename Size , typename Coord , typename FlowIndex >
std::size_t stapl::skeletons::skeletons_impl::zip_pd< Op, i, dims, F, Mappers, SetResult >::consumer_count ( Size const &  ,
Coord const &  ,
FlowIndex   
) const

determines how many of the instances of this parametric dependency will be consuming from a producer with a given coordinate. This is a reverse query as compared to case_of

Template Parameters
FlowIndexthe flow index to which this request is sent

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