From 2877f4eda3d1b0c7431039e3142ecf1a282a34b1 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Tue, 21 Aug 2018 20:40:38 +0500 Subject: Update glm to 0.9.9.0 --- external/include/glm/gtc/integer.inl | 46 +++++++++++++++++------------------- 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'external/include/glm/gtc/integer.inl') diff --git a/external/include/glm/gtc/integer.inl b/external/include/glm/gtc/integer.inl index 7ce2918..9d4b618 100644 --- a/external/include/glm/gtc/integer.inl +++ b/external/include/glm/gtc/integer.inl @@ -4,36 +4,34 @@ namespace glm{ namespace detail { - template class vecType, bool Aligned> - struct compute_log2 + template + struct compute_log2 { - GLM_FUNC_QUALIFIER static vecType call(vecType const & vec) + GLM_FUNC_QUALIFIER static vec call(vec const& v) { //Equivalent to return findMSB(vec); but save one function call in ASM with VC //return findMSB(vec); - return vecType(detail::compute_findMSB_vec::call(vec)); + return vec(detail::compute_findMSB_vec::call(v)); } }; # if GLM_HAS_BITSCAN_WINDOWS - template - struct compute_log2 + template + struct compute_log2<4, int, Q, false, Aligned> { - GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & vec) + GLM_FUNC_QUALIFIER static vec<4, int, Q> call(vec<4, int, Q> const& v) { - tvec4 Result(glm::uninitialize); - - _BitScanReverse(reinterpret_cast(&Result.x), vec.x); - _BitScanReverse(reinterpret_cast(&Result.y), vec.y); - _BitScanReverse(reinterpret_cast(&Result.z), vec.z); - _BitScanReverse(reinterpret_cast(&Result.w), vec.w); - + vec<4, int, Q> Result; + _BitScanReverse(reinterpret_cast(&Result.x), v.x); + _BitScanReverse(reinterpret_cast(&Result.y), v.y); + _BitScanReverse(reinterpret_cast(&Result.z), v.z); + _BitScanReverse(reinterpret_cast(&Result.w), v.w); return Result; } }; # endif//GLM_HAS_BITSCAN_WINDOWS }//namespace detail - template + template GLM_FUNC_QUALIFIER int iround(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'iround' only accept floating-point inputs"); @@ -42,16 +40,16 @@ namespace detail return static_cast(x + static_cast(0.5)); } - template class vecType> - GLM_FUNC_QUALIFIER vecType iround(vecType const& x) + template + GLM_FUNC_QUALIFIER vec iround(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'iround' only accept floating-point inputs"); - assert(all(lessThanEqual(vecType(0), x))); + assert(all(lessThanEqual(vec(0), x))); - return vecType(x + static_cast(0.5)); + return vec(x + static_cast(0.5)); } - template + template GLM_FUNC_QUALIFIER uint uround(genType x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'uround' only accept floating-point inputs"); @@ -60,12 +58,12 @@ namespace detail return static_cast(x + static_cast(0.5)); } - template class vecType> - GLM_FUNC_QUALIFIER vecType uround(vecType const& x) + template + GLM_FUNC_QUALIFIER vec uround(vec const& x) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'uround' only accept floating-point inputs"); - assert(all(lessThanEqual(vecType(0), x))); + assert(all(lessThanEqual(vec(0), x))); - return vecType(x + static_cast(0.5)); + return vec(x + static_cast(0.5)); } }//namespace glm -- cgit v1.2.3