|
Blender V5.0
|
#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 |
| BitSpan | drop_front (const int64_t n) const |
| BitSpan | drop_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 72 of file BLI_bit_span.hh.
|
default |
Construct an empty span.
Referenced by blender::bits::BoundedBitSpan::BoundedBitSpan(), blender::bits::BoundedBitSpan::BoundedBitSpan(), blender::bits::BoundedBitSpan::BoundedBitSpan(), drop_back(), drop_front(), slice(), take_back(), and take_front().
|
inline |
Definition at line 84 of file BLI_bit_span.hh.
References bit_range_, data(), and data_.
|
inline |
Definition at line 88 of file BLI_bit_span.hh.
References bit_range(), bit_range_, data(), and data_.
|
inline |
Definition at line 148 of file BLI_bit_span.hh.
References bit_range_, and data_.
|
inline |
Definition at line 143 of file BLI_bit_span.hh.
References bit_range_.
Referenced by BitSpan(), blender::bits::BoundedBitSpan::BoundedBitSpan(), blender::bits::is_bounded_span(), blender::bits::tests::TEST(), and blender::bits::try_get_bounded_span().
|
inline |
Definition at line 138 of file BLI_bit_span.hh.
References data_.
Referenced by BitSpan(), BitSpan(), blender::bits::BitVector< InlineBufferCapacity, Allocator >::BitVector(), blender::bits::BoundedBitSpan::BoundedBitSpan(), blender::bits::BoundedBitSpan::BoundedBitSpan(), blender::bits::tests::TEST(), and blender::bits::try_get_bounded_span().
|
inline |
Definition at line 133 of file BLI_bit_span.hh.
References bit_range_, BitSpan(), and data_.
|
inline |
Definition at line 128 of file BLI_bit_span.hh.
References bit_range_, BitSpan(), and data_.
|
inline |
Definition at line 153 of file BLI_bit_span.hh.
References bit_range_, and data_.
|
inline |
Definition at line 101 of file BLI_bit_span.hh.
References bit_range_.
Referenced by blender::bits::tests::TEST().
|
inline |
Definition at line 96 of file BLI_bit_span.hh.
References bit_range_.
Referenced by 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 106 of file BLI_bit_span.hh.
References bit_range_, BLI_assert, and data_.
|
inline |
Number of bits referenced by the span.
Definition at line 91 of file BLI_bit_span.hh.
References bit_range_.
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::bits::is_bounded_span(), blender::bits::operator<<(), blender::bits::tests::TEST(), blender::bits::tests::TEST(), and blender::bits::try_get_bounded_span().
|
inlinenodiscard |
Definition at line 113 of file BLI_bit_span.hh.
References bit_range_, BitSpan(), and data_.
Referenced by blender::bits::tests::TEST().
|
inline |
Definition at line 123 of file BLI_bit_span.hh.
References bit_range_, BitSpan(), and data_.
|
inline |
Definition at line 118 of file BLI_bit_span.hh.
References bit_range_, BitSpan(), and data_.
|
protected |
The range of referenced bits.
Definition at line 78 of file BLI_bit_span.hh.
Referenced by begin(), bit_range(), BitSpan(), BitSpan(), drop_back(), drop_front(), 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 76 of file BLI_bit_span.hh.
Referenced by begin(), BitSpan(), BitSpan(), data(), drop_back(), drop_front(), end(), operator[](), slice(), take_back(), take_front(), and blender::bits::BoundedBitSpan::take_front().