You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
@@ -43,7 +43,7 @@ namespace embree
|
||||
template<typename Index, typename Value, typename Func, typename Reduction>
|
||||
__forceinline Value parallel_reduce( const Index first, const Index last, const Index minStepSize, const Value& identity, const Func& func, const Reduction& reduction )
|
||||
{
|
||||
#if defined(TASKING_INTERNAL)
|
||||
#if defined(TASKING_INTERNAL) || (defined(TASKING_GCD) && defined(BUILD_IOS))
|
||||
|
||||
/* fast path for small number of iterations */
|
||||
Index taskCount = (last-first+minStepSize-1)/minStepSize;
|
||||
@@ -58,15 +58,19 @@ namespace embree
|
||||
const Value v = tbb::parallel_reduce(tbb::blocked_range<Index>(first,last,minStepSize),identity,
|
||||
[&](const tbb::blocked_range<Index>& r, const Value& start) { return reduction(start,func(range<Index>(r.begin(),r.end()))); },
|
||||
reduction,context);
|
||||
if (context.is_group_execution_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
// -- GODOT start --
|
||||
// if (context.is_group_execution_cancelled())
|
||||
// throw std::runtime_error("task cancelled");
|
||||
// -- GODOT end --
|
||||
return v;
|
||||
#else
|
||||
const Value v = tbb::parallel_reduce(tbb::blocked_range<Index>(first,last,minStepSize),identity,
|
||||
[&](const tbb::blocked_range<Index>& r, const Value& start) { return reduction(start,func(range<Index>(r.begin(),r.end()))); },
|
||||
reduction);
|
||||
if (tbb::task::self().is_cancelled())
|
||||
throw std::runtime_error("task cancelled");
|
||||
// -- GODOT start --
|
||||
// if (tbb::task::self().is_cancelled())
|
||||
// throw std::runtime_error("task cancelled");
|
||||
// -- GODOT end --
|
||||
return v;
|
||||
#endif
|
||||
#else // TASKING_PPL
|
||||
|
||||
Reference in New Issue
Block a user