Added nlz, improved int log2, optimized findMSB with intrinsics
This commit is contained in:
@@ -58,10 +58,14 @@ namespace glm
|
||||
//! From GLM_GTX_integer extension.
|
||||
int sqrt(int x);
|
||||
|
||||
//! Returns the log2 of x.
|
||||
//! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size.
|
||||
//! From GLM_GTX_integer extension.
|
||||
unsigned int log2(unsigned int x);
|
||||
|
||||
//! Returns the floor log2 of x.
|
||||
//! From GLM_GTX_integer extension.
|
||||
unsigned int floor_log2(unsigned int x);
|
||||
|
||||
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
|
||||
//! From GLM_GTX_integer extension.
|
||||
int mod(int x, int y);
|
||||
@@ -72,21 +76,25 @@ namespace glm
|
||||
genType factorial(genType const & x);
|
||||
|
||||
//! 32bit signed integer.
|
||||
//! From GLM_GTX_unsigned_int extension.
|
||||
//! From GLM_GTX_integer extension.
|
||||
typedef signed int sint;
|
||||
|
||||
//! Returns x raised to the y power.
|
||||
//! From GLM_GTX_unsigned_int extension.
|
||||
//! From GLM_GTX_integer extension.
|
||||
uint pow(uint x, uint y);
|
||||
|
||||
//! Returns the positive square root of x.
|
||||
//! From GLM_GTX_unsigned_int extension.
|
||||
//! From GLM_GTX_integer extension.
|
||||
uint sqrt(uint x);
|
||||
|
||||
//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
|
||||
//! From GLM_GTX_unsigned_int extension.
|
||||
//! From GLM_GTX_integer extension.
|
||||
uint mod(uint x, uint y);
|
||||
|
||||
//! Returns the number of leading zeros.
|
||||
//! From GLM_GTX_integer extension.
|
||||
uint nlz(uint x);
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user