25 # if defined(WIN32) && !defined(NOMINMAX)
29 # define TBB_MIN_MAX_CLEANUP
31 # include <tbb/blocked_range.h>
32 # include <tbb/parallel_for.h>
33 # include <tbb/parallel_for_each.h>
38 # ifdef TBB_MIN_MAX_CLEANUP
49 template<
typename Range,
typename Function>
55 for (
auto &value : range) {
61 template<
typename Function>
64 if (range.
size() == 0) {
69 [&](
const tbb::blocked_range<int64_t> &subrange) {
70 function(IndexRange(subrange.begin(), subrange.size()));
constexpr int64_t first() const
constexpr int64_t one_after_last() const
constexpr int64_t size() const
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
void parallel_for_each(Range &range, const Function &function)