Home
last modified time | relevance | path

Searched refs:isPowerOfTwo (Results 1 – 25 of 42) sorted by relevance

12

/external/scudo/standalone/
Dwrappers_c_checks.h34 return Alignment == 0 || !isPowerOfTwo(Alignment) || in checkAlignedAllocAlignmentAndSize()
41 return Alignment == 0 || !isPowerOfTwo(Alignment) || in checkPosixMemalignAlignment()
Dcommon.h51 inline bool isPowerOfTwo(uptr X) { return (X & (X - 1)) == 0; } in isPowerOfTwo() function
60 if (isPowerOfTwo(Size)) in roundUpToPowerOfTwo()
74 DCHECK(isPowerOfTwo(X)); in getLog2()
/external/llvm-project/compiler-rt/lib/scudo/standalone/
Dwrappers_c_checks.h34 return Alignment == 0 || !isPowerOfTwo(Alignment) || in checkAlignedAllocAlignmentAndSize()
41 return Alignment == 0 || !isPowerOfTwo(Alignment) || in checkPosixMemalignAlignment()
Dcommon.h51 inline bool isPowerOfTwo(uptr X) { return (X & (X - 1)) == 0; } in isPowerOfTwo() function
60 if (isPowerOfTwo(Size)) in roundUpToPowerOfTwo()
74 DCHECK(isPowerOfTwo(X)); in getLog2()
/external/guava/guava/src/com/google/common/math/
DDoubleMath.java199 public static boolean isPowerOfTwo(double x) { in isPowerOfTwo() method in DoubleMath
249 checkRoundingUnnecessary(isPowerOfTwo(x)); in log2()
255 increment = !isPowerOfTwo(x); in log2()
258 increment = exponent < 0 & !isPowerOfTwo(x); in log2()
261 increment = exponent >= 0 & !isPowerOfTwo(x); in log2()
DBigIntegerMath.java77 public static boolean isPowerOfTwo(BigInteger x) { in isPowerOfTwo() method in BigIntegerMath
96 checkRoundingUnnecessary(isPowerOfTwo(x)); // fall through in log2()
103 return isPowerOfTwo(x) ? logFloor : logFloor + 1; in log2()
DIntMath.java93 public static boolean isPowerOfTwo(int x) { in isPowerOfTwo() method in IntMath
122 checkRoundingUnnecessary(isPowerOfTwo(x)); in log2()
/external/guava/android/guava/src/com/google/common/math/
DDoubleMath.java199 public static boolean isPowerOfTwo(double x) { in isPowerOfTwo() method in DoubleMath
249 checkRoundingUnnecessary(isPowerOfTwo(x)); in log2()
255 increment = !isPowerOfTwo(x); in log2()
258 increment = exponent < 0 & !isPowerOfTwo(x); in log2()
261 increment = exponent >= 0 & !isPowerOfTwo(x); in log2()
DBigIntegerMath.java77 public static boolean isPowerOfTwo(BigInteger x) { in isPowerOfTwo() method in BigIntegerMath
96 checkRoundingUnnecessary(isPowerOfTwo(x)); // fall through in log2()
103 return isPowerOfTwo(x) ? logFloor : logFloor + 1; in log2()
DIntMath.java93 public static boolean isPowerOfTwo(int x) { in isPowerOfTwo() method in IntMath
122 checkRoundingUnnecessary(isPowerOfTwo(x)); in log2()
/external/gwp_asan/gwp_asan/
Dguarded_pool_allocator.cpp37 bool isPowerOfTwo(uintptr_t X) { return (X & (X - 1)) == 0; } in isPowerOfTwo() function
156 assert(isPowerOfTwo(Alignment) && "Alignment must be a power of two!"); in getRequiredBackingSize()
167 assert(isPowerOfTwo(Alignment) && "Alignment must be a power of two!"); in alignUp()
177 assert(isPowerOfTwo(Alignment) && "Alignment must be a power of two!"); in alignDown()
201 if (!isPowerOfTwo(Alignment) || Alignment > State.maximumAllocationSize() || in allocate()
/external/oboe/samples/RhythmGame/src/main/cpp/utils/
DLockFreeQueue.h61 static constexpr bool isPowerOfTwo(uint32_t n) { return (n & (n - 1)) == 0; } in isPowerOfTwo() function
62 static_assert(isPowerOfTwo(CAPACITY), "Capacity must be a power of 2");
/external/oboe/samples/RhythmGame/third_party/glm/gtx/
Dbit.inl49 return isPowerOfTwo(value) ? value : highestBitValue(value) << 1;
64 return isPowerOfTwo(value) ? value : highestBitValue(value);
79 if(isPowerOfTwo(value))
/external/guava/guava-tests/benchmark/com/google/common/math/
DDoubleMathBenchmark.java80 int isPowerOfTwo(int reps) { in isPowerOfTwo() method in DoubleMathBenchmark
84 if (DoubleMath.isPowerOfTwo(doubles[j])) { in isPowerOfTwo()
/external/guava/android/guava-tests/benchmark/com/google/common/math/
DDoubleMathBenchmark.java80 int isPowerOfTwo(int reps) { in isPowerOfTwo() method in DoubleMathBenchmark
84 if (DoubleMath.isPowerOfTwo(doubles[j])) { in isPowerOfTwo()
/external/skqp/tests/
DDetermineDomainModeTest.cpp122 bool isPowerOfTwo, in create_proxy() argument
126 int size = isPowerOfTwo ? 128 : 100; in create_proxy()
143 (isPowerOfTwo || isExact) ? RectInfo::kHard : RectInfo::kBad, in create_proxy()
144 (isPowerOfTwo || isExact) ? RectInfo::kHard : RectInfo::kBad, in create_proxy()
/external/oboe/samples/RhythmGame/third_party/glm/gtc/
Dround.hpp37 GLM_FUNC_DECL bool isPowerOfTwo(genIUType Value);
43 GLM_FUNC_DECL vecType<bool, P> isPowerOfTwo(vecType<T, P> const & value);
Dround.inl213 // isPowerOfTwo
216 GLM_FUNC_QUALIFIER bool isPowerOfTwo(genType Value) function
223 GLM_FUNC_QUALIFIER vecType<bool, P> isPowerOfTwo(vecType<T, P> const & Value) function
250 return isPowerOfTwo(value) ? value : static_cast<genType>(1) << findMSB(value);
265 if(isPowerOfTwo(value))
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/compressors/lz77support/
DParameters.java60 if (windowSize < 2 || !isPowerOfTwo(windowSize)) { in Builder()
346 private static final boolean isPowerOfTwo(int x) {
/external/pffft/
Dtest_pffft.cpp70 assert(Fft::isPowerOfTwo(N)); in Ttest()
312 result = pffft::Fft<float>::isPowerOfTwo(inp_power_of_two[k]); in main()
314 result = pffft::Fft<double>::isPowerOfTwo(inp_power_of_two[k]); in main()
/external/guava/android/guava-tests/test/com/google/common/math/
DDoubleMathTest.java410 boolean isPowerOfTwo = StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
414 assertTrue(isPowerOfTwo);
416 assertFalse(isPowerOfTwo);
451 assertTrue(DoubleMath.isPowerOfTwo(StrictMath.pow(2.0, i)));
463 assertEquals(expected, DoubleMath.isPowerOfTwo(x));
DIntMathTest.java48 assertTrue(IntMath.isPowerOfTwo(IntMath.MAX_SIGNED_POWER_OF_TWO)); in testMaxSignedPowerOfTwo()
52 assertFalse(IntMath.isPowerOfTwo((int) value)); in testMaxSignedPowerOfTwo()
188 assertEquals(expected, IntMath.isPowerOfTwo(x)); in testIsPowerOfTwo()
227 boolean isPowerOf2 = IntMath.isPowerOfTwo(x); in testLog2Exact()
/external/guava/guava-tests/test/com/google/common/math/
DDoubleMathTest.java410 boolean isPowerOfTwo = StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
414 assertTrue(isPowerOfTwo);
416 assertFalse(isPowerOfTwo);
451 assertTrue(DoubleMath.isPowerOfTwo(StrictMath.pow(2.0, i)));
463 assertEquals(expected, DoubleMath.isPowerOfTwo(x));
DIntMathTest.java48 assertTrue(IntMath.isPowerOfTwo(IntMath.MAX_SIGNED_POWER_OF_TWO)); in testMaxSignedPowerOfTwo()
52 assertFalse(IntMath.isPowerOfTwo((int) value)); in testMaxSignedPowerOfTwo()
188 assertEquals(expected, IntMath.isPowerOfTwo(x)); in testIsPowerOfTwo()
227 boolean isPowerOf2 = IntMath.isPowerOfTwo(x); in testLog2Exact()
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorFFT.h221 const bool is_power_of_two = isPowerOfTwo(line_len);
299 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE static bool isPowerOfTwo(Index x) {
319 eigen_assert(isPowerOfTwo(line_len));
391 eigen_assert(isPowerOfTwo(n));
519 eigen_assert(isPowerOfTwo(n));

12