Derive-C
Loading...
Searching...
No Matches
utils.h File Reference

Go to the source code of this file.

Macros

#define DC_BITSET_STATIC_CAPACITY_TO_BYTES(CAPACITY)
#define DC_BITSET_STATIC_INDEX_TO_BYTES(INDEX)
#define DC_BITSET_STATIC_INDEX_TO_OFFSET(INDEX)
#define DC_BITSET_STATIC_OFFSET_TO_MASK(OFFSET)

Macro Definition Documentation

◆ DC_BITSET_STATIC_CAPACITY_TO_BYTES

#define DC_BITSET_STATIC_CAPACITY_TO_BYTES ( CAPACITY)
Value:
((CAPACITY + 7ULL) / 8ULL)
#define CAPACITY
A hybrid of a bump allocator on a statically allocated buffer, and any other allocator.
Definition template.h:18

Definition at line 3 of file utils.h.

◆ DC_BITSET_STATIC_INDEX_TO_BYTES

#define DC_BITSET_STATIC_INDEX_TO_BYTES ( INDEX)
Value:
(INDEX >> (uint8_t)3)

Definition at line 4 of file utils.h.

◆ DC_BITSET_STATIC_INDEX_TO_OFFSET

#define DC_BITSET_STATIC_INDEX_TO_OFFSET ( INDEX)
Value:
(INDEX & 0x7)

Definition at line 5 of file utils.h.

◆ DC_BITSET_STATIC_OFFSET_TO_MASK

#define DC_BITSET_STATIC_OFFSET_TO_MASK ( OFFSET)
Value:
(uint8_t)((uint8_t)1 << (uint8_t)OFFSET)

Definition at line 6 of file utils.h.