Blender V5.0
blender::linear_allocator::ChunkedListSegment< T, Capacity > Struct Template Reference

#include <BLI_linear_allocator_chunked_list.hh>

Public Attributes

ChunkedListSegmentnext = nullptr
int64_t size = 0
std::array< TypedBuffer< T >, Capacity > values

Detailed Description

template<typename T, int64_t Capacity>
struct blender::linear_allocator::ChunkedListSegment< T, Capacity >

The list is a linked list of segments containing multiple elements. The capacity of each segment is a template parameter because that removes the need to store it for every segment.

Definition at line 23 of file BLI_linear_allocator_chunked_list.hh.

Member Data Documentation

◆ next

template<typename T, int64_t Capacity>
ChunkedListSegment* blender::linear_allocator::ChunkedListSegment< T, Capacity >::next = nullptr

Pointer to the next segment in the list.

Definition at line 25 of file BLI_linear_allocator_chunked_list.hh.

Referenced by blender::linear_allocator::ChunkedList< T, SegmentCapacity >::append_as().

◆ size

template<typename T, int64_t Capacity>
int64_t blender::linear_allocator::ChunkedListSegment< T, Capacity >::size = 0

Number of constructed elements in this segment. The constructed elements are always at the beginning of the array below.

Definition at line 30 of file BLI_linear_allocator_chunked_list.hh.

◆ values

template<typename T, int64_t Capacity>
std::array<TypedBuffer<T>, Capacity> blender::linear_allocator::ChunkedListSegment< T, Capacity >::values

The memory that actually contains the values in the end. The values are constructed and destructed by higher level code.

Definition at line 35 of file BLI_linear_allocator_chunked_list.hh.


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