STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::skeletons::spans::reduce_to_pow_two< OnSpan > Struct Template Reference

In some skeletons it is required to spawn as many elements as the closest smaller power of two. This span defines that behavior. More...

Public Member Functions

template<typename Spawner , typename... Views>
void set_size (Spawner const &spawner, Views const &... views)
 
template<typename Coord >
bool should_spawn (Coord const &, Coord const &coord) const
 

Public Types

using size_type = typename OnSpan::size_type
 
using dimension_type = typename OnSpan::dimension_type
 

Detailed Description

template<typename OnSpan>
struct stapl::skeletons::spans::reduce_to_pow_two< OnSpan >

In some skeletons it is required to spawn as many elements as the closest smaller power of two. This span defines that behavior.

For example, in a reduction tree of 20 elements, one needs to use a reduction tree that has 16 leaves. In order to do that the size of the input should be changed to the closest smaller power of two.

Template Parameters
OnSpanthe span on which this tree is defined

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