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 >()))) |
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.
Op | the operation to be used to compute the scan results |