diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index ea689db6..d36b2b15 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -526,9 +526,8 @@ namespace detail return tmp * tmp * (static_cast(3) - static_cast(2) * tmp); } - // TODO: Not working on MinGW... # if GLM_HAS_CXX11_STL - usign std::isnan; + using std::isnan; # else template GLM_FUNC_QUALIFIER bool isnan(genType x) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 2bea91a0..a7af28b8 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -749,7 +749,7 @@ # define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_ALIGN(x) __attribute__((aligned(x))) # define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) -# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(x))) +# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment))) # define GLM_RESTRICT __restrict__ # define GLM_RESTRICT_VAR __restrict__ #else diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 75ced992..9edd8f5b 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -49,21 +49,48 @@ namespace detail typedef T type[4]; }; -# if(GLM_ARCH & GLM_ARCH_SSE2) +# if GLM_ARCH & GLM_ARCH_SSE2 template <> struct simd { typedef __m128 type; }; + + template <> + struct simd + { + typedef __m128i type; + }; + + template <> + struct simd + { + typedef __m128i type; + }; # endif -# if(GLM_ARCH & GLM_ARCH_AVX) +# if GLM_ARCH & GLM_ARCH_AVX template <> struct simd { typedef __m256d type; }; # endif + +# if GLM_ARCH & GLM_ARCH_AVX2 + template <> + struct simd + { + typedef __m256i type; + }; + + template <> + struct simd + { + typedef __m256i type; + }; +# endif + }//namespace detail template