STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::skeletons::skeletons_impl::zip_reduce< arity, ZipOp, RedOp > Struct Template Reference

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())
 

Detailed Description

template<int arity, typename ZipOp, typename RedOp>
struct stapl::skeletons::skeletons_impl::zip_reduce< arity, ZipOp, RedOp >

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.

Template Parameters
aritythe arity of the zip skeleton.
ZipOpthe underlying operation to combine the input element.
RedOpthe underlying operation to reduce the produced result by the zip skeleton.

The documentation for this struct was generated from the following files: