| 0.9.9 API documenation

- Main Page
- Modules
- Files

- File List

integer.hpp
Go to the documentation of this file.
1
15 #pragma once
16
17 #include "detail/setup.hpp"
18 #include "detail/qualifier.hpp"
19 #include "common.hpp"
20 #include "vector_relational.hpp"
21
22 namespace glm
23 {
26
35 template<length_t L, qualifier Q>
36 GLM_FUNC_DECL vec<L, uint, Q> uaddCarry(
37 vec<L, uint, Q> const& x,
38 vec<L, uint, Q> const& y,
39 vec<L, uint, Q> & carry);
40
49 template<length_t L, qualifier Q>
50 GLM_FUNC_DECL vec<L, uint, Q> usubBorrow(
51 vec<L, uint, Q> const& x,
52 vec<L, uint, Q> const& y,
53 vec<L, uint, Q> & borrow);
54
63 template<length_t L, qualifier Q>
64 GLM_FUNC_DECL void umulExtended(
65 vec<L, uint, Q> const& x,
66 vec<L, uint, Q> const& y,
67 vec<L, uint, Q> & msb,
68 vec<L, uint, Q> & lsb);
69
78 template<length_t L, qualifier Q>
79 GLM_FUNC_DECL void imulExtended(
80 vec<L, int, Q> const& x,
81 vec<L, int, Q> const& y,
82 vec<L, int, Q> & msb,
83 vec<L, int, Q> & lsb);
84
101 template<length_t L, typename T, qualifier Q>
102 GLM_FUNC_DECL vec<L, T, Q> bitfieldExtract(
103 vec<L, T, Q> const& Value,
104 int Offset,
105 int Bits);
106
122 template<length_t L, typename T, qualifier Q>
123 GLM_FUNC_DECL vec<L, T, Q> bitfieldInsert(
124 vec<L, T, Q> const& Base,
125 vec<L, T, Q> const& Insert,
126 int Offset,
127 int Bits);
128
138 template<length_t L, typename T, qualifier Q>
139 GLM_FUNC_DECL vec<L, T, Q> bitfieldReverse(vec<L, T, Q> const& v);
140
147 template<typename genType>
148 GLM_FUNC_DECL int bitCount(genType v);
149
157 template<length_t L, typename T, qualifier Q>
158 GLM_FUNC_DECL vec<L, int, Q> bitCount(vec<L, T, Q> const& v);
159
168 template<typename genIUType>
169 GLM_FUNC_DECL int findLSB(genIUType x);
170
180 template<length_t L, typename T, qualifier Q>
181 GLM_FUNC_DECL vec<L, int, Q> findLSB(vec<L, T, Q> const& v);
182
192 template<typename genIUType>
193 GLM_FUNC_DECL int findMSB(genIUType x);
194
205 template<length_t L, typename T, qualifier Q>
206 GLM_FUNC_DECL vec<L, int, Q> findMSB(vec<L, T, Q> const& v);
207
209 }//namespace glm
210
211 #include "detail/func_integer.inl"
glm::bitfieldInsert
GLM_FUNC_DECL vec< L, T, Q > bitfieldInsert(vec< L, T, Q > const &Base, vec< L, T, Q > const &Insert, int Offset, int Bits)
Returns the insertion the bits least-significant bits of insert into base.
glm::findLSB
GLM_FUNC_DECL vec< L, int, Q > findLSB(vec< L, T, Q > const &v)
Returns the bit number of the least significant bit set to 1 in the binary representation of value...
common.hpp
Core features
qualifier.hpp
Core features
glm::findMSB
GLM_FUNC_DECL vec< L, int, Q > findMSB(vec< L, T, Q > const &v)
Returns the bit number of the most significant bit in the binary representation of value...
glm::uaddCarry
GLM_FUNC_DECL vec< L, uint, Q > uaddCarry(vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &carry)
Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32).
glm
Definition: common.hpp:20
glm::umulExtended
GLM_FUNC_DECL void umulExtended(vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &msb, vec< L, uint, Q > &lsb)
Multiplies 32-bit integers x and y, producing a 64-bit result.
glm::bitCount
GLM_FUNC_DECL vec< L, int, Q > bitCount(vec< L, T, Q > const &v)
Returns the number of bits set to 1 in the binary representation of value.
glm::bitfieldReverse
GLM_FUNC_DECL vec< L, T, Q > bitfieldReverse(vec< L, T, Q > const &v)
Returns the reversal of the bits of value.
glm::usubBorrow
GLM_FUNC_DECL vec< L, uint, Q > usubBorrow(vec< L, uint, Q > const &x, vec< L, uint, Q > const &y, vec< L, uint, Q > &borrow)
Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise.
glm::imulExtended
GLM_FUNC_DECL void imulExtended(vec< L, int, Q > const &x, vec< L, int, Q > const &y, vec< L, int, Q > &msb, vec< L, int, Q > &lsb)
Multiplies 32-bit integers x and y, producing a 64-bit result.
setup.hpp
Core features
glm::bitfieldExtract
GLM_FUNC_DECL vec< L, T, Q > bitfieldExtract(vec< L, T, Q > const &Value, int Offset, int Bits)
Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of...
vector_relational.hpp
Core features