MCPcopy Create free account
hub / github.com/RenderKit/embree / parallel_for_affinity

Function parallel_for_affinity

common/algorithms/parallel_for.h:125–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124 template<typename Index, typename Func>
125 __forceinline void parallel_for_affinity( const Index N, const Func& func, tbb::affinity_partitioner& ap)
126 {
127 #if TBB_INTERFACE_VERSION >= 12002
128 tbb::task_group_context context;
129 tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
130 func(i);
131 },ap,context);
132 if (context.is_group_execution_cancelled())
133 throw std::runtime_error("task cancelled");
134 #else
135 tbb::parallel_for(Index(0),N,Index(1),[&](Index i) {
136 func(i);
137 },ap);
138 if (tbb::task::self().is_cancelled())
139 throw std::runtime_error("task cancelled");
140 #endif
141 }
142
143#else
144

Callers 1

tbbRadixIterationMethod · 0.85

Calls 1

parallel_forFunction · 0.85

Tested by

no test coverage detected