Home
last modified time | relevance | path

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

123

/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/llvm-project/compiler-rt/lib/sanitizer_common/
Dsanitizer_allocator_checks.h46 return alignment != 0 && IsPowerOfTwo(alignment) && in CheckAlignedAllocAlignmentAndSize()
56 return alignment != 0 && IsPowerOfTwo(alignment) && in CheckPosixMemalignAlignment()
Dsanitizer_rtems.cpp174 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
175 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
Dsanitizer_common.h410 inline bool IsPowerOfTwo(uptr x) { in IsPowerOfTwo() function
416 if (IsPowerOfTwo(size)) return size; in RoundUpToPowerOfTwo()
425 RAW_CHECK(IsPowerOfTwo(boundary)); in RoundUpTo()
438 CHECK(IsPowerOfTwo(x)); in Log2()
Dsanitizer_ring_buffer.h95 CHECK(IsPowerOfTwo(size)); in Init()
Dsanitizer_common_libcdep.cpp134 CHECK(IsPowerOfTwo(align)); in InitAligned()
Dsanitizer_posix.cpp85 CHECK(IsPowerOfTwo(size)); in MmapAlignedOrDieOnFatalError()
86 CHECK(IsPowerOfTwo(alignment)); in MmapAlignedOrDieOnFatalError()
/external/perfetto/src/profiling/memory/
Dscoped_spinlock.cc26 constexpr bool IsPowerOfTwo(size_t v) { in IsPowerOfTwo() function
34 static_assert(IsPowerOfTwo(kLockAttemptsPerSleep),
Dmalloc_interceptor_glibc_preload.cc32 bool IsPowerOfTwo(size_t v) { in IsPowerOfTwo() function
72 if (alignment % sizeof(void*) || !IsPowerOfTwo(alignment / sizeof(void*))) { in posix_memalign()
/external/OpenCL-CTS/test_conformance/basic/
Dtest_sizeof.cpp151 static int IsPowerOfTwo( cl_ulong x ){ return 0 == (x & (x-1)); } in IsPowerOfTwo() function
261 if( ! IsPowerOfTwo( test ) ) in test_sizeof()
278 if( ! IsPowerOfTwo( test ) ) in test_sizeof()
314 if( ! IsPowerOfTwo( test ) ) in test_sizeof()
/external/compiler-rt/lib/asan/
Dasan_flags.cc145 CHECK(IsPowerOfTwo(f->redzone)); in InitializeFlags()
146 CHECK(IsPowerOfTwo(f->max_redzone)); in InitializeFlags()
/external/rust/crates/grpcio-sys/grpc/third_party/upb/upbc/
Dmessage_layout.h82 static bool IsPowerOfTwo(size_t val) { in IsPowerOfTwo() function
87 ABSL_ASSERT(IsPowerOfTwo(align)); in Align()
/external/llvm-project/compiler-rt/lib/asan/
Dasan_flags.cpp156 CHECK(IsPowerOfTwo(f->redzone)); in InitializeFlags()
157 CHECK(IsPowerOfTwo(f->max_redzone)); in InitializeFlags()
Dasan_allocator.cpp46 CHECK(IsPowerOfTwo(rz_size)); in RZSize2Log()
325 CHECK(IsPowerOfTwo(options.min_redzone)); in CheckOptions()
326 CHECK(IsPowerOfTwo(options.max_redzone)); in CheckOptions()
509 CHECK(IsPowerOfTwo(alignment)); in Allocate()
1033 if (UNLIKELY(!IsPowerOfTwo(alignment))) { in asan_memalign()
/external/pdfium/third_party/base/
Dbits.h29 constexpr inline bool IsPowerOfTwo(T value) { in IsPowerOfTwo() function
41 DCHECK(IsPowerOfTwo(alignment)); in Align()
/external/perfetto/src/profiling/perf/
Devent_config.cc139 constexpr bool IsPowerOfTwo(size_t v) { in IsPowerOfTwo() function
146 static_assert(IsPowerOfTwo(kDefaultDataPagesPerRingBuffer), ""); in ChooseActualRingBufferPages()
150 if (!IsPowerOfTwo(config_value)) { in ChooseActualRingBufferPages()
Devent_reader.cc47 bool IsPowerOfTwo(size_t v) { in IsPowerOfTwo() function
116 PERFETTO_DCHECK(IsPowerOfTwo(data_page_count)); in Allocate()
Devent_config_unittest.cc36 bool IsPowerOfTwo(size_t v) { in IsPowerOfTwo() function
64 ASSERT_TRUE(IsPowerOfTwo(event_config->ring_buffer_pages())); in TEST()
/external/tensorflow/tensorflow/lite/kernels/
Drfft2d.cc53 bool IsPowerOfTwo(uint32_t v) { return v && !(v & (v - 1)); } in IsPowerOfTwo() function
116 TF_LITE_ENSURE(context, IsPowerOfTwo(fft_length_data[0])); in ResizeOutputandTemporaryTensors()
117 TF_LITE_ENSURE(context, IsPowerOfTwo(fft_length_data[1])); in ResizeOutputandTemporaryTensors()
/external/gemmlowp/internal/
Dcommon.h167 struct IsPowerOfTwo { struct
/external/libchrome/base/sampling_heap_profiler/
Dlock_free_address_hash_set.cc15 DCHECK(bits::IsPowerOfTwo(buckets_count)); in LockFreeAddressHashSet()
/external/llvm-project/libc/test/src/string/memory_utils/
Dutils_test.cpp27 TEST(UtilsTest, IsPowerOfTwo) { in TEST() argument
/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()

123