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 + 7) / 8)
#define CAPACITY
A very simple bump allocator making use of a provided fixed size buffer (e.g. statically allocated).
Definition template.h:17

Definition at line 3 of file utils.h.

◆ DC_BITSET_STATIC_INDEX_TO_BYTES

#define DC_BITSET_STATIC_INDEX_TO_BYTES ( INDEX)
Value:
(INDEX >> 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:
(1 << OFFSET)

Definition at line 6 of file utils.h.