Home
last modified time | relevance | path

Searched refs:bit_length (Results 1 – 3 of 3) sorted by relevance

/art/libartbase/base/
Dbit_memory_region.h49 ALWAYS_INLINE BitMemoryRegion(MemoryRegion region, size_t bit_offset, size_t bit_length) in BitMemoryRegion() argument
51 *this = Subregion(bit_offset, bit_length); in BitMemoryRegion()
69 ALWAYS_INLINE BitMemoryRegion Subregion(size_t bit_offset, size_t bit_length) const { in Subregion() argument
71 DCHECK_LE(bit_length, bit_size_ - bit_offset); in Subregion()
74 result.bit_size_ = bit_length; in Subregion()
109 ALWAYS_INLINE Result LoadBits(size_t bit_offset, size_t bit_length) const { in LoadBits() argument
114 DCHECK_LE(bit_length, bit_size_ - bit_offset); in LoadBits()
115 DCHECK_LE(bit_length, BitSizeOf<Result>()); in LoadBits()
116 if (bit_length == 0) { in LoadBits()
127 Result extra = data[index + (shift + (bit_length - 1)) / width]; in LoadBits()
[all …]
Dbit_memory_region_test.cc80 for (size_t bit_length = 0; bit_length < sizeof(uint32_t) * kBitsPerByte; ++bit_length) { in TEST() local
85 BitMemoryRegion bmr1(MemoryRegion(&data, sizeof(data)), bit_offset, bit_length); in TEST()
86 bmr1.StoreBits(0, value, bit_length); in TEST()
87 EXPECT_EQ(bmr1.LoadBits(0, bit_length), value); in TEST()
88 CheckBits(data, sizeof(data), initial_value, bit_offset, bit_length, value); in TEST()
92 bmr2.StoreBits(bit_offset, value, bit_length); in TEST()
93 EXPECT_EQ(bmr2.LoadBits(bit_offset, bit_length), value); in TEST()
94 CheckBits(data, sizeof(data), initial_value, bit_offset, bit_length, value); in TEST()
Dbit_table_test.cc147 for (size_t bit_length = 0; bit_length <= BitSizeOf<uint64_t>(); ++bit_length) { in TEST() local
148 uint64_t bitmap = value & MaxInt<uint64_t>(bit_length); in TEST()