Cleanup: Use array_utils to copy evaluated field array
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user