WIP: Functions: new local allocator for better memory reuse and performance #104630

Draft
Jacques Lucke wants to merge 44 commits from JacquesLucke/blender:local-allocator into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 4d1966291c - Show all commits

View File

@ -268,7 +268,8 @@ class Executor {
BLI_task_pool_free(task_pool);
}
threading::parallel_for(node_states_.index_range(), 1024, [&](const IndexRange range) {
LocalPool<> &local = pools.pools->local();
LocalPool<> &local = (range.size() == node_states_.size()) ? *pools.local :
pools.pools->local();
for (const int node_index : range) {
const Node &node = *self_.graph_.nodes()[node_index];
NodeState &node_state = *node_states_[node_index];