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::reduce< Op, Flows, Span, Tag > Struct Template Reference

This class abstracts the semantics of a reduce skeleton by exposing only the necessary information in its representation. More...

Public Member Functions

 reduce (Op const &op)
 
Op get_op (void) const
 

Public Types

using skeleton_tag_type = tags::reduce< Tag >
 
using op_type = Op
 
using base_type = decltype(skeletons::binary_tree< Tag, Flows, Span >(std::declval< Op >()))
 

Detailed Description

template<typename Op, typename Flows, typename Span, typename Tag>
struct stapl::skeletons::skeletons_impl::reduce< Op, Flows, Span, Tag >

This class abstracts the semantics of a reduce skeleton by exposing only the necessary information in its representation.

A reduce skeleton consists of a reducing the input to the closest power-of-two and then performing a reduction using a binary reduction tree on that. The reduction tree can have several shapes and one can modify its layout by specifying the Tag parameter.

This abstraction not only makes the reconstruction of a reduce skeleton easier, but also provides access to the underlying operation in the reduce skeleton. Furthermore, it reduces the symbol size for a reduce skeleton, hence, reducing the total compilation time.

Template Parameters
Opthe operation to be used while reducing the input.
Flowsthe flow to be used between the levels of the reduction tree.
Spanthe iteration space for the elements in each level of both the reduction to power-of-two and the reduction tree.
Tagdetermines the type of reduction to be used.

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