Home
last modified time | relevance | path

Searched refs:kBits (Results 1 – 2 of 2) sorted by relevance

/art/libartbase/base/
Dbit_vector_test.cc26 const size_t kBits = 32; in TEST() local
28 BitVector bv(kBits, false, Allocator::GetMallocAllocator()); in TEST()
35 EXPECT_EQ(0U, bv.NumSetBits(kBits)); in TEST()
36 for (size_t i = 0; i < kBits; i++) { in TEST()
46 bv.SetBit(kBits - 1); in TEST()
49 EXPECT_EQ(2U, bv.NumSetBits(kBits)); in TEST()
51 for (size_t i = 1; i < kBits - 1; i++) { in TEST()
54 EXPECT_TRUE(bv.IsBitSet(kBits - 1)); in TEST()
63 EXPECT_EQ(kBits - 1u, *iterator); in TEST()
Dbit_utils.h264 template <size_t kBits, typename T>
266 static_assert(kBits > 0, "kBits cannot be zero."); in IsInt()
267 static_assert(kBits <= BitSizeOf<T>(), "kBits must be <= max."); in IsInt()
271 return (kBits == BitSizeOf<T>()) ? in IsInt()
273 (-GetIntLimit<T>(kBits) <= value) && (value < GetIntLimit<T>(kBits)); in IsInt()
276 template <size_t kBits, typename T>
278 static_assert(kBits > 0, "kBits cannot be zero."); in IsUint()
279 static_assert(kBits <= BitSizeOf<T>(), "kBits must be <= max."); in IsUint()
287 (kBits == BitSizeOf<T>() || in IsUint()
288 (static_cast<unsigned_type>(value) <= GetIntLimit<unsigned_type>(kBits) * 2u - 1u)); in IsUint()
[all …]