Blender V4.3
blender::index_mask::ParallelSegmentsCollector Struct Reference

Classes

struct  LocalData
 

Public Member Functions

void reduce (LinearAllocator<> &main_allocator, Vector< IndexMaskSegment, 16 > &main_segments)
 

Public Attributes

threading::EnumerableThreadSpecific< LocalDatadata_by_thread
 

Detailed Description

Utility to generate segments on multiple threads and to reduce the result in the end.

Definition at line 376 of file index_mask.cc.

Member Function Documentation

◆ reduce()

void blender::index_mask::ParallelSegmentsCollector::reduce ( LinearAllocator<> & main_allocator,
Vector< IndexMaskSegment, 16 > & main_segments )
inline

Move ownership of memory allocated from all threads to #main_allocator. Also, extend #main_segments with the segments created on each thread. The segments are also sorted to make sure that they are in the correct order.

Definition at line 389 of file index_mask.cc.

References b, blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), data_by_thread, blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::extend(), blender::parallel_sort(), and blender::LinearAllocator< Allocator >::transfer_ownership_from().

Referenced by blender::index_mask::IndexMask::from_batch_predicate(), blender::index_mask::IndexMask::from_indices(), and blender::index_mask::detail::from_predicate_impl().

Member Data Documentation

◆ data_by_thread

threading::EnumerableThreadSpecific<LocalData> blender::index_mask::ParallelSegmentsCollector::data_by_thread

The documentation for this struct was generated from the following file: