| 48 | /// \see transform() |
| 49 | template<class InputIterator, class UnaryFunction> |
| 50 | inline UnaryFunction for_each(InputIterator first, |
| 51 | InputIterator last, |
| 52 | UnaryFunction function, |
| 53 | command_queue &queue = system::default_queue()) |
| 54 | { |
| 55 | detail::for_each_kernel<InputIterator, UnaryFunction> kernel(first, last, function); |
| 56 | |
| 57 | kernel.exec(queue); |
| 58 | |
| 59 | return function; |
| 60 | } |
| 61 | |
| 62 | } // end compute namespace |
| 63 | } // end boost namespace |