Blender V4.3
blender::bits::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::bits::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 19 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 43 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 45 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 50 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 62 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 69 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 133 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 128 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

◆ index_range()

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

◆ is_empty()

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

Definition at line 108 of file BLI_bit_group_vector.hh.

References blender::bits::BitGroupVector< InlineBufferCapacity, Allocator >::size().

Referenced by BKE_pbvh_sync_visibility_from_verts(), BKE_subdiv_ccg_foreach_visible_grid_vert(), BKE_subdiv_ccg_grid_hidden_ensure(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::cloth::calc_visible_vert_indices_grids(), blender::ed::sculpt_paint::mask::copy_old_hidden_mask_grids(), blender::bke::pbvh::count_grid_quads(), blender::draw::pbvh::create_lines_index_grids(), blender::draw::pbvh::create_lines_index_grids_flat_layout(), blender::draw::pbvh::create_tri_index_grids(), blender::draw::pbvh::create_tri_index_grids_flat_layout(), blender::ed::sculpt_paint::boundary::edit_data_init_grids(), blender::ed::sculpt_paint::flood_fill::FillDataGrids::execute(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::sculpt_paint::boundary::get_closest_boundary_vert_grids(), blender::ed::sculpt_paint::hide::grids_show_all(), blender::ed::sculpt_paint::pose::grow_factors_grids(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::ed::sculpt_paint::boundary::is_vert_in_editable_boundary_grids(), blender::bke::pbvh::node_raycast_grids(), blender::bke::pbvh::node_update_visibility_grids(), blender::bke::pbvh::pbvh_grids_node_nearest_to_ray(), blender::ed::sculpt_paint::undo::restore_mask_from_undo_step(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::ed::sculpt_paint::undo::store_vert_visibility_grids(), and blender::bke::pbvh::update_visibility_grids().

◆ 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 81 of file BLI_bit_group_vector.hh.

References blender::move_assign_container().

◆ 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 76 of file BLI_bit_group_vector.hh.

References blender::copy_assign_container().

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ size()

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

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