From: Pyry Haulos Date: Fri, 11 Dec 2015 23:18:34 +0000 (+0000) Subject: Merge "Add support for custom allocators in vk::Move<> and vk::Unique<>" into vulkan X-Git-Tag: upstream/0.1.0~812^2~468 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2578e7ae340e5748cc33041244506075ccbbd7c1;hp=955de51cf0206b4a34f8442294c45225074286f4;p=platform%2Fupstream%2FVK-GL-CTS.git Merge "Add support for custom allocators in vk::Move<> and vk::Unique<>" into vulkan --- diff --git a/framework/delibs/debase/deInt32.h b/framework/delibs/debase/deInt32.h index 4806fe6..6550267 100644 --- a/framework/delibs/debase/deInt32.h +++ b/framework/delibs/debase/deInt32.h @@ -206,6 +206,18 @@ DE_INLINE deBool deIsPowerOfTwo32 (int a) } /*--------------------------------------------------------------------*//*! + * \brief Check if a value is a power-of-two. + * \param a Input value. + * \return True if input is a power-of-two value, false otherwise. + * + * \note Also returns true for zero. + *//*--------------------------------------------------------------------*/ +DE_INLINE deBool deIsPowerOfTwo64 (deUint64 a) +{ + return ((a & (a - 1ull)) == 0); +} + +/*--------------------------------------------------------------------*//*! * \brief Check if an integer is aligned to given power-of-two size. * \param a Input value. * \param align Alignment to check for.