0.9.9 API documenation
Functions
func_integer.hpp File Reference

GLM Core More...

Go to the source code of this file.

Functions

template<typename genType >
GLM_FUNC_DECL int bitCount (genType v)
 Returns the number of bits set to 1 in the binary representation of value. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, int, P > bitCount (vec< L, T, P > const &v)
 Returns the number of bits set to 1 in the binary representation of value. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > bitfieldExtract (vec< L, T, P > const &Value, int Offset, int Bits)
 Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > bitfieldInsert (vec< L, T, P > const &Base, vec< L, T, P > const &Insert, int Offset, int Bits)
 Returns the insertion the bits least-significant bits of insert into base. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > bitfieldReverse (vec< L, T, P > const &v)
 Returns the reversal of the bits of value. More...
 
template<typename genIUType >
GLM_FUNC_DECL int findLSB (genIUType x)
 Returns the bit number of the least significant bit set to 1 in the binary representation of value. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, int, P > findLSB (vec< L, T, P > const &v)
 Returns the bit number of the least significant bit set to 1 in the binary representation of value. More...
 
template<typename genIUType >
GLM_FUNC_DECL int findMSB (genIUType x)
 Returns the bit number of the most significant bit in the binary representation of value. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, int, P > findMSB (vec< L, T, P > const &v)
 Returns the bit number of the most significant bit in the binary representation of value. More...
 
template<length_t L, qualifier P>
GLM_FUNC_DECL void imulExtended (vec< L, int, P > const &x, vec< L, int, P > const &y, vec< L, int, P > &msb, vec< L, int, P > &lsb)
 Multiplies 32-bit integers x and y, producing a 64-bit result. More...
 
template<length_t L, qualifier P>
GLM_FUNC_DECL vec< L, uint, P > uaddCarry (vec< L, uint, P > const &x, vec< L, uint, P > const &y, vec< L, uint, P > &carry)
 Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32). More...
 
template<length_t L, qualifier P>
GLM_FUNC_DECL void umulExtended (vec< L, uint, P > const &x, vec< L, uint, P > const &y, vec< L, uint, P > &msb, vec< L, uint, P > &lsb)
 Multiplies 32-bit integers x and y, producing a 64-bit result. More...
 
template<length_t L, qualifier P>
GLM_FUNC_DECL vec< L, uint, P > usubBorrow (vec< L, uint, P > const &x, vec< L, uint, P > const &y, vec< L, uint, P > &borrow)
 Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise. More...
 

Detailed Description

GLM Core

See also
GLSL 4.20.8 specification, section 8.8 Integer Functions

Definition in file func_integer.hpp.