Orbits
1
|
Go to the source code of this file.
Macros | |
#define | BYTE char |
#define | testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0) |
#define | BITSPERBYTE (8*sizeof(BYTE)) |
#define | NBYTES(nbits) (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE) |
#define | BIT2BYTE(ibit) ((ibit) / BITSPERBYTE) |
#define | BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE) |
#define | BIT2MASK(ibit) (1 << BIT2SHIFT(ibit)) |
#define | BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE) |
Typedefs | |
typedef BYTE * | bitset |
Functions | |
bitset | newbitset (int nbits) |
void | delbitset (bitset bs) |
int | addbit (bitset bs, int ibit) |
int | samebitset (bitset bs1, bitset bs2, int nbits) |
void | mergebitset (bitset bs1, bitset bs2, int nbits) |
#define BIT2BYTE | ( | ibit | ) | ((ibit) / BITSPERBYTE) |
#define BIT2MASK | ( | ibit | ) | (1 << BIT2SHIFT(ibit)) |
#define BIT2SHIFT | ( | ibit | ) | ((ibit) % BITSPERBYTE) |
#define BITSPERBYTE (8*sizeof(BYTE)) |
#define BYTE char |
#define BYTE2BIT | ( | ibyte | ) | ((ibyte) * BITSPERBYTE) |
#define NBYTES | ( | nbits | ) | (((nbits) + BITSPERBYTE - 1) / BITSPERBYTE) |
void delbitset | ( | bitset | bs | ) |
Copyright 2014 Google Inc. All rights reserved.