|
template<typename Tag = tags::binomial, typename Op > |
result_of::scan< tags::scan< Tag, tags::inclusive >, Op > | stapl::skeletons::scan (Op &&op) |
| A scan skeleton which is specialized based on the tag given.
|
|
template<typename Tag = tags::blelloch, typename Op , typename T > |
result_of::scan< tags::scan< Tag, tags::exclusive >, Op > | stapl::skeletons::scan (Op &&op, T const &initial_value) |
| In an exclusive scan each element in the result is the result of the cumulative operation on all elements before it. More...
|
|
template<typename ValueType , typename Tag = tags::binomial, typename Op > |
result_of::scan_reduce< ValueType, Tag, tags::inclusive, Op > | stapl::skeletons::scan_reduce (Op &&op) |
| This skeleton combines the functionality of inclusive_scan skeleton and reduce_to_locs skeletons. More...
|
|
template<typename ValueType , typename Tag = tags::blelloch, typename Op > |
result_of::scan_reduce< ValueType, Tag, tags::exclusive, Op > | stapl::skeletons::scan_reduce (Op &&op, ValueType const &initial_value) |
| This skeleton combines the functionality of exclusive_scan skeleton and reduce_to_locs skeletons. More...
|
|
template<typename Tag = tags::blelloch, typename Op , typename T >
In an exclusive scan each element in the result is the result of the cumulative operation on all elements before it.
For example, if + is used as the operation, each element in the output is the sum of all elements before it, and the first element is the neutral value. An exclusive scan of [1, 2, 3, 4, ...] would be [0, 1, 3, 6, 10, ...].
- Parameters
-
op | the operation to be used to compute the scan results |
initial_value | the value for the first element of the output |
- Template Parameters
-
Tag | the type of exclusive scan to be used |
- Returns
- an exclusive scan specified by the
Tag
- See also
- exclusive_scan
template<typename ValueType , typename Tag = tags::binomial, typename Op >
result_of::scan_reduce<ValueType, Tag, tags::inclusive, Op> stapl::skeletons::scan_reduce |
( |
Op && |
op | ) |
|
This skeleton combines the functionality of inclusive_scan
skeleton and reduce_to_locs
skeletons.
This skeleton is useful in cases when we both need the result of scan over the inputs and the reduction of input values. It avoids doing an extra iteration over the data.
- Parameters
-
op | the operation to be used to compute the scan results |
- Template Parameters
-
Tag | the type of exclusive scan to be used |
- Returns
- an exclusive scan specified by the
Tag
- See also
- inclusive_scan
-
scan
-
reduce_to_locs
template<typename ValueType , typename Tag = tags::blelloch, typename Op >
result_of::scan_reduce<ValueType, Tag, tags::exclusive, Op> stapl::skeletons::scan_reduce |
( |
Op && |
op, |
|
|
ValueType const & |
initial_value |
|
) |
| |
This skeleton combines the functionality of exclusive_scan
skeleton and reduce_to_locs
skeletons.
This skeleton is useful in cases when we both need the result of scan over the inputs and the reduction of input values. It avoids doing an extra iteration over the data.
- Parameters
-
op | the operation to be used to compute the scan results |
initial_value | the value for the first element of the output |
- Template Parameters
-
Tag | the type of exclusive scan to be used |
- Returns
- an exclusive scan specified by the
Tag
- See also
- exclusive_scan
-
scan
-
reduce_to_locs