diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-12-22 15:42:46 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-12-22 15:42:46 +0300 |
commit | feb938dfb8e3c8d15fc780fdc408e9154d91d5a9 (patch) | |
tree | 6defc99430797bcb9d7d222f0a295a4f92b073e6 /source/blender/simulations | |
parent | 4b8cd2cebd768e0d711e523cc1f815b1e9dc447d (diff) |
remove task c++ wrapper in favor of tbb
Diffstat (limited to 'source/blender/simulations')
-rw-r--r-- | source/blender/simulations/bparticles/c_wrapper.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/simulations/bparticles/c_wrapper.cpp b/source/blender/simulations/bparticles/c_wrapper.cpp index 8b4b60199f2..f191e7f8a4e 100644 --- a/source/blender/simulations/bparticles/c_wrapper.cpp +++ b/source/blender/simulations/bparticles/c_wrapper.cpp @@ -5,7 +5,6 @@ #include "node_frontend.hpp" #include "BLI_timeit.h" -#include "BLI_task_cxx.h" #include "BLI_string.h" #include "BKE_mesh.h" @@ -18,6 +17,8 @@ #include "DNA_meshdata_types.h" #include "DNA_modifier_types.h" +#include "tbb/tbb.h" + #define WRAPPERS(T1, T2) \ inline T1 unwrap(T2 value) \ { \ @@ -147,8 +148,8 @@ static Mesh *distribute_tetrahedons(ArrayRef<float3> centers, &mesh->ldata, CD_MLOOPCOL, CD_DEFAULT, nullptr, mesh->totloop, "Color"), mesh->totloop); - BLI::Task::parallel_range( - IndexRange(amount), 1000, [mesh, centers, scales, colors, loop_colors](IndexRange range) { + tbb::parallel_for( + tbb::blocked_range<uint>(0, amount, 1000), [&](const tbb::blocked_range<uint> &range) { distribute_tetrahedons_range(mesh, loop_colors, range, centers, scales, colors); }); |