FlukyEngine
vector_integer.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 
14 // Dependencies
15 #include "../detail/setup.hpp"
16 #include "../detail/qualifier.hpp"
17 #include "../detail/_vectorize.hpp"
18 #include "../vector_relational.hpp"
19 #include "../common.hpp"
20 #include <limits>
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_EXT_vector_integer extension included")
24 #endif
25 
26 namespace glm
27 {
30 
38  template<length_t L, typename T, qualifier Q>
39  GLM_FUNC_DECL vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& v);
40 
49  template<length_t L, typename T, qualifier Q>
50  GLM_FUNC_DECL vec<L, T, Q> nextPowerOfTwo(vec<L, T, Q> const& v);
51 
60  template<length_t L, typename T, qualifier Q>
61  GLM_FUNC_DECL vec<L, T, Q> prevPowerOfTwo(vec<L, T, Q> const& v);
62 
70  template<length_t L, typename T, qualifier Q>
71  GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, T Multiple);
72 
80  template<length_t L, typename T, qualifier Q>
81  GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
82 
93  template<length_t L, typename T, qualifier Q>
94  GLM_FUNC_DECL vec<L, T, Q> nextMultiple(vec<L, T, Q> const& v, T Multiple);
95 
106  template<length_t L, typename T, qualifier Q>
107  GLM_FUNC_DECL vec<L, T, Q> nextMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
108 
119  template<length_t L, typename T, qualifier Q>
120  GLM_FUNC_DECL vec<L, T, Q> prevMultiple(vec<L, T, Q> const& v, T Multiple);
121 
132  template<length_t L, typename T, qualifier Q>
133  GLM_FUNC_DECL vec<L, T, Q> prevMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
134 
143  template<length_t L, typename T, qualifier Q>
144  GLM_FUNC_DECL vec<L, int, Q> findNSB(vec<L, T, Q> const& Source, vec<L, int, Q> SignificantBitCount);
145 
147 } //namespace glm
148 
149 #include "vector_integer.inl"
GLM_FUNC_DECL genIUType prevMultiple(genIUType v, genIUType Multiple)
Lower multiple number of Source.
Definition: scalar_integer.inl:201
Core features
Definition: common.hpp:20
GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple)
Return true if the &#39;Value&#39; is a multiple of &#39;Multiple&#39;.
Definition: scalar_integer.inl:185
GLM_FUNC_DECL genIUType prevPowerOfTwo(genIUType v)
Return the power of two number which value is just lower the input value, round down to a power of tw...
Definition: scalar_integer.inl:177
GLM_FUNC_DECL bool isPowerOfTwo(genIUType v)
Return true if the value is a power of two number.
Definition: scalar_integer.inl:160
GLM_FUNC_DECL int findNSB(genIUType x, int significantBitCount)
Returns the bit number of the Nth significant bit set to 1 in the binary representation of value...
Definition: scalar_integer.inl:209
GLM_FUNC_DECL genIUType nextMultiple(genIUType v, genIUType Multiple)
Higher multiple number of Source.
Definition: scalar_integer.inl:193
GLM_FUNC_DECL genIUType nextPowerOfTwo(genIUType v)
Return the power of two number which value is just higher the input value, round up to a power of two...
Definition: scalar_integer.inl:169