[Bf-blender-cvs] [14d0b57be7e] master: Cleanup: Use array_utils to copy evaluated field array
Hans Goudey
noreply at git.blender.org
Tue Nov 22 19:50:00 CET 2022
Commit: 14d0b57be7e0fa3f789abab6faee2fed53d8bb59
Author: Hans Goudey
Date: Tue Nov 22 12:49:51 2022 -0600
Branches: master
https://developer.blender.org/rB14d0b57be7e0fa3f789abab6faee2fed53d8bb59
Cleanup: Use array_utils to copy evaluated field array
===================================================================
M source/blender/functions/intern/field.cc
===================================================================
diff --git a/source/blender/functions/intern/field.cc b/source/blender/functions/intern/field.cc
index d2205864945..554f1a6f036 100644
--- a/source/blender/functions/intern/field.cc
+++ b/source/blender/functions/intern/field.cc
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include "BLI_array_utils.hh"
#include "BLI_index_mask_ops.hh"
#include "BLI_map.hh"
#include "BLI_multi_value_map.hh"
@@ -468,11 +469,7 @@ Vector<GVArray> evaluate_fields(ResourceScope &scope,
}
/* Still have to copy over the data in the destination provided by the caller. */
if (dst_varray.is_span()) {
- /* Materialize into a span. */
- threading::parallel_for(mask.index_range(), 2048, [&](const IndexRange range) {
- computed_varray.materialize_to_uninitialized(mask.slice(range),
- dst_varray.get_internal_span().data());
- });
+ array_utils::copy(computed_varray, mask, dst_varray.get_internal_span());
}
else {
/* Slower materialize into a different structure. */
More information about the Bf-blender-cvs
mailing list