I am working on a feature which needs to keep track of a bit-map of length 96. I use this map to program asic below. Is there a standard integer type to hold 96 bits. For 64 bits, we have unsigned long long. Anything similar for 96 bits? Any alternate suggestion welcome as well.
PS: This is Cisco OS based on linux. Language is C.
I'd probably go with an array of 3 uint's. That should be fast enough, and not a lot more complex.
EG, to set a bit:
wordNo = i / 32
bitNo = i - (32*wordNo)
mask = 2 ** bitNo
array[wordNo] |= mask
...or thereabout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With