Fixed GCC build issue on new alignment types. More simd stuff to vec4

This commit is contained in:
Christophe Riccio 2014-11-23 22:13:22 +01:00
parent bddce172f7
commit 117634c7ea
3 changed files with 31 additions and 5 deletions

View File

@ -526,9 +526,8 @@ namespace detail
return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
}
// TODO: Not working on MinGW...
# if GLM_HAS_CXX11_STL
usign std::isnan;
using std::isnan;
# else
template <typename genType>
GLM_FUNC_QUALIFIER bool isnan(genType x)

View File

@ -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

View File

@ -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<float>
{
typedef __m128 type;
};
template <>
struct simd<int>
{
typedef __m128i type;
};
template <>
struct simd<unsigned int>
{
typedef __m128i type;
};
# endif
# if(GLM_ARCH & GLM_ARCH_AVX)
# if GLM_ARCH & GLM_ARCH_AVX
template <>
struct simd<double>
{
typedef __m256d type;
};
# endif
# if GLM_ARCH & GLM_ARCH_AVX2
template <>
struct simd<int64>
{
typedef __m256i type;
};
template <>
struct simd<uint64>
{
typedef __m256i type;
};
# endif
}//namespace detail
template <typename T, precision P = defaultp>