#include <BLI_bit_ref.hh>
Similar to BitRef, but also allows changing the referenced bit.
Definition at line 125 of file BLI_bit_ref.hh.
◆ MutableBitRef() [1/2]
| blender::bits::MutableBitRef::MutableBitRef |
( |
| ) |
|
|
default |
◆ MutableBitRef() [2/2]
| blender::bits::MutableBitRef::MutableBitRef |
( |
BitInt * | data, |
|
|
const int64_t | bit_index ) |
|
inline |
Reference a specific bit in an array. Note that data does not have to point to the exact int the bit is in.
Definition at line 139 of file BLI_bit_ref.hh.
◆ operator BitRef()
| blender::bits::MutableBitRef::operator BitRef |
( |
| ) |
const |
|
inline |
◆ operator bool()
| blender::bits::MutableBitRef::operator bool |
( |
| ) |
const |
|
inline |
◆ operator&=()
| MutableBitRef & blender::bits::MutableBitRef::operator&= |
( |
const bool | value | ) |
|
|
inline |
◆ operator|=()
| MutableBitRef & blender::bits::MutableBitRef::operator|= |
( |
const bool | value | ) |
|
|
inline |
◆ reset()
| void blender::bits::MutableBitRef::reset |
( |
| ) |
|
|
inline |
◆ set() [1/2]
| void blender::bits::MutableBitRef::set |
( |
| ) |
|
|
inline |
◆ set() [2/2]
| void blender::bits::MutableBitRef::set |
( |
const bool | value | ) |
|
|
inline |
Change the bit to a 1 if #value is true and 0 otherwise. If the value is highly unpredictable by the CPU branch predictor, it can be faster to use set_branchless instead.
Definition at line 191 of file BLI_bit_ref.hh.
◆ set_branchless()
| void blender::bits::MutableBitRef::set_branchless |
( |
const bool | value | ) |
|
|
inline |
Does the same as set, but does not use a branch. This is faster when the input value is unpredictable for the CPU branch predictor (best case for this function is a uniform random distribution with 50% probability for true and false). If the value is predictable, this is likely slower than set.
Definition at line 207 of file BLI_bit_ref.hh.
◆ test()
| bool blender::bits::MutableBitRef::test |
( |
| ) |
const |
|
inline |
Return true when the bit is currently 1 and false otherwise.
Definition at line 159 of file BLI_bit_ref.hh.
The documentation for this class was generated from the following file: