Tis parametric dependency is used in the broadcast tree of Blelloch scan, in which each element applies the operation on inputs from the previous level of the tree and inputs from the reduction tree. Blelloch scan is an exclusive scan algorithm.
More...
|
| scan_blelloch_broadcast_pd (Op op, T initial_value) |
|
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, level, ...> and skeleton_size is <n, m, p, ...> it wraps the WF with the following inputs and sends it to the visitor: if (i + 1) % 2m-level+1 == 0 then the given m_op is used: More...
|
|
template<typename Size , typename Coord , typename FlowIndex > |
std::size_t | consumer_count (Size const &skeleton_size, Coord const &producer_coord, 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 Size , typename Coord > |
std::size_t | consumer_count (Size const &, Coord const &, std::integral_constant< int, 0 >) const |
|
Op | get_op () const |
|
template<typename Coord > |
int | get_result_id (Coord const &, Coord const &) const |
|
template<typename Coord , typename Span > |
void | configure (Coord &&, Span &&) |
|
|
static constexpr std::size_t | in_port_size = 3 |
|
static constexpr std::size_t | op_arity = 2 |
|
template<typename Op, typename T>
class stapl::skeletons::skeletons_impl::scan_blelloch_broadcast_pd< Op, T >
Tis parametric dependency is used in the broadcast tree of Blelloch scan, in which each element applies the operation on inputs from the previous level of the tree and inputs from the reduction tree. Blelloch scan is an exclusive scan algorithm.
- Template Parameters
-
Op | the operation that is used in each element |
T | the type of the initial value |
- See also
- Prefix Sums and Their Applications, Guy E. Blelloch
-
scan_blelloch
◆ case_of()
template<typename Op , typename T >
template<typename Coord , typename Visitor , typename In >
If coord is <i, level, ...> and skeleton_size is <n, m, p, ...> it wraps the WF
with the following inputs and sends it to the visitor: if (i + 1) % 2m-level+1 == 0 then the given m_op
is used:
- level == 0 ? constant(initial_value) : in<0>(i)
- in<1>[(i - 2m - level, m-level-1)]
else stapl::identity
is used instead of m_op
- level == 0 ? constant(initial_value) : in<0>(i + 2m-level)
- Parameters
-
skeleton_size | <n, m, p, ...> where each element is potentially multi-dimensional. |
coord | <i, j, k, ...> where i < n, j < m, k < p |
visitor | the information about WF and input is passed so that later this information can be converted to a node in the dependence graph |
in_flow | a tuple of input flows to consume from |
◆ consumer_count() [1/2]
template<typename Op , typename T >
template<typename Size , typename Coord , typename FlowIndex >
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.
- Parameters
-
skeleton_size | the size of this skeleton |
producer_coord | the coordinate of the producer element which is providing data to this parametric dependency |
- Template Parameters
-
FlowIndex | the flow index on which this request is sent |
◆ consumer_count() [2/2]
template<typename Op , typename T >
template<typename Size , typename Coord >
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.
This specialization is used when the request is only sent to the first input flow of the current skeleton.
- Template Parameters
-
FlowIndex | the flow index to which this request is sent |
The documentation for this class was generated from the following file:
- scan_blelloch_broadcast_pd.hpp