...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::adjacent_difference
// In header: <boost/compute/algorithm/adjacent_difference.hpp> template<typename InputIterator, typename OutputIterator, typename BinaryFunction> OutputIterator adjacent_difference(InputIterator first, InputIterator last, OutputIterator result, BinaryFunction op, command_queue & queue = system::default_queue());
Stores the difference of each pair of consecutive values in the range [first
, last
) to the range beginning at result
. If op
is not provided, minus<T>
is used.
Space complexity: \Omega(1)
Space complexity when result
== first:
\Omega(n)
See Also:
adjacent_find()
Parameters: |
|
||||||||||
Returns: |
|