27 #ifndef EMBB_ALGORITHMS_FOR_EACH_H_ 28 #define EMBB_ALGORITHMS_FOR_EACH_H_ 30 #include <embb/mtapi/job.h> 31 #include <embb/mtapi/execution_policy.h> 32 #include <embb/algorithms/internal/int_iterator.h> 35 namespace algorithms {
71 template<
typename RAI,
typename Function>
115 template<
typename Integer,
typename Diff,
typename Function>
127 size_t block_size = 0
141 template<
typename RAI>
153 template<
typename RAI,
typename Function>
165 template<
typename RAI,
typename Function>
177 template<
typename RAI,
typename Function>
184 ForEach(first, last, unary, policy, 0);
190 template<
typename Integer,
typename Diff,
typename Function>
199 ForEach(internal::IntIterator<Integer>(first, stride),
200 internal::IntIterator<Integer>(last, stride),
201 unary, policy, block_size);
207 template<
typename Integer,
typename Function>
215 ForLoop(first, last, 1, unary, policy, block_size);
221 template<
typename Integer,
typename Diff,
typename Function>
234 template<
typename Integer,
typename Function>
246 template<
typename RAI,
typename Function>
253 ForLoop(first, last, unary, policy, 0);
256 #endif // else DOXYGEN 265 #include <embb/algorithms/internal/for_each-inl.h> 267 #endif // EMBB_ALGORITHMS_FOR_EACH_H_ void ForEach(RAI first, RAI last, Function unary, const embb::mtapi::ExecutionPolicy &policy=embb::mtapi::ExecutionPolicy(), size_t block_size=0)
Applies a unary function to the elements of a range in parallel.
Definition: lock_free_mpmc_queue.h:40
void ForLoop(Integer first, Integer last, Diff stride=1, Function unary, const embb::mtapi::ExecutionPolicy &policy=embb::mtapi::ExecutionPolicy(), size_t block_size=0)
Applies a unary function to the integers of a range in parallel.
Represents a collection of Actions.
Definition: job.h:41
Describes the execution policy of a parallel algorithm.
Definition: execution_policy.h:48