This class abstracts the semantics of a reduce to power-of-two skeleton by exposing only the necessary information in its representation. More...
Public Member Functions | |
reduce_to_pow_two (Op const &op) | |
Op | get_op (void) const |
Public Types | |
using | skeleton_tag_type = tags::reduce_to_pow_two |
using | base_type = decltype(skeletons::elem< Span >(skeletons::reduce_to_pow_two_pd(std::declval< Op >()))) |
This class abstracts the semantics of a reduce to power-of-two skeleton by exposing only the necessary information in its representation.
A reduce_to_pow_two skeleton converts the input to its closest power-of-two size by combining input elements using the operation provided.
This abstraction not only makes the reconstruction of a reduce_to_pow_two skeleton easier, but also provides access to the underlying operation in the reduce skeleton. Furthermore, it reduces the symbol size for a reduce_to_pow_two skeleton, hence, reducing the total compilation time.
Op | the operation to be used while reducing the input. |
Span | the iteration space for the elements. |