Home
last modified time | relevance | path

Searched refs:powerOf2 (Results 1 – 3 of 3) sorted by relevance

/external/deqp-deps/glslang/glslang/Include/
DCommon.h261 template <class T> bool IsPow2(T powerOf2)
263 if (powerOf2 <= 0)
266 return (powerOf2 & (powerOf2 - 1)) == 0;
271 template <class T> void RoundToPow2(T& number, int powerOf2)
273 assert(IsPow2(powerOf2));
274 number = (number + powerOf2 - 1) & ~(powerOf2 - 1);
277 template <class T> bool IsMultipleOfPow2(T number, int powerOf2)
279 assert(IsPow2(powerOf2));
280 return ! (number & (powerOf2 - 1));
/external/angle/third_party/vulkan-deps/glslang/src/glslang/Include/
DCommon.h261 template <class T> bool IsPow2(T powerOf2)
263 if (powerOf2 <= 0)
266 return (powerOf2 & (powerOf2 - 1)) == 0;
271 template <class T> void RoundToPow2(T& number, int powerOf2)
273 assert(IsPow2(powerOf2));
274 number = (number + powerOf2 - 1) & ~(powerOf2 - 1);
277 template <class T> bool IsMultipleOfPow2(T number, int powerOf2)
279 assert(IsPow2(powerOf2));
280 return ! (number & (powerOf2 - 1));
/external/deqp/framework/delibs/debase/
DdeInt32.h731 DE_INLINE int deIntIsPow2(int powerOf2) in deIntIsPow2() argument
733 if (powerOf2 <= 0) in deIntIsPow2()
735 return (powerOf2 & (powerOf2 - (int)1)) == (int)0; in deIntIsPow2()
738 DE_INLINE int deIntRoundToPow2(int number, int powerOf2) in deIntRoundToPow2() argument
740 DE_ASSERT(deIntIsPow2(powerOf2)); in deIntRoundToPow2()
741 return (number + (int)powerOf2 - (int)1) & (int)(~(powerOf2 - 1)); in deIntRoundToPow2()