BitVecAllocator
Description
Allocator backing the bitvector’s storage.
Parameters
| Name | Direction | Description |
|---|---|---|
bv |
in | Bitvector to query. |
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Convert.h:228:
///
#define BitVecTryToStr(...) OVERLOAD(BitVecTryToStr, __VA_ARGS__)
#define BitVecTryToStr_2(out, bv) bitvec_try_to_str((out), (bv), BitVecAllocator((bv)))
#define BitVecTryToStr_3(out, bv, alloc) bitvec_try_to_str((out), (bv), (alloc))- In
Convert.h:243:
///
#define BitVecToStr(...) OVERLOAD(BitVecToStr, __VA_ARGS__)
#define BitVecToStr_1(bv) bitvec_to_str((bv), BitVecAllocator((bv)))
#define BitVecToStr_2(bv, alloc) bitvec_to_str((bv), (alloc))- In
Access.h:21:
/// TAGS: Int, Access, Allocator
///
#define IntAllocator(value) BitVecAllocator(&(value)->bits)
#ifdef __cplusplus- In
Io.c:3223:
StrIterDataAt(&si, StrIterIndex(&hex_saved)),
StrIterIndex(&si) - StrIterIndex(&hex_saved),
BitVecAllocator(bv)
);
u64 value;- In
Io.c:3240:
bit_len = 4;
*bv = BitVecFromInteger(value, bit_len, BitVecAllocator(bv));
StrDeinit(&hex_str);
return StrIterDataAt(&si, StrIterIndex(&si));- In
Io.c:3264:
StrIterDataAt(&si, StrIterIndex(&oct_saved)),
StrIterIndex(&si) - StrIterIndex(&oct_saved),
BitVecAllocator(bv)
);
u64 value;- In
Io.c:3278:
bit_len = 3;
*bv = BitVecFromInteger(value, bit_len, BitVecAllocator(bv));
StrDeinit(&oct_str);
return StrIterDataAt(&si, StrIterIndex(&si));- In
Io.c:3298:
StrIterDataAt(&si, StrIterIndex(&bin_saved)),
StrIterIndex(&si) - StrIterIndex(&bin_saved),
BitVecAllocator(bv)
);- In
Io.c:3301:
);
*bv = BitVecFromStr(StrBegin(&bin_str), BitVecAllocator(bv));
StrDeinit(&bin_str);- In
Memory.c:265:
// configuration fields on the base allocator.
bool result = BitVecLen(&clone) == BitVecLen(&original) && BitVecCapacity(&clone) >= BitVecLen(&original) &&
BitVecAllocator(&clone) == BitVecAllocator(&original) &&
BitVecAllocator(&clone)->allocate == BitVecAllocator(&original)->allocate &&
BitVecAllocator(&clone)->remap == BitVecAllocator(&original)->remap &&- In
Memory.c:266:
bool result = BitVecLen(&clone) == BitVecLen(&original) && BitVecCapacity(&clone) >= BitVecLen(&original) &&
BitVecAllocator(&clone) == BitVecAllocator(&original) &&
BitVecAllocator(&clone)->allocate == BitVecAllocator(&original)->allocate &&
BitVecAllocator(&clone)->remap == BitVecAllocator(&original)->remap &&
BitVecAllocator(&clone)->deallocate == BitVecAllocator(&original)->deallocate &&- In
Memory.c:267:
BitVecAllocator(&clone) == BitVecAllocator(&original) &&
BitVecAllocator(&clone)->allocate == BitVecAllocator(&original)->allocate &&
BitVecAllocator(&clone)->remap == BitVecAllocator(&original)->remap &&
BitVecAllocator(&clone)->deallocate == BitVecAllocator(&original)->deallocate &&
BitVecAllocator(&clone)->effort == BitVecAllocator(&original)->effort &&- In
Memory.c:268:
BitVecAllocator(&clone)->allocate == BitVecAllocator(&original)->allocate &&
BitVecAllocator(&clone)->remap == BitVecAllocator(&original)->remap &&
BitVecAllocator(&clone)->deallocate == BitVecAllocator(&original)->deallocate &&
BitVecAllocator(&clone)->effort == BitVecAllocator(&original)->effort &&
BitVecAllocator(&clone)->retry_limit == BitVecAllocator(&original)->retry_limit &&- In
Memory.c:269:
BitVecAllocator(&clone)->remap == BitVecAllocator(&original)->remap &&
BitVecAllocator(&clone)->deallocate == BitVecAllocator(&original)->deallocate &&
BitVecAllocator(&clone)->effort == BitVecAllocator(&original)->effort &&
BitVecAllocator(&clone)->retry_limit == BitVecAllocator(&original)->retry_limit &&
BitVecGet(&clone, 0) == true && BitVecGet(&clone, 1) == false && BitVecGet(&clone, 2) == true;- In
Memory.c:270:
BitVecAllocator(&clone)->deallocate == BitVecAllocator(&original)->deallocate &&
BitVecAllocator(&clone)->effort == BitVecAllocator(&original)->effort &&
BitVecAllocator(&clone)->retry_limit == BitVecAllocator(&original)->retry_limit &&
BitVecGet(&clone, 0) == true && BitVecGet(&clone, 1) == false && BitVecGet(&clone, 2) == true;- In
Convert.c:280:
Str str;
bool ok = BitVecTryFromStr(&bv, "101001", ALLOCATOR_OF(&alloc));
bool result = ok && (BitVecAllocator(&bv)->effort == alloc.base.effort) &&
(BitVecAllocator(&bv)->retry_limit == alloc.base.retry_limit);- In
Convert.c:281:
bool ok = BitVecTryFromStr(&bv, "101001", ALLOCATOR_OF(&alloc));
bool result = ok && (BitVecAllocator(&bv)->effort == alloc.base.effort) &&
(BitVecAllocator(&bv)->retry_limit == alloc.base.retry_limit);
ok = BitVecTryToStr(&str, &bv);
Last updated on