mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed GCC build issue on new alignment types. More simd stuff to vec4
This commit is contained in:
parent
bddce172f7
commit
117634c7ea
@ -526,9 +526,8 @@ namespace detail
|
|||||||
return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
|
return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Not working on MinGW...
|
|
||||||
# if GLM_HAS_CXX11_STL
|
# if GLM_HAS_CXX11_STL
|
||||||
usign std::isnan;
|
using std::isnan;
|
||||||
# else
|
# else
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER bool isnan(genType x)
|
GLM_FUNC_QUALIFIER bool isnan(genType x)
|
||||||
|
@ -749,7 +749,7 @@
|
|||||||
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
||||||
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
||||||
# define GLM_ALIGNED_STRUCT(x) struct __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 __restrict__
|
||||||
# define GLM_RESTRICT_VAR __restrict__
|
# define GLM_RESTRICT_VAR __restrict__
|
||||||
#else
|
#else
|
||||||
|
@ -49,21 +49,48 @@ namespace detail
|
|||||||
typedef T type[4];
|
typedef T type[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
# if(GLM_ARCH & GLM_ARCH_SSE2)
|
# if GLM_ARCH & GLM_ARCH_SSE2
|
||||||
template <>
|
template <>
|
||||||
struct simd<float>
|
struct simd<float>
|
||||||
{
|
{
|
||||||
typedef __m128 type;
|
typedef __m128 type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct simd<int>
|
||||||
|
{
|
||||||
|
typedef __m128i type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct simd<unsigned int>
|
||||||
|
{
|
||||||
|
typedef __m128i type;
|
||||||
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if(GLM_ARCH & GLM_ARCH_AVX)
|
# if GLM_ARCH & GLM_ARCH_AVX
|
||||||
template <>
|
template <>
|
||||||
struct simd<double>
|
struct simd<double>
|
||||||
{
|
{
|
||||||
typedef __m256d type;
|
typedef __m256d type;
|
||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if GLM_ARCH & GLM_ARCH_AVX2
|
||||||
|
template <>
|
||||||
|
struct simd<int64>
|
||||||
|
{
|
||||||
|
typedef __m256i type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct simd<uint64>
|
||||||
|
{
|
||||||
|
typedef __m256i type;
|
||||||
|
};
|
||||||
|
# endif
|
||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
template <typename T, precision P = defaultp>
|
template <typename T, precision P = defaultp>
|
||||||
|
Loading…
Reference in New Issue
Block a user