Blender V4.3
blender::offset_indices::GroupedSpan< T > Struct Template Reference

#include <BLI_offset_indices.hh>

Public Member Functions

 GroupedSpan ()=default
 
 GroupedSpan (OffsetIndices< int > offsets, Span< T > data)
 
Span< Toperator[] (const int64_t index) const
 
int64_t size () const
 
IndexRange index_range () const
 
bool is_empty () const
 

Public Attributes

OffsetIndices< intoffsets
 
Span< Tdata
 

Detailed Description

template<typename T>
struct blender::offset_indices::GroupedSpan< T >

References many separate spans in a larger contiguous array. This gives a more efficient way to store many grouped arrays, without requiring many small allocations, giving the general benefits of using contiguous memory.

Note
If the offsets are shared between many GroupedSpan objects, it will still be more efficient to retrieve the #IndexRange only once and slice each span.

Definition at line 115 of file BLI_offset_indices.hh.

Constructor & Destructor Documentation

◆ GroupedSpan() [1/2]

template<typename T >
blender::offset_indices::GroupedSpan< T >::GroupedSpan ( )
default

◆ GroupedSpan() [2/2]

template<typename T >
blender::offset_indices::GroupedSpan< T >::GroupedSpan ( OffsetIndices< int > offsets,
Span< T > data )
inline

Member Function Documentation

◆ index_range()

◆ is_empty()

template<typename T >
bool blender::offset_indices::GroupedSpan< T >::is_empty ( ) const
inline

Definition at line 140 of file BLI_offset_indices.hh.

References blender::Span< T >::size().

Referenced by face_edge_loop_islands_calc().

◆ operator[]()

template<typename T >
Span< T > blender::offset_indices::GroupedSpan< T >::operator[] ( const int64_t index) const
inline

Definition at line 125 of file BLI_offset_indices.hh.

References blender::Span< T >::slice().

◆ size()

Member Data Documentation

◆ data

◆ offsets


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