This class abstracts the semantics of a zip_reduce skeleton by exposing only the necessary information in its representation. More...
Public Member Functions | |
zip_reduce (ZipOp const &zip_op, RedOp const &reduce_op) | |
reduce_op_type | get_reduce_op (void) const |
zip_op_type | get_zip_op (void) const |
Public Types | |
using | skeleton_tag_type = tags::zip_reduce< arity > |
using | base_type = decltype(skeletons::compose(skeletons::zip< arity >(std::declval< ZipOp >()), skeletons::reduce(std::declval< RedOp >()))) |
using | zip_op_type = decltype(std::declval< base_type >(). template get_skeleton< 0 >().get_op()) |
using | reduce_op_type = decltype(std::declval< base_type >(). template get_skeleton< 1 >().get_op()) |
This class abstracts the semantics of a zip_reduce skeleton by exposing only the necessary information in its representation.
A zip_reduce skeleton is a skeleton that first combines the given inputs pairwise and then applies a reduction on the produced results in order to produce one result.
The most used specialization of a zip_reduce is a map_reduce in which only one input is passed in to the skeleton.
This abstraction not only makes the reconstruction of a a zip_reduce skeleton easier, but also reduces the symbol size for a zip_reduce skeleton, hence, reducing the total compilation time.
arity | the arity of the zip skeleton. |
ZipOp | the underlying operation to combine the input element. |
RedOp | the underlying operation to reduce the produced result by the zip skeleton. |