Renamed precision enum to qualifier

This commit is contained in:
Christophe Riccio
2017-08-15 21:23:47 +02:00
parent a7b72ec5b2
commit a805fb9d68
201 changed files with 5026 additions and 5127 deletions

View File

@@ -151,7 +151,7 @@ namespace bitfieldReverse
return Result;
}
*/
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER glm::vec<L, T, P> bitfieldReverseLoop(glm::vec<L, T, P> const& v)
{
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldReverse' only accept integer values");
@@ -197,7 +197,7 @@ namespace bitfieldReverse
template<bool EXEC = false>
struct compute_bitfieldReverseStep
{
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER static glm::vec<L, T, P> call(glm::vec<L, T, P> const & v, T, T)
{
return v;
@@ -207,14 +207,14 @@ namespace bitfieldReverse
template<>
struct compute_bitfieldReverseStep<true>
{
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER static glm::vec<L, T, P> call(glm::vec<L, T, P> const & v, T Mask, T Shift)
{
return (v & Mask) << Shift | (v & (~Mask)) >> Shift;
}
};
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER glm::vec<L, T, P> bitfieldReverseOps(glm::vec<L, T, P> const & v)
{
glm::vec<L, T, P> x(v);
@@ -1397,7 +1397,7 @@ namespace bitCount
template<bool EXEC = false>
struct compute_bitfieldBitCountStep
{
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER static glm::vec<L, T, P> call(glm::vec<L, T, P> const& v, T, T)
{
return v;
@@ -1407,14 +1407,14 @@ namespace bitCount
template<>
struct compute_bitfieldBitCountStep<true>
{
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
GLM_FUNC_QUALIFIER static glm::vec<L, T, P> call(glm::vec<L, T, P> const& v, T Mask, T Shift)
{
return (v & Mask) + ((v >> Shift) & Mask);
}
};
template<glm::length_t L, typename T, glm::precision P>
template<glm::length_t L, typename T, glm::qualifier P>
static glm::vec<L, int, P> bitCount_bitfield(glm::vec<L, T, P> const & v)
{
glm::vec<L, typename glm::detail::make_unsigned<T>::type, P> x(*reinterpret_cast<glm::vec<L, typename glm::detail::make_unsigned<T>::type, P> const *>(&v));

View File

@@ -168,7 +168,7 @@ int nlz7(unsigned k)
return n;
}
/* In single precision, round-to-nearest mode, the basic method fails for:
/* In single qualifier, round-to-nearest mode, the basic method fails for:
k = 0, k = 01FFFFFF, 03FFFFFE <= k <= 03FFFFFF,
07FFFFFC <= k <= 07FFFFFF,
0FFFFFF8 <= k <= 0FFFFFFF,