#include <cstdint>
Go to the source code of this file.
no of bits in a long
Definition at line 27 of file bitvec.h.
| #define copy_all_bits |
( |
|
source, |
|
|
|
dest, |
|
|
|
length |
|
) |
| |
Value:{ \
int index; \
\
for (index = 0; index < length; index++) \
dest[index] = source[index]; \
}
Definition at line 49 of file bitvec.h.
| #define set_all_bits |
( |
|
array, |
|
|
|
length |
|
) |
| |
Value:{ \
int index; \
\
for (index = 0; index < length; index++) \
array[index] = ~0; \
}
Definition at line 41 of file bitvec.h.
| #define zero_all_bits |
( |
|
array, |
|
|
|
length |
|
) |
| |
Value:{ \
int index; \
\
for (index = 0; index < length; index++) \
array[index] = 0; \
}
Definition at line 33 of file bitvec.h.
This routine uses realloc to increase the size of the specified bit vector.
Globals:
- Parameters
-
| Vector | bit vector to be expanded |
| NewNumBits | new size of bit vector |
- Returns
- New expanded bit vector.
Definition at line 43 of file bitvec.cpp.
44 return (static_cast<BIT_VECTOR>(
Erealloc(Vector,
#define WordsInVectorOfSize(NumBits)
void * Erealloc(void *ptr, int size)
This routine frees a bit vector. It also decrements the global counter that keeps track of the number of bit vectors allocated. If BitVector is nullptr, then the count is printed to stderr.
Globals:
- BitVectorCount count of number of bit vectors allocated
- Parameters
-
| BitVector | bit vector to be freed |
Definition at line 50 of file bitvec.cpp.
Allocate and return a new bit vector large enough to hold the specified number of bits.
Globals:
- BitVectorCount number of bit vectors allocated
- Parameters
-
| NumBits | number of bits in new bit vector |
- Returns
- New bit vector.
Definition at line 81 of file bitvec.cpp.
82 return (static_cast<BIT_VECTOR>(
Emalloc(
sizeof(uint32_t) *
#define WordsInVectorOfSize(NumBits)