libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
#include <gimbal_bit_view.h>
Data Fields | ||
union { | ||
void * pData | ||
uint8_t * pBytes | ||
uint32_t * pWords | ||
}; | ||
size_t | length | |
uint8_t | offset | |
Mutable view to a field of bits within some block of memory.
GblBitView is a view-based container, which does not own, but simply references, an existing field of bits within another buffer. It provides a comparable API to that of a "BitArray," "BitVector," "BitMap," or "BitSet," as they're often known.
GblBitView allows you to conveniently refer a range of bits as though they were a regular array, allowing you to perform operations on them individually. Certain operations such as count, set, reset, and flip, are implemented with optimized algorithms that operate either per-word or per-byte, rather than requiring iteration over every bit.
Definition at line 53 of file gimbal_bit_view.h.
void* GblBitView::pData |
Definition at line 55 of file gimbal_bit_view.h.
uint8_t* GblBitView::pBytes |
Definition at line 56 of file gimbal_bit_view.h.
uint32_t* GblBitView::pWords |
Definition at line 57 of file gimbal_bit_view.h.
size_t GblBitView::length |
Definition at line 59 of file gimbal_bit_view.h.
uint8_t GblBitView::offset |
Definition at line 60 of file gimbal_bit_view.h.