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::butterfly_pd< Op, F, is_position_aware, is_reversed > Class Template Reference

A butterfly parametric dependency defines the dependencies for each element in a big butterfly skeleton. Some algorithms that use butterfly_pd need to know the location of the element in the big butterfly skeleton. An example is DIT FFT algorithm that changes the computation based on the location of the parametric dependency. For the same reason is_position_aware should be specified by user in such cases. In addition, in some cases one would like to read partially from the inputs on a butterfly. That's when the the F (filter) can be used. More...

Public Member Functions

 butterfly_pd (Op op, F f)
 
template<typename Coord , typename Visitor , typename In >
void case_of (Coord const &skeleton_size, Coord const &coord, Visitor &visitor, In &&in_flow) const
 If coord is <i, h, ...> 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 &skeleton_size, 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...
 
Op get_op () const
 
Op get_filter () const
 
template<typename Coord >
int get_result_id (Coord const &, Coord const &) const
 
template<typename Coord , typename Span >
void configure (Coord &&, Span &&)
 

Public Types

using op_type = Op
 

Static Public Attributes

static constexpr std::size_t in_port_size = 1
 
static constexpr std::size_t op_arity = 2
 

Detailed Description

template<typename Op, typename F, bool is_position_aware, bool is_reversed = false>
class stapl::skeletons::skeletons_impl::butterfly_pd< Op, F, is_position_aware, is_reversed >

A butterfly parametric dependency defines the dependencies for each element in a big butterfly skeleton. Some algorithms that use butterfly_pd need to know the location of the element in the big butterfly skeleton. An example is DIT FFT algorithm that changes the computation based on the location of the parametric dependency. For the same reason is_position_aware should be specified by user in such cases. In addition, in some cases one would like to read partially from the inputs on a butterfly. That's when the the F (filter) can be used.

Template Parameters
Opthe workfunction to be applied on each element in the big butterfly skeleton
Fthe filter to be applied on the input edges
is_position_awareif the computation in the workfunction is dependent on the position of the element
See also
butterfly

Member Function Documentation

◆ case_of()

template<typename Op , typename F , bool is_position_aware, bool is_reversed = false>
template<typename Coord , typename Visitor , typename In >
void stapl::skeletons::skeletons_impl::butterfly_pd< Op, F, is_position_aware, is_reversed >::case_of ( Coord const &  skeleton_size,
Coord const &  coord,
Visitor &  visitor,
In &&  in_flow 
) const

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

  • in<0>[i]
  • in<0>[butterflied_index(i)]
Parameters
skeleton_size<n, m, p, ...> where each element is potentially multi-dimensional.
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
See also
butterflied_index

◆ consumer_count()

template<typename Op , typename F , bool is_position_aware, bool is_reversed = false>
template<typename Size , typename Coord , typename FlowIndex >
std::size_t stapl::skeletons::skeletons_impl::butterfly_pd< Op, F, is_position_aware, is_reversed >::consumer_count ( Size const &  skeleton_size,
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: