Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/array_utils.cc
| Show All 27 Lines | void gather(const GVArray &src, | ||||
| }); | }); | ||||
| } | } | ||||
| void gather(const GSpan src, const IndexMask indices, GMutableSpan dst, const int64_t grain_size) | void gather(const GSpan src, const IndexMask indices, GMutableSpan dst, const int64_t grain_size) | ||||
| { | { | ||||
| gather(GVArray::ForSpan(src), indices, dst, grain_size); | gather(GVArray::ForSpan(src), indices, dst, grain_size); | ||||
| } | } | ||||
| void invert_booleans(MutableSpan<bool> span) | |||||
| { | |||||
| threading::parallel_for(span.index_range(), 4096, [&](IndexRange range) { | |||||
| for (const int i : range) { | |||||
| span[i] = !span[i]; | |||||
| } | |||||
| }); | |||||
| } | |||||
| } // namespace blender::array_utils | } // namespace blender::array_utils | ||||