A scan expansion parametric dependency used for the postprocessing phase of inclusive scan skeletons.
More...
|
| scan_expand_from_pow_two_pd (Op op) |
|
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, ...> it wraps the Op and sends it to the visitor. If q is the closest smaller power of two to n (r = n - q): More...
|
|
template<typename Size , typename Coord , typename FlowIndex > |
std::size_t | consumer_count (Size const &skeleton_size, Coord const &producer_coord, FlowIndex flow_index) 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 &, Coord const &) const |
|
Op | get_op () const |
|
template<typename Coord , typename Span > |
void | configure (Coord &&cur_coord, Span &&span) |
|
|
static constexpr std::size_t | in_port_size = 2 |
|
static constexpr std::size_t | op_arity = 2 |
|
template<typename Op, typename Tag>
class stapl::skeletons::skeletons_impl::scan_expand_from_pow_two_pd< Op, tags::scan< Tag, tags::inclusive > >
A scan expansion parametric dependency used for the postprocessing phase of inclusive scan skeletons.
- Template Parameters
-
Op | the operation to be applied on each pair of elements |
- See also
- scan
◆ case_of()
template<typename Op , typename Tag >
template<typename Coord , typename Visitor , typename In >
If coord is <i, ...> it wraps the Op
and sends it to the visitor. If q is the closest smaller power of two to n (r = n - q):
- if (i == 0) -> identity(in<1>[i])
- else if (i < 2*r && i%2 == 0) -> op(in<0>[i/2], in<1>[i])
- else if (i < 2*r && i%2 == 1) -> identity(in<0>[i/2])
- else if (i > 2*r) -> identity(in<0>[i - r])
- 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 Op 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()
template<typename Op , typename Tag >
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.
- Template Parameters
-
FlowIndex | the flow index to which this request is sent |
The documentation for this class was generated from the following file:
- scan_expand_from_pow_two_pd.hpp