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::inclusive_scan< Op, tags::binomial > Struct Template Reference

Binomial scan is one of the common implementations of MPI_Scan. More...

Public Member Functions

 inclusive_scan (Op const &op)
 
Op get_op () const
 
std::size_t operator() (std::size_t a)
 
std::size_t operator() (std::size_t a)
 

Public Types

using skeleton_tag_type = tags::scan< tags::binomial, tags::inclusive >
 
using base_type = decltype(skeletons::compose< flows::repeat_flows::input_wrapper< flows::compose_flows::input_to_all > >(skeletons::repeat< flows::repeat_flows::output_from_all >(skeletons::elem< spans::binomial_tree< spans::balanced<>, tags::up_phase > >(skeletons::binomial_tree_pd< tags::up_phase >(std::declval< Op >())), log_lazysize< 2 >()), skeletons::repeat< flows::repeat_flows::scan_broadcast >(skeletons::elem< spans::binomial_tree< spans::balanced<>, tags::down_phase > >(skeletons::binomial_tree_pd< tags::down_phase >(std::declval< Op >())), log_ceil_lazysize< 2 >())))
 

Detailed Description

template<typename Op>
struct stapl::skeletons::skeletons_impl::inclusive_scan< Op, tags::binomial >

Binomial scan is one of the common implementations of MPI_Scan.

A binomial scan consists of an up-phase and a down-phase. In the up-phase, one or more reduction trees (depending on whether the input size is a power-of-two or not) reduce the values and prepare partial results for the down-phase. In the down-phase, partial results are combined to produce the final result.

O O O O O O
|\| |\| |\|
| O_| O | O
| | |\| | |
| | | O | |
| | | | | |
| | | O | |
| | | |\|_|
| O | O | O
| |\| |\| |
O O O O O O
Template Parameters
Opthe operation to be used to compute the scan results
See also
flows::repeat_flows::output_from_all
flows::repeat_flows::
flows::scan_f::scan_broadcast
spans::binomial_tree
binomial_tree_pd

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