Go to the documentation of this file.
16 #define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
17 int addbit(bitset bs,
int ibit);
18 int samebitset(bitset bs1, bitset bs2,
int nbits);
19 void mergebitset(bitset bs1, bitset bs2,
int nbits);
21 #define BITSPERBYTE (8*sizeof(BYTE))
22 #define NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE)
24 #define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
25 #define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
26 #define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
27 #define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
Copyright 2014 Google Inc. All rights reserved.