XPoint 0.1.0
Hardware-agnostic crosspoint matrix routing library
Loading...
Searching...
No Matches
BitPool.h File Reference

Flat bit-array pool backed by a uint32_t word array. More...

#include <stdint.h>
#include <string.h>

Go to the source code of this file.

Classes

class  BitPool
 

Macros

#define XPOINT_PACKED
 

Detailed Description

Flat bit-array pool backed by a uint32_t word array.

Packs an arbitrary number of boolean flags into ceil(nBits/32) uint32_t words. Access is by flat bit index; mapping from (row, col) coordinates to index is the caller's responsibility.

Two construction modes:

get() and set() are defined inline here so the compiler can inline the two-instruction bit read/write into the call site.

Macro Definition Documentation

◆ XPOINT_PACKED

#define XPOINT_PACKED