libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
struct | GblBitView |
Macros | |
#define | GBL_BIT_VIEW_BPW |
#define | GBL_BIT_VIEW_BYTES(bits) |
#define | GBL_BIT_VIEW_WORDS(bits) |
Functions | |
GblBitView * | GblBitView_fromBuffer (GblBitView *pSelf, void *pBuffer, size_t bitCount, size_t offset) |
GblBitView * | GblBitView_fromView (GblBitView *pSelf, const GblBitView *pView, size_t count, size_t offset) |
const char * | GblBitView_string (const GblBitView *pSelf, GblStringBuffer *pBuffer, size_t index, size_t count) |
uint64_t | GblBitView_uint64 (const GblBitView *pSelf, size_t index, size_t count) |
GblBitView * | GblBitView_setString (GblBitView *pSelf, const char *pString, size_t index, size_t count) |
GblBitView * | GblBitView_setUint64 (GblBitView *pSelf, uint64_t value, size_t index, size_t count) |
size_t | GblBitView_bytes (const GblBitView *pSelf) |
size_t | GblBitView_words (const GblBitView *pSelf) |
GblBool | GblBitView_at (const GblBitView *pSelf, size_t index) |
size_t | GblBitView_count (const GblBitView *pSelf, size_t index, size_t count) |
GblBool | GblBitView_any (const GblBitView *pSelf, size_t index, size_t count) |
GblBool | GblBitView_all (const GblBitView *pSelf, size_t index, size_t count) |
GblBool | GblBitView_none (const GblBitView *pSelf, size_t index, size_t count) |
GblBitView * | GblBitView_assign (GblBitView *pSelf, GblBool value, size_t index, size_t count) |
GblBitView * | GblBitView_set (GblBitView *pSelf, size_t index, size_t count) |
GblBitView * | GblBitView_reset (GblBitView *pSelf, size_t index, size_t count) |
GblBitView * | GblBitView_flip (GblBitView *pSelf, size_t index, size_t count) |
GblBitView * | GblBitView_rotate (GblBitView *pSelf, ptrdiff_t n, size_t offset, size_t count) |
GblBitView * | GblBitView_shiftLeft (GblBitView *pSelf, const GblBitView *pSrc, size_t amount) |
GblBitView * | GblBitView_shiftRight (GblBitView *pSelf, const GblBitView *pSrc, size_t amount) |
GblBitView bitvector view container and related functions.
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 in file gimbal_bit_view.h.
#define GBL_BIT_VIEW_BPW |
Definition at line 14 of file gimbal_bit_view.h.
#define GBL_BIT_VIEW_BYTES | ( | bits | ) |
Definition at line 15 of file gimbal_bit_view.h.
#define GBL_BIT_VIEW_WORDS | ( | bits | ) |
Definition at line 16 of file gimbal_bit_view.h.