Currently the C++ AMP Algorithms Library is split up into two headers and namespaces, one containing the C++ AMP equivalents of many common Standard Library (STL) algorithms, the other more C++ AMP specific features. This split may
be removed in a later release.
Functions in bold are implemented in the current
0.9.3 Release. Functions that are crossed out are currently not on the proposed roadmap, this may change in the future. For details of new features added to the upcoming
0.9.4 release see the release notes.
The algorithms library uses an array_view_iterator (defined in amp_iterators.h) to implement the containers and algorithms design used by the Standard Library.
If you are not familiar with the Standard Library further details can be found on
MSDN’s STL Header Files page.
* The accumulate algorithm was intentionally removed from the set of C++ AMP STL algorithms due to its semantics. It has been replaced with
reduce. A parallel reduce implementation requires associativity of the reduction operation while the accumulate method's semantics do not have this requirement. Hence we chose to not provide
accumulate and instead provide a reduce method that imposes the associativity requirement.
** The partial_sum algorithm was intentionally removed from the set of C++ AMP STL algorithms due to its semantics. It has been replaced with
This header contains declarations for many common functions from the STL functional header.
In addition it also contains C++ AMP specific implementations—using
array_view<> or array<> containers as parameters, rather than iterators—for the following functions:
- fill – Fill each element of a an array_view with the same value.
- generate - Assigns the values generated by a function object to each element in an
- padded_read – Safely read from a padded array_view.
- padded_write – Safely write to a padded array_view.
- radix_sort – Implementation of
radix sort on the elements of an array_view.
- reduce – Implementation of
reduce (also called fold) on the elements of an array_view. The replaces the STL
- map_reduce – Implementation of
map-reduce on the elements of an array_view. This replaces the STL
- scan – Implementation of
prefix sum (also called cumulative sum) on the elements in an array. Both Direct3D and C++ AMP standard implementations are supported. This replaces the STL
- transform - Applies a specified function object to each element in a source
array_view or to a pair of elements from two source array_views and copies the return values of the function object into a destination