Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2023. The current version is 1.91.0.
boost::compute::make_transform_iterator
// In header: <boost/compute/iterator/transform_iterator.hpp> template<typename InputIterator, typename UnaryFunction> transform_iterator< InputIterator, UnaryFunction > make_transform_iterator(InputIterator iterator, UnaryFunction transform);
Returns a transform_iterator for iterator with transform.
For example, to create an iterator which returns the square-root of each value in a vector<int>:
auto sqrt_iterator = make_transform_iterator(vec.begin(), sqrt<int>());
Parameters: |
|
||||
Returns: |
a |