This parametric dependency is used in the postprocessing phase of various algorithms that only accept power-of-two input sizes.
More...
|
| expand_from_pow_two_pd (Op op, F filter) |
|
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) and i < 2*r the following input 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 Coord > |
int | get_result_id (Coord const &skeleton_size, Coord const &coord) const |
|
Op | get_op () const |
|
F | get_filter () const |
|
template<typename Coord , typename Span > |
void | configure (Coord &&, Span &&) |
|
|
static constexpr std::size_t | in_port_size = 1 |
|
static constexpr std::size_t | op_arity = 1 |
|
template<typename Op, typename F, bool is_position_aware, bool SetResult>
class stapl::skeletons::skeletons_impl::expand_from_pow_two_pd< Op, F, is_position_aware, SetResult >
This parametric dependency is used in the postprocessing phase of various algorithms that only accept power-of-two input sizes.
This parametric dependency is used in various algorithms such as broadcast
to propagate the results of a power-of-two skeleton to an arbitrary size.
- Template Parameters
-
Op | the workfunction to be applied on each pair of elements |
F | the filter to be applied on the data before expanding |
is_pos_aware | whether the workfunction applied needs to know the position of the splitter in the dependence graph |
- See also
- reduce_to_pow_two_pd
◆ case_of()
template<typename Op , typename F , bool is_position_aware, bool SetResult>
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) and i < 2*r the following input is used:
Otherwise the following input is used:
- 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 F , bool is_position_aware, bool SetResult>
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:
- expand_from_pow_two_pd.hpp