diff options
author | Jacques Lucke <jacques@blender.org> | 2021-09-15 12:02:39 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-09-15 12:02:39 +0300 |
commit | e6ca0545904fe4236be9960fdb3c2760092582a5 (patch) | |
tree | bdc2217126eb5755662ef0ff188d08f7d6d51961 /source/blender/blenlib/BLI_index_mask.hh | |
parent | fb27a9bb983ce74b8d8f5f871cf0706dd1e25051 (diff) |
Geometry Nodes: multi threaded field evaluation
This adds a new `ParallelMultiFunction` which wraps another multi-function
and evaluates it with multiple threads. The speeds up field evaluation
quite a bit (the effect is most noticeable when the number of evaluations
and the field is large).
There are still other single-threaded performance bottlenecks in field
evaluation that will need to be solved separately. Most notably here
is the process of copying the computed data into the position attribute
in the Set Position node.
Differential Revision: https://developer.blender.org/D12457
Diffstat (limited to 'source/blender/blenlib/BLI_index_mask.hh')
-rw-r--r-- | source/blender/blenlib/BLI_index_mask.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_index_mask.hh b/source/blender/blenlib/BLI_index_mask.hh index 7a3169520ca..ad030e127fe 100644 --- a/source/blender/blenlib/BLI_index_mask.hh +++ b/source/blender/blenlib/BLI_index_mask.hh @@ -39,6 +39,7 @@ #include "BLI_index_range.hh" #include "BLI_span.hh" +#include "BLI_vector.hh" namespace blender { @@ -221,6 +222,8 @@ class IndexMask { { return indices_.is_empty(); } + + IndexMask slice_and_offset(IndexRange slice, Vector<int64_t> &r_new_indices) const; }; } // namespace blender |