This class abstracts the semantics of a non-complete binary tree by exposing only the necessary information in its representation. More...
Public Member Functions | |
binary_tree (Op const &op) | |
Op | get_op (void) const |
Public Types | |
using | op_type = Op |
using | skeleton_tag_type = tags::binary_tree< Tag > |
using | base_type = decltype(skeletons::compose(skeletons::reduce_to_pow_two< Span >(std::declval< Op >()), skeletons_impl::binary_tree< Op, Flows, spans::nearest_pow_two< Span >, Tag, true >(std::declval< Op >()))) |
This class abstracts the semantics of a non-complete binary tree by exposing only the necessary information in its representation.
This skeleton is used in several composed skeletons such as a reduce
skeleton.
This abstraction not only makes the reconstruction of a binary_tree skeleton easier, but also provides access to the underlying reduction operation. Furthermore, it reduces the symbol size for a binary_tree skeleton, hence, reducing the total compilation time.
Op | the operation to be used for reduction. |
Flows | the flow between the levels of the binary tree. |
Span | the iteration space for the elements in each level of each level. |