11 # if defined(WIN32) && !defined(NOMINMAX)
15 # define TBB_MIN_MAX_CLEANUP
17 # include <tbb/blocked_range.h>
18 # include <tbb/parallel_for.h>
19 # include <tbb/parallel_for_each.h>
20 # include <tbb/parallel_invoke.h>
21 # include <tbb/parallel_reduce.h>
22 # include <tbb/task_arena.h>
27 # ifdef TBB_MIN_MAX_CLEANUP
38 template<
typename Range,
typename Function>
44 for (
auto &value : range) {
50 template<
typename Function>
53 if (range.
size() == 0) {
58 if (range.
size() >= grain_size) {
61 [&](
const tbb::blocked_range<int64_t> &subrange) {
62 function(IndexRange(subrange.begin(), subrange.size()));
72 template<
typename Value,
typename Function,
typename Reduction>
75 const Value &identity,
76 const Function &
function,
77 const Reduction &reduction)
80 if (range.
size() >= grain_size) {
84 [&](
const tbb::blocked_range<int64_t> &subrange,
const Value &ident) {
85 return function(IndexRange(subrange.begin(), subrange.size()), ident);
92 return function(range, identity);
113 template<
typename... Functions>
125 template<
typename Function>
void isolate_task(
const Function &
function)
128 tbb::this_task_arena::isolate(
function);
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Value
constexpr int64_t first() const
constexpr int64_t one_after_last() const
constexpr int64_t size() const
void isolate_task(const Function &function)
void parallel_for(IndexRange range, int64_t grain_size, const Function &function)
void parallel_invoke(Functions &&...functions)
void parallel_invoke(const bool use_threading, Functions &&...functions)
Value parallel_reduce(IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction)
void parallel_for_each(Range &range, const Function &function)