10#ifndef KLEE_BITARRAY_H
11#define KLEE_BITARRAY_H
23 static uint32_t
length(
unsigned size) {
return (size+31)/32; }
34 bool get(
unsigned idx) {
return (
bool) ((
bits[idx/32]>>(idx&0x1F))&1); }
35 void set(
unsigned idx) {
bits[idx/32] |= 1<<(idx&0x1F); }
36 void unset(
unsigned idx) {
bits[idx/32] &= ~(1<<(idx&0x1F)); }
37 void set(
unsigned idx,
bool value) {
if (value)
set(idx);
else unset(idx); }
static uint32_t length(unsigned size)
BitArray(const BitArray &b, unsigned size)
void set(unsigned idx, bool value)
BitArray(unsigned size, bool value=false)