Blender V5.0
blender::BitGroupVector< InlineBufferCapacity, Allocator > Class Template Reference

#include <BLI_bit_group_vector.hh>

Public Member Functions

 BitGroupVector (Allocator allocator={}) noexcept
 BitGroupVector (NoExceptConstructor, Allocator allocator={}) noexcept
 BitGroupVector (const int64_t size_in_groups, const int64_t group_size, const bool value=false, Allocator allocator={})
 BitGroupVector (const BitGroupVector &other)
 BitGroupVector (BitGroupVector &&other)
BitGroupVectoroperator= (const BitGroupVector &other)
BitGroupVectoroperator= (BitGroupVector &&other)
BoundedBitSpan operator[] (const int64_t i) const
MutableBoundedBitSpan operator[] (const int64_t i)
int64_t size () const
bool is_empty () const
int64_t group_size () const
IndexRange index_range () const
BoundedBitSpan all_bits () const
MutableBoundedBitSpan all_bits ()

Detailed Description

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
class blender::BitGroupVector< InlineBufferCapacity, Allocator >

A BitGroupVector is a compact data structure that allows storing an arbitrary but fixed number of bits per element. For example, it could be used to compactly store 5 bits per vertex in a mesh. The data structure stores the bits in a way so that the BitSpan for every element is bounded according to is_bounded_span. The makes sure that operations on entire groups can be implemented efficiently. For example, one can easy or one group into another.

Definition at line 23 of file BLI_bit_group_vector.hh.

Constructor & Destructor Documentation

◆ BitGroupVector() [1/5]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::BitGroupVector ( Allocator allocator = {})
inlinenoexcept

Definition at line 47 of file BLI_bit_group_vector.hh.

◆ BitGroupVector() [2/5]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::BitGroupVector ( NoExceptConstructor ,
Allocator allocator = {} )
inlinenoexcept

Definition at line 49 of file BLI_bit_group_vector.hh.

◆ BitGroupVector() [3/5]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::BitGroupVector ( const int64_t size_in_groups,
const int64_t group_size,
const bool value = false,
Allocator allocator = {} )
inline

Definition at line 54 of file BLI_bit_group_vector.hh.

◆ BitGroupVector() [4/5]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::BitGroupVector ( const BitGroupVector< InlineBufferCapacity, Allocator > & other)
inline

Definition at line 66 of file BLI_bit_group_vector.hh.

◆ BitGroupVector() [5/5]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::BitGroupVector ( BitGroupVector< InlineBufferCapacity, Allocator > && other)
inline

Definition at line 73 of file BLI_bit_group_vector.hh.

Member Function Documentation

◆ all_bits() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
MutableBoundedBitSpan blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::all_bits ( )
inline

Definition at line 137 of file BLI_bit_group_vector.hh.

◆ all_bits() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BoundedBitSpan blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::all_bits ( ) const
inline

Get all stored bits. Note that this may also contain padding bits. This can be used to e.g. mix multiple BitGroupVector.

Definition at line 132 of file BLI_bit_group_vector.hh.

◆ group_size()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
int64_t blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::group_size ( ) const
inline

Number of bits per group.

Definition at line 118 of file BLI_bit_group_vector.hh.

◆ index_range()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
IndexRange blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::index_range ( ) const
inline

Definition at line 123 of file BLI_bit_group_vector.hh.

◆ is_empty()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
bool blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::is_empty ( ) const
inline

Definition at line 112 of file BLI_bit_group_vector.hh.

◆ operator=() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitGroupVector & blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::operator= ( BitGroupVector< InlineBufferCapacity, Allocator > && other)
inline

Definition at line 85 of file BLI_bit_group_vector.hh.

◆ operator=() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BitGroupVector & blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::operator= ( const BitGroupVector< InlineBufferCapacity, Allocator > & other)
inline

Definition at line 80 of file BLI_bit_group_vector.hh.

◆ operator[]() [1/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
MutableBoundedBitSpan blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::operator[] ( const int64_t i)
inline

Get all the bits at an index.

Definition at line 99 of file BLI_bit_group_vector.hh.

◆ operator[]() [2/2]

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
BoundedBitSpan blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::operator[] ( const int64_t i) const
inline

Get all the bits at an index.

Definition at line 91 of file BLI_bit_group_vector.hh.

◆ size()

template<int64_t InlineBufferCapacity = 64, typename Allocator = GuardedAllocator>
int64_t blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::size ( ) const
inline

Number of groups.

Definition at line 107 of file BLI_bit_group_vector.hh.


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