Flow Visualisation
bit.hpp
Go to the documentation of this file.
1 
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
genType powerOfTwoNearest(genType const &value)
Definition: bit.inl:442
Definition: _detail.hpp:38
bool isPowerOfTwo(genType const &value)
Definition: bit.inl:370
GLM_DEPRECATED int lowestBit(genType const &value)
Definition: bit.inl:207
genType powerOfTwoAbove(genType const &value)
Definition: bit.inl:420
#define GLM_DEPRECATED
Definition: _detail.hpp:474
GLM_DEPRECATED genIUType extractField(genIUType const &v, sizeType const &first, sizeType const &count)
Definition: bit.inl:62
genType highestBitValue(genType const &value)
Definition: bit.inl:318
int sizeType
Definition: type_size.hpp:38
genIUType fillBitfieldWithOne(genIUType const &Value, int const &FromBit, int const &ToBit)
Definition: bit.inl:569
GLM_DEPRECATED genType bitRevert(genType const &value)
Definition: bit.inl:457
GLM_DEPRECATED int highestBit(genType const &value)
Definition: bit.inl:257
genIType mask(genIType const &count)
Definition: bit.inl:14
genIUType fillBitfieldWithZero(genIUType const &Value, int const &FromBit, int const &ToBit)
Definition: bit.inl:586
genType bitRotateLeft(genType const &In, std::size_t Shift)
Definition: bit.inl:520
genType powerOfTwoBelow(genType const &value)
Definition: bit.inl:430
genType bitRotateRight(genType const &In, std::size_t Shift)
Definition: bit.inl:472