Home
last modified time | relevance | path

Searched refs:IsPowerOfTwo (Results 1 – 25 of 82) sorted by relevance

1234

/external/libchrome/base/
Dbits_unittest.cc174 EXPECT_FALSE(IsPowerOfTwo(-1)); in TEST()
175 EXPECT_FALSE(IsPowerOfTwo(0)); in TEST()
176 EXPECT_TRUE(IsPowerOfTwo(1)); in TEST()
177 EXPECT_TRUE(IsPowerOfTwo(2)); in TEST()
181 EXPECT_FALSE(IsPowerOfTwo(val - 1)); in TEST()
182 EXPECT_TRUE(IsPowerOfTwo(val)); in TEST()
183 EXPECT_FALSE(IsPowerOfTwo(val + 1)); in TEST()
188 EXPECT_FALSE(IsPowerOfTwo(val - 1)); in TEST()
189 EXPECT_TRUE(IsPowerOfTwo(val)); in TEST()
190 EXPECT_FALSE(IsPowerOfTwo(val + 1)); in TEST()
[all …]
Dbits.h27 constexpr inline bool IsPowerOfTwo(T value) { in IsPowerOfTwo() function
39 DCHECK(IsPowerOfTwo(alignment)); in Align()
/external/v8/src/arm64/
Dutils-arm64.cc77 DCHECK(base::bits::IsPowerOfTwo(width) && (width <= 64)); in CountLeadingZeros()
86 DCHECK(base::bits::IsPowerOfTwo(width) && (width <= 64)); in CountLeadingSignBits()
Dmacro-assembler-arm64-inl.h1198 DCHECK(base::bits::IsPowerOfTwo(unit_size)); in Claim()
1213 DCHECK(unit_size == 0 || base::bits::IsPowerOfTwo(unit_size)); in ClaimBySMI()
1240 DCHECK(base::bits::IsPowerOfTwo(unit_size)); in Drop()
1282 DCHECK(unit_size == 0 || base::bits::IsPowerOfTwo(unit_size)); in DropBySMI()
/external/compiler-rt/lib/asan/
Dasan_flags.cc145 CHECK(IsPowerOfTwo(f->redzone)); in InitializeFlags()
146 CHECK(IsPowerOfTwo(f->max_redzone)); in InitializeFlags()
Dasan_allocator.cc44 CHECK(IsPowerOfTwo(rz_size)); in RZSize2Log()
250 CHECK(IsPowerOfTwo(options.min_redzone)); in CheckOptions()
251 CHECK(IsPowerOfTwo(options.max_redzone)); in CheckOptions()
341 CHECK(IsPowerOfTwo(alignment)); in Allocate()
/external/v8/src/ic/
Dstub-cache.cc23 DCHECK(base::bits::IsPowerOfTwo(kPrimaryTableSize)); in Initialize()
24 DCHECK(base::bits::IsPowerOfTwo(kSecondaryTableSize)); in Initialize()
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_common.h440 INLINE bool IsPowerOfTwo(uptr x) { in IsPowerOfTwo() function
446 if (IsPowerOfTwo(size)) return size; in RoundUpToPowerOfTwo()
455 RAW_CHECK(IsPowerOfTwo(boundary)); in RoundUpTo()
468 CHECK(IsPowerOfTwo(x)); in Log2()
Dsanitizer_posix.cc152 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDie()
153 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDie()
Dsanitizer_win.cc118 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDie()
119 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDie()
/external/v8/src/objects/
Dhash-table.h114 DCHECK(base::bits::IsPowerOfTwo(size)); in NON_EXPORTED_BASE()
210 STATIC_ASSERT(v8::base::bits::IsPowerOfTwo(kMaxRegularCapacity));
Dname.h121 static_assert(base::bits::IsPowerOfTwo(kMaxCachedArrayIndexLength + 1),
/external/libchrome/base/sampling_heap_profiler/
Dlock_free_address_hash_set.cc15 DCHECK(bits::IsPowerOfTwo(buckets_count)); in LockFreeAddressHashSet()
/external/gemmlowp/internal/
Dcommon.h297 struct IsPowerOfTwo { struct
/external/vulkan-validation-layers/layers/
Dvk_layer_utils.h117 static inline bool IsPowerOfTwo(unsigned x) { return x && !(x & (x - 1)); }
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dtiled_dot_emitter.cc244 CHECK(tile_rows() > 0 && IsPowerOfTwo(static_cast<uint64>(tile_rows()))); in ColumnMajorMatrixVectorProductEmitter()
469 CHECK(tile_cols() > 0 && IsPowerOfTwo(static_cast<uint64>(tile_cols()))); in RowMajorMatrixVectorProductEmitter()
706 IsPowerOfTwo(static_cast<uint64>(max_vectorization_width()))); in TiledSmallGemmEmitter()
709 IsPowerOfTwo(static_cast<uint64>(min_vectorization_width()))); in TiledSmallGemmEmitter()
/external/v8/src/base/utils/
Drandom-number-generator.cc86 if (bits::IsPowerOfTwo(max)) { in NextInt()
/external/compiler-rt/lib/scudo/
Dscudo_allocator.cpp320 if (!IsPowerOfTwo(Alignment)) { in allocate()
590 CHECK(IsPowerOfTwo(Alignment)); in scudoAlignedAlloc()
/external/v8/src/base/
Dhashmap.h300 DCHECK(base::bits::IsPowerOfTwo(capacity_)); in Probe()
336 DCHECK(base::bits::IsPowerOfTwo(capacity)); in Initialize()
Dbits.h136 constexpr inline bool IsPowerOfTwo(T value) { in IsPowerOfTwo() function
/external/v8/src/compiler/
Dgap-resolver.cc100 if (reps && !base::bits::IsPowerOfTwo(reps)) { in Resolve()
Dmachine-operator-reducer.cc800 if (base::bits::IsPowerOfTwo(Abs(divisor))) { in ReduceInt32Div()
840 if (base::bits::IsPowerOfTwo(divisor)) { // x / 2^n => x >> n in ReduceUint32Div()
867 if (base::bits::IsPowerOfTwo(divisor)) { in ReduceInt32Mod()
903 if (base::bits::IsPowerOfTwo(divisor)) { // x % 2^n => x & 2^n-1 in ReduceUint32Mod()
/external/v8/src/snapshot/
Dserializer-common.h91 static_assert(base::bits::IsPowerOfTwo(kSize), "kSize must be power of two");
/external/v8/src/
Dallocation.cc110 DCHECK(base::bits::IsPowerOfTwo(alignment)); in AlignedAlloc()
Dassembler.cc377 DCHECK(m >= 2 && base::bits::IsPowerOfTwo(m)); in DataAlign()

1234