|
template<typename T , template< typename > class genIUType> |
GLM_FUNC_DECL genIUType< T >::signed_type | glm::bitCount (genIUType< T > const &Value) |
|
template<typename genIUType > |
GLM_FUNC_DECL genIUType | glm::bitfieldExtract (genIUType const &Value, int const &Offset, int const &Bits) |
|
template<typename genIUType > |
GLM_FUNC_DECL genIUType | glm::bitfieldInsert (genIUType const &Base, genIUType const &Insert, int const &Offset, int const &Bits) |
|
template<typename genIUType > |
GLM_FUNC_DECL genIUType | glm::bitfieldReverse (genIUType const &Value) |
|
template<typename T , template< typename > class genIUType> |
GLM_FUNC_DECL genIUType< T >::signed_type | glm::findLSB (genIUType< T > const &Value) |
|
template<typename T , template< typename > class genIUType> |
GLM_FUNC_DECL genIUType< T >::signed_type | glm::findMSB (genIUType< T > const &Value) |
|
template<typename genIType > |
GLM_FUNC_DECL void | glm::imulExtended (genIType const &x, genIType const &y, genIType &msb, genIType &lsb) |
|
template<typename genUType > |
GLM_FUNC_DECL genUType | glm::uaddCarry (genUType const &x, genUType const &y, genUType &carry) |
|
template<typename genUType > |
GLM_FUNC_DECL void | glm::umulExtended (genUType const &x, genUType const &y, genUType &msb, genUType &lsb) |
|
template<typename genUType > |
GLM_FUNC_DECL genUType | glm::usubBorrow (genUType const &x, genUType const &y, genUType &borrow) |
|
These all operate component-wise. The description is per component. The notation [a, b] means the set of bits from bit-number a through bit-number b, inclusive. The lowest-order bit is bit 0.
template<typename T , template< typename > class genIUType>
GLM_FUNC_DECL genIUType<T>::signed_type glm::bitCount |
( |
genIUType< T > const & |
Value | ) |
|
template<typename genIUType >
GLM_FUNC_DECL genIUType glm::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 the result. For unsigned data types, the most significant bits of the result will be set to zero. For signed data types, the most significant bits will be set to the value of bit offset + base - 1.
If bits is zero, the result will be zero. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.
- Template Parameters
-
genIUType | Signed or unsigned integer scalar or vector types. |
- See also
- GLSL bitfieldExtract man page
-
GLSL 4.20.8 specification, section 8.8 Integer Functions
template<typename genIUType >
GLM_FUNC_DECL genIUType glm::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.
The result will have bits [offset, offset + bits - 1] taken from bits [0, bits - 1] of insert, and all other bits taken directly from the corresponding bits of base. If bits is zero, the result will simply be base. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.
- Template Parameters
-
genIUType | Signed or unsigned integer scalar or vector types. |
- See also
- GLSL bitfieldInsert man page
-
GLSL 4.20.8 specification, section 8.8 Integer Functions
template<typename genIUType >
GLM_FUNC_DECL genIUType glm::bitfieldReverse |
( |
genIUType const & |
Value | ) |
|
template<typename T , template< typename > class genIUType>
GLM_FUNC_DECL genIUType<T>::signed_type glm::findLSB |
( |
genIUType< T > const & |
Value | ) |
|
template<typename T , template< typename > class genIUType>
GLM_FUNC_DECL genIUType<T>::signed_type glm::findMSB |
( |
genIUType< T > const & |
Value | ) |
|
Returns the bit number of the most significant bit in the binary representation of value. For positive integers, the result will be the bit number of the most significant bit set to 1. For negative integers, the result will be the bit number of the most significant bit set to 0. For a value of zero or negative one, -1 will be returned.
- Template Parameters
-
genIUType | Signed or unsigned integer scalar or vector types. |
- See also
- GLSL findMSB man page
-
GLSL 4.20.8 specification, section 8.8 Integer Functions
- Todo:
- Clarify the declaration to specify that scalars are suported.
template<typename genIType >
GLM_FUNC_DECL void glm::imulExtended |
( |
genIType const & |
x, |
|
|
genIType const & |
y, |
|
|
genIType & |
msb, |
|
|
genIType & |
lsb |
|
) |
| |
template<typename genUType >
GLM_FUNC_DECL genUType glm::uaddCarry |
( |
genUType const & |
x, |
|
|
genUType const & |
y, |
|
|
genUType & |
carry |
|
) |
| |
template<typename genUType >
GLM_FUNC_DECL void glm::umulExtended |
( |
genUType const & |
x, |
|
|
genUType const & |
y, |
|
|
genUType & |
msb, |
|
|
genUType & |
lsb |
|
) |
| |
template<typename genUType >
GLM_FUNC_DECL genUType glm::usubBorrow |
( |
genUType const & |
x, |
|
|
genUType const & |
y, |
|
|
genUType & |
borrow |
|
) |
| |