17 #ifndef __UTIL_TBB_H__
18 #define __UTIL_TBB_H__
24 #include <tbb/enumerable_thread_specific.h>
25 #include <tbb/parallel_for.h>
26 #include <tbb/task_arena.h>
27 #include <tbb/task_group.h>
29 #if TBB_INTERFACE_VERSION_MAJOR >= 10
30 # define WITH_TBB_GLOBAL_CONTROL
31 # include <tbb/global_control.h>
36 using tbb::blocked_range;
37 using tbb::enumerable_thread_specific;
42 #if TBB_INTERFACE_VERSION_MAJOR >= 12
43 tbb::task_group_context *ctx = tbb::task::current_context();
45 ctx->cancel_group_execution();
#define CCL_NAMESPACE_END
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
static void parallel_for_cancel()