|
Blender V4.3
|
#include <BLI_bit_span.hh>
Inherited by blender::bits::BoundedBitSpan.
Public Member Functions | |
| BitSpan ()=default | |
| BitSpan (const BitInt *data, const int64_t size_in_bits) | |
| BitSpan (const BitInt *data, const IndexRange bit_range) | |
| int64_t | size () const |
| bool | is_empty () const |
| IndexRange | index_range () const |
| BitRef | operator[] (const int64_t index) const |
| BitSpan | slice (const IndexRange range) const |
| BitSpan | take_front (const int64_t n) const |
| BitSpan | take_back (const int64_t n) const |
| const BitInt * | data () const |
| const IndexRange & | bit_range () const |
| BitIterator | begin () const |
| BitIterator | end () const |
Protected Attributes | |
| const BitInt * | data_ = nullptr |
| IndexRange | bit_range_ = {0, 0} |
Similar to #Span, but references a range of bits instead of normal C++ types (which must be at least one byte large). Use #MutableBitSpan if the values are supposed to be modified.
The beginning and end of a BitSpan does not have to be at byte/int boundaries. It can start and end at any bit.
Definition at line 68 of file BLI_bit_span.hh.
|
default |
Construct an empty span.
Definition at line 80 of file BLI_bit_span.hh.
|
inline |
Definition at line 84 of file BLI_bit_span.hh.
|
inline |
Definition at line 134 of file BLI_bit_span.hh.
References bit_range_, data_, and blender::IndexRange::start().
|
inline |
Definition at line 129 of file BLI_bit_span.hh.
References bit_range_.
Referenced by blender::bits::bits_to_index_ranges(), blender::bits::is_bounded_span(), blender::bits::tests::TEST(), and blender::bits::try_get_bounded_span().
|
inline |
Definition at line 124 of file BLI_bit_span.hh.
References data_.
Referenced by blender::bits::bits_to_index_ranges(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector(), blender::bits::tests::TEST(), and blender::bits::try_get_bounded_span().
|
inline |
Definition at line 139 of file BLI_bit_span.hh.
References bit_range_, data_, and blender::IndexRange::one_after_last().
|
inline |
Definition at line 97 of file BLI_bit_span.hh.
References bit_range_, and blender::IndexRange::size().
Referenced by blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::draw::extract_set_bits(), blender::index_mask::IndexMask::from_bits(), and blender::bits::tests::TEST().
|
inline |
Definition at line 92 of file BLI_bit_span.hh.
References bit_range_, and blender::IndexRange::is_empty().
Referenced by blender::bits::bits_to_index_ranges(), 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::draw::extract_edge_factor_mesh(), blender::bke::subdiv::initialize_manifold_index_array(), and blender::bits::tests::TEST().
Definition at line 102 of file BLI_bit_span.hh.
References bit_range_, BLI_assert, data_, blender::IndexRange::size(), and blender::IndexRange::start().
|
inline |
Number of bits referenced by the span.
Definition at line 87 of file BLI_bit_span.hh.
References bit_range_, and blender::IndexRange::size().
Referenced by blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::bits::MutableBitSpan::copy_from(), blender::bits::MutableBitSpan::copy_from(), blender::bits::MutableBoundedBitSpan::copy_from(), blender::bits::MutableBoundedBitSpan::copy_from(), blender::index_mask::IndexMask::from_bits(), blender::bits::is_bounded_span(), blender::bke::pbvh::merge_child_bounds(), blender::bits::operator<<(), blender::bits::tests::TEST(), blender::bits::tests::TEST(), and blender::bits::try_get_bounded_span().
|
inlinenodiscard |
Definition at line 109 of file BLI_bit_span.hh.
References bit_range_, data_, and blender::IndexRange::slice().
Referenced by blender::index_mask::IndexMask::from_bits(), and blender::bits::tests::TEST().
Definition at line 119 of file BLI_bit_span.hh.
References bit_range_, data_, and blender::IndexRange::take_back().
Definition at line 114 of file BLI_bit_span.hh.
References bit_range_, data_, and blender::IndexRange::take_front().
|
protected |
The range of referenced bits.
Definition at line 74 of file BLI_bit_span.hh.
Referenced by begin(), bit_range(), end(), blender::bits::BoundedBitSpan::final_bits_num(), blender::bits::BoundedBitSpan::full_ints_num(), index_range(), is_empty(), blender::bits::BoundedBitSpan::offset(), operator[](), size(), slice(), take_back(), take_front(), and blender::bits::BoundedBitSpan::take_front().
|
protected |
Base pointer to the integers containing the bits. The actual bit span might start at a much higher address when bit_range_.start() is large.
Definition at line 72 of file BLI_bit_span.hh.
Referenced by begin(), data(), end(), operator[](), slice(), take_back(), take_front(), and blender::bits::BoundedBitSpan::take_front().