38 #ifndef glm_core_func_integer
39 #define glm_core_func_integer
56 template <
typename genUType>
70 template <
typename genUType>
84 template <
typename genUType>
99 template <
typename genIType>
121 template <
typename genIUType>
123 genIUType
const & Value,
141 template <
typename genIUType>
143 genIUType
const & Base,
144 genIUType
const & Insert,
156 template <
typename genIUType>
167 template <
typename T,
template <
typename>
class genIUType>
168 GLM_FUNC_DECL
typename genIUType<T>::signed_type
bitCount(genIUType<T>
const & Value);
180 template <
typename T,
template <
typename>
class genIUType>
181 GLM_FUNC_DECL
typename genIUType<T>::signed_type
findLSB(genIUType<T>
const & Value);
194 template <
typename T,
template <
typename>
class genIUType>
195 GLM_FUNC_DECL
typename genIUType<T>::signed_type
findMSB(genIUType<T>
const & Value);
200 #include "func_integer.inl"
202 #endif//glm_core_func_integer
GLM_FUNC_DECL genIUType< T >::signed_type findLSB(genIUType< T > const &Value)
Returns the bit number of the least significant bit set to 1 in the binary representation of value...
GLM_FUNC_DECL genIUType< T >::signed_type bitCount(genIUType< T > const &Value)
Returns the number of bits set to 1 in the binary representation of value.
GLM_FUNC_DECL void imulExtended(genIType const &x, genIType const &y, genIType &msb, genIType &lsb)
Multiplies 32-bit integers x and y, producing a 64-bit result.
GLM_FUNC_DECL genIUType bitfieldExtract(genIUType const &Value, int const &Offset, int const &Bits)
Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of...
GLM_FUNC_DECL genIUType bitfieldReverse(genIUType const &Value)
Returns the reversal of the bits of value.
GLM_FUNC_DECL void umulExtended(genUType const &x, genUType const &y, genUType &msb, genUType &lsb)
Multiplies 32-bit integers x and y, producing a 64-bit result.
GLM_FUNC_DECL genIUType bitfieldInsert(genIUType const &Base, genIUType const &Insert, int const &Offset, int const &Bits)
Returns the insertion the bits least-significant bits of insert into base.
GLM_FUNC_DECL genIUType< T >::signed_type findMSB(genIUType< T > const &Value)
Returns the bit number of the most significant bit in the binary representation of value...
GLM_FUNC_DECL genUType uaddCarry(genUType const &x, genUType const &y, genUType &carry)
Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32).
GLM_FUNC_DECL genUType usubBorrow(genUType const &x, genUType const &y, genUType &borrow)
Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise.