Home
last modified time | relevance | path

Searched refs:CountLeadingZeroBits (Results 1 – 8 of 8) sorted by relevance

/external/cronet/base/
Dbits_unittest.cc123 EXPECT_EQ(8, CountLeadingZeroBits(uint8_t{0})); in TEST()
124 EXPECT_EQ(7, CountLeadingZeroBits(uint8_t{1})); in TEST()
127 CountLeadingZeroBits(static_cast<uint8_t>(1 << shift))); in TEST()
129 EXPECT_EQ(4, CountLeadingZeroBits(uint8_t{0x0f})); in TEST()
133 EXPECT_EQ(16, CountLeadingZeroBits(uint16_t{0})); in TEST()
134 EXPECT_EQ(15, CountLeadingZeroBits(uint16_t{1})); in TEST()
137 CountLeadingZeroBits(static_cast<uint16_t>(1 << shift))); in TEST()
139 EXPECT_EQ(4, CountLeadingZeroBits(uint16_t{0x0f0f})); in TEST()
143 EXPECT_EQ(32, CountLeadingZeroBits(uint32_t{0})); in TEST()
144 EXPECT_EQ(31, CountLeadingZeroBits(uint32_t{1})); in TEST()
[all …]
Dbits.h91 CountLeadingZeroBits(T value) { in CountLeadingZeroBits() function
119 return 31 - CountLeadingZeroBits(n); in Log2Floor()
127 return (n ? 32 : -1) - CountLeadingZeroBits(n - 1); in Log2Ceiling()
/external/cronet/base/allocator/partition_allocator/partition_alloc_base/
Dbits_pa_unittest.cc121 EXPECT_EQ(8, CountLeadingZeroBits(uint8_t{0})); in TEST()
122 EXPECT_EQ(7, CountLeadingZeroBits(uint8_t{1})); in TEST()
125 CountLeadingZeroBits(static_cast<uint8_t>(1 << shift))); in TEST()
127 EXPECT_EQ(4, CountLeadingZeroBits(uint8_t{0x0f})); in TEST()
131 EXPECT_EQ(16, CountLeadingZeroBits(uint16_t{0})); in TEST()
132 EXPECT_EQ(15, CountLeadingZeroBits(uint16_t{1})); in TEST()
135 CountLeadingZeroBits(static_cast<uint16_t>(1 << shift))); in TEST()
137 EXPECT_EQ(4, CountLeadingZeroBits(uint16_t{0x0f0f})); in TEST()
141 EXPECT_EQ(32, CountLeadingZeroBits(uint32_t{0})); in TEST()
142 EXPECT_EQ(31, CountLeadingZeroBits(uint32_t{1})); in TEST()
[all …]
Dbits.h81 CountLeadingZeroBits(T value) { in CountLeadingZeroBits() function
134 return 31 - CountLeadingZeroBits(n); in Log2Floor()
142 return (n ? 32 : -1) - CountLeadingZeroBits(n - 1); in Log2Ceiling()
/external/libchrome/base/
Dbits_unittest.cc66 EXPECT_EQ(8u, CountLeadingZeroBits(uint8_t{0})); in TEST()
67 EXPECT_EQ(7u, CountLeadingZeroBits(uint8_t{1})); in TEST()
70 CountLeadingZeroBits(static_cast<uint8_t>(1 << shift))); in TEST()
72 EXPECT_EQ(4u, CountLeadingZeroBits(uint8_t{0x0f})); in TEST()
76 EXPECT_EQ(16u, CountLeadingZeroBits(uint16_t{0})); in TEST()
77 EXPECT_EQ(15u, CountLeadingZeroBits(uint16_t{1})); in TEST()
80 CountLeadingZeroBits(static_cast<uint16_t>(1 << shift))); in TEST()
82 EXPECT_EQ(4u, CountLeadingZeroBits(uint16_t{0x0f0f})); in TEST()
86 EXPECT_EQ(32u, CountLeadingZeroBits(uint32_t{0})); in TEST()
87 EXPECT_EQ(31u, CountLeadingZeroBits(uint32_t{1})); in TEST()
[all …]
Dbits.h61 CountLeadingZeroBits(T x) { in CountLeadingZeroBits() function
73 CountLeadingZeroBits(T x) { in CountLeadingZeroBits() function
104 return CountLeadingZeroBits(x); in CountLeadingZeroBits32()
111 return CountLeadingZeroBits(x); in CountLeadingZeroBits64()
126 CountLeadingZeroBits(T value) { in CountLeadingZeroBits() function
147 return CountLeadingZeroBits(x); in CountLeadingZeroBits32()
153 return CountLeadingZeroBits(x); in CountLeadingZeroBits64()
161 return CountLeadingZeroBits(x); in CountLeadingZeroBitsSizeT()
170 return 31 - CountLeadingZeroBits(n); in Log2Floor()
178 return (n ? 32 : -1) - CountLeadingZeroBits(n - 1); in Log2Ceiling()
/external/cronet/base/allocator/partition_allocator/
Dpartition_bucket_lookup.h240 static_cast<size_t>(base::bits::CountLeadingZeroBits(size)); in GetIndexForDenserBuckets()
Dpartition_root.h2128 partition_alloc::internal::base::bits::CountLeadingZeroBits( in AlignedAllocWithFlags()