0.9.9 API documenation: bitfield.hpp Source File

| 0.9.9 API documenation

- Main Page
- Modules
- Files

- File List

bitfield.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/precision.hpp"
19 #include "../detail/type_int.hpp"
20 #include "../detail/_vectorize.hpp"
21 #include <limits>
22
23 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
24 # pragma message("GLM: GLM_GTC_bitfield extension included")
25 #endif
26
27 namespace glm
28 {
31
35 template <typename genIUType>
36 GLM_FUNC_DECL genIUType mask(genIUType Bits);
37
41 template <typename T, precision P, template <typename, precision> class vecIUType>
42 GLM_FUNC_DECL vecIUType<T, P> mask(vecIUType<T, P> const & v);
43
47 template <typename genIUType>
48 GLM_FUNC_DECL genIUType bitfieldRotateRight(genIUType In, int Shift);
49
53 template <typename T, precision P, template <typename, precision> class vecType>
54 GLM_FUNC_DECL vecType<T, P> bitfieldRotateRight(vecType<T, P> const & In, int Shift);
55
59 template <typename genIUType>
60 GLM_FUNC_DECL genIUType bitfieldRotateLeft(genIUType In, int Shift);
61
65 template <typename T, precision P, template <typename, precision> class vecType>
66 GLM_FUNC_DECL vecType<T, P> bitfieldRotateLeft(vecType<T, P> const & In, int Shift);
67
71 template <typename genIUType>
72 GLM_FUNC_DECL genIUType bitfieldFillOne(genIUType Value, int FirstBit, int BitCount);
73
77 template <typename T, precision P, template <typename, precision> class vecType>
78 GLM_FUNC_DECL vecType<T, P> bitfieldFillOne(vecType<T, P> const & Value, int FirstBit, int BitCount);
79
83 template <typename genIUType>
84 GLM_FUNC_DECL genIUType bitfieldFillZero(genIUType Value, int FirstBit, int BitCount);
85
89 template <typename T, precision P, template <typename, precision> class vecType>
90 GLM_FUNC_DECL vecType<T, P> bitfieldFillZero(vecType<T, P> const & Value, int FirstBit, int BitCount);
91
97 GLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);
98
104 GLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);
105
111 GLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);
112
118 GLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);
119
125 GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);
126
132 GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);
133
139 GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);
140
146 GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);
147
153 GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);
154
160 GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);
161
167 GLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);
168
174 GLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);
175
181 GLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);
182
188 GLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);
189
195 GLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);
196
202 GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);
203
205 } //namespace glm
206
207 #include "bitfield.inl"
glm::bitfieldRotateRight
GLM_FUNC_DECL vecType< T, P > bitfieldRotateRight(vecType< T, P > const &In, int Shift)
Rotate all bits to the right.
glm::bitfieldInterleave
GLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)
Interleaves the bits of x, y, z and w.
glm::mask
GLM_FUNC_DECL vecIUType< T, P > mask(vecIUType< T, P > const &v)
Build a mask of 'count' bits.
glm::bitfieldFillOne
GLM_FUNC_DECL vecType< T, P > bitfieldFillOne(vecType< T, P > const &Value, int FirstBit, int BitCount)
Set to 1 a range of bits.
glm
Definition: _noise.hpp:11
glm::bitfieldFillZero
GLM_FUNC_DECL vecType< T, P > bitfieldFillZero(vecType< T, P > const &Value, int FirstBit, int BitCount)
Set to 0 a range of bits.
glm::bitfieldRotateLeft
GLM_FUNC_DECL vecType< T, P > bitfieldRotateLeft(vecType< T, P > const &In, int Shift)
Rotate all bits to the left.