Bolt  1.3
C++ template library with support for OpenCL
Namespaces | Functions
for_each.h File Reference

for_each applies the function object f to each element in the range [first, last); f's return value, if any, is ignored. More...

#include <bolt/amp/bolt.h>
#include <bolt/amp/detail/for_each.inl>

Go to the source code of this file.

Namespaces

namespace  bolt
 Defining namespace for the Bolt project.
 
namespace  bolt::amp
 Namespace containing AMP related data types and functions.
 

Functions

template<typename InputIterator , typename UnaryFunction >
InputIterator bolt::amp::for_each (InputIterator first, InputIterator last, UnaryFunction f)
 ForEach applies the unary function f to each element in the range [first,last] without modifying the input sequence.
 
template<typename InputIterator , typename UnaryFunction >
InputIterator bolt::amp::for_each (control &ctl, InputIterator first, InputIterator last, UnaryFunction f)
 
template<typename InputIterator , typename Size , typename UnaryFunction >
InputIterator bolt::amp::for_each_n (InputIterator first, Size n, UnaryFunction f)
 ForEach_n applies the unary function f to each element in the range [first,first+n] without modifying the input sequence.
 
template<typename InputIterator , typename Size , typename UnaryFunction >
InputIterator bolt::amp::for_each_n (control &ctl, InputIterator first, Size n, UnaryFunction f)
 

Detailed Description

for_each applies the function object f to each element in the range [first, last); f's return value, if any, is ignored.

Unlike the C++ Standard Template Library function std::for_each, this version offers no guarantee on order of execution. For this reason, this version of for_each does not return a copy of the function object..