- Main Page
- Related Pages
- Modules
- Files

- File List

bit.hpp
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 #ifndef GLM_GTX_bit
40 #define GLM_GTX_bit GLM_VERSION
41
42 // Dependency:
43 #include "../glm.hpp"
44 #include "../gtc/half_float.hpp"
45
46 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
47 # pragma message("GLM: GLM_GTX_bit extension included")
48 #endif
49
50 namespace glm
51 {
54
57 template <typename genIType>
58 genIType mask(genIType const & count);
59
63 template <typename genIUType, typename sizeType>
64 GLM_DEPRECATED genIUType extractField(
65 genIUType const & v,
66 sizeType const & first,
67 sizeType const & count);
68
71 template <typename genType>
72 GLM_DEPRECATED int lowestBit(genType const & value);
73
76 template <typename genType>
77 GLM_DEPRECATED int highestBit(genType const & value);
78
81 template <typename genType>
82 genType highestBitValue(genType const & value);
83
86 template <typename genType>
87 bool isPowerOfTwo(genType const & value);
88
91 template <typename genType>
92 genType powerOfTwoAbove(genType const & value);
93
96 template <typename genType>
97 genType powerOfTwoBelow(genType const & value);
98
101 template <typename genType>
102 genType powerOfTwoNearest(genType const & value);
103
106 template <typename genType>
107 GLM_DEPRECATED genType bitRevert(genType const & value);
108
111 template <typename genType>
112 genType bitRotateRight(genType const & In, std::size_t Shift);
113
116 template <typename genType>
117 genType bitRotateLeft(genType const & In, std::size_t Shift);
118
121 template <typename genIUType>
122 genIUType fillBitfieldWithOne(
123 genIUType const & Value,
124 int const & FromBit,
125 int const & ToBit);
126
129 template <typename genIUType>
130 genIUType fillBitfieldWithZero(
131 genIUType const & Value,
132 int const & FromBit,
133 int const & ToBit);
134
136 } //namespace glm
137
138 #include "bit.inl"
139
140 #endif//GLM_GTX_bit