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
Io.c:3089:
StrIterDataAt(&si, StrIterIndex(&hex_saved)),
StrIterIndex(&si) - StrIterIndex(&hex_saved),
BitVecAllocator(bv)
);
u64 value;- In
Io.c:3106:
bit_len = 4;
*bv = BitVecFromInteger(value, bit_len, BitVecAllocator(bv));
StrDeinit(&hex_str);
return StrIterDataAt(&si, StrIterIndex(&si));- In
Io.c:3130:
StrIterDataAt(&si, StrIterIndex(&oct_saved)),
StrIterIndex(&si) - StrIterIndex(&oct_saved),
BitVecAllocator(bv)
);
u64 value;- In
Io.c:3144:
bit_len = 3;
*bv = BitVecFromInteger(value, bit_len, BitVecAllocator(bv));
StrDeinit(&oct_str);
return StrIterDataAt(&si, StrIterIndex(&si));- In
Io.c:3164:
StrIterDataAt(&si, StrIterIndex(&bin_saved)),
StrIterIndex(&si) - StrIterIndex(&bin_saved),
BitVecAllocator(bv)
);- In
Io.c:3167:
);
*bv = BitVecFromStr(StrBegin(&bin_str), BitVecAllocator(bv));
StrDeinit(&bin_str); // 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 && 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 && 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 && 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 && 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; 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; 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); 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);- In
Access.h:21:
/// TAGS: Int, Access, Allocator
///
#define IntAllocator(value) BitVecAllocator(&(value)->bits)
#ifdef __cplusplus- 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))
Last updated on