Merge branch '0.9.8'

This commit is contained in:
Christophe Riccio 2016-10-12 21:40:15 +02:00
commit 09a81dad23
10 changed files with 169 additions and 133 deletions

View File

@ -120,7 +120,7 @@ namespace detail
/// ///
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a> /// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml">GLSL transpose man page</a>
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) # if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))
template <typename T, precision P, template <typename, precision> class matType> template <typename T, precision P, template <typename, precision> class matType>
GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x); GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
# endif # endif

View File

@ -178,11 +178,11 @@
# ifdef _MSC_EXTENSIONS # ifdef _MSC_EXTENSIONS
# if __cplusplus >= 201402L # if __cplusplus >= 201402L
# define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG) # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
//# elif GLM_COMPILER >= GLM_COMPILER_VC2015 //# elif GLM_COMPILER >= GLM_COMPILER_VC14
//# define GLM_LANG (GLM_LANG_CXX1Y | GLM_LANG_CXXMS_FLAG) //# define GLM_LANG (GLM_LANG_CXX1Y | GLM_LANG_CXXMS_FLAG)
# elif __cplusplus >= 201103L # elif __cplusplus >= 201103L
# define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG) # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
# elif GLM_COMPILER >= GLM_COMPILER_VC2010 # elif GLM_COMPILER >= GLM_COMPILER_VC10
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG) # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
# elif __cplusplus >= 199711L # elif __cplusplus >= 199711L
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG) # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
@ -194,7 +194,7 @@
# define GLM_LANG GLM_LANG_CXX14 # define GLM_LANG GLM_LANG_CXX14
# elif __cplusplus >= 201103L # elif __cplusplus >= 201103L
# define GLM_LANG GLM_LANG_CXX11 # define GLM_LANG GLM_LANG_CXX11
# elif GLM_COMPILER >= GLM_COMPILER_VC2010 # elif GLM_COMPILER >= GLM_COMPILER_VC10
# define GLM_LANG GLM_LANG_CXX0X # define GLM_LANG GLM_LANG_CXX0X
# elif __cplusplus >= 199711L # elif __cplusplus >= 199711L
# define GLM_LANG GLM_LANG_CXX98 # define GLM_LANG GLM_LANG_CXX98
@ -288,7 +288,7 @@
#else #else
# define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)))) ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))))
#endif #endif
@ -299,9 +299,9 @@
# define GLM_HAS_STATIC_ASSERT 1 # define GLM_HAS_STATIC_ASSERT 1
#else #else
# define GLM_HAS_STATIC_ASSERT ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_STATIC_ASSERT ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA)) || \ ((GLM_COMPILER & GLM_COMPILER_CUDA)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010)))) ((GLM_COMPILER & GLM_COMPILER_VC))))
#endif #endif
// N1988 // N1988
@ -309,10 +309,10 @@
# define GLM_HAS_EXTENDED_INTEGER_TYPE 1 # define GLM_HAS_EXTENDED_INTEGER_TYPE 1
#else #else
# define GLM_HAS_EXTENDED_INTEGER_TYPE (\ # define GLM_HAS_EXTENDED_INTEGER_TYPE (\
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CUDA)) || \ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CUDA)) || \
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC)) || \
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER >= GLM_COMPILER_CLANG30))) ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG)))
#endif #endif
// N2235 // N2235
@ -324,8 +324,9 @@
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR # define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
#else #else
# define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)))) // GCC 4.6 support constexpr but there is a compiler bug causing a crash ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)))) // GCC 4.6 support constexpr but there is a compiler bug causing a crash
# define GLM_HAS_CONSTEXPR_PARTIAL (GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015))) # define GLM_HAS_CONSTEXPR_PARTIAL (GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)))
#endif #endif
// N2672 // N2672
@ -335,8 +336,8 @@
# define GLM_HAS_INITIALIZER_LISTS 1 # define GLM_HAS_INITIALIZER_LISTS 1
#else #else
# define GLM_HAS_INITIALIZER_LISTS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_INITIALIZER_LISTS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75))))
#endif #endif
@ -361,8 +362,8 @@
# define GLM_HAS_DEFAULTED_FUNCTIONS 1 # define GLM_HAS_DEFAULTED_FUNCTIONS 1
#else #else
# define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12)) || \ ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12)) || \
(GLM_COMPILER & GLM_COMPILER_CUDA))) (GLM_COMPILER & GLM_COMPILER_CUDA)))
#endif #endif
@ -374,8 +375,8 @@
# define GLM_HAS_RVALUE_REFERENCES 1 # define GLM_HAS_RVALUE_REFERENCES 1
#else #else
# define GLM_HAS_RVALUE_REFERENCES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_RVALUE_REFERENCES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif #endif
@ -388,7 +389,7 @@
# define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC45)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC45)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \ ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif #endif
@ -401,7 +402,7 @@
# define GLM_HAS_TEMPLATE_ALIASES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_TEMPLATE_ALIASES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12_1)) || \ ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12_1)) || \
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC47)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC47)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif #endif
@ -414,7 +415,7 @@
# define GLM_HAS_RANGE_FOR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_RANGE_FOR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL13)) || \ ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL13)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif #endif
@ -427,7 +428,7 @@
# define GLM_HAS_ALIGNOF ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_ALIGNOF ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)) || \ ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA70)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA70))))
#endif #endif
@ -436,6 +437,7 @@
# define GLM_HAS_ASSIGNABLE 1 # define GLM_HAS_ASSIGNABLE 1
#else #else
# define GLM_HAS_ASSIGNABLE ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_ASSIGNABLE ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))) ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49))))
#endif #endif
@ -447,7 +449,7 @@
# define GLM_HAS_MAKE_SIGNED 1 # define GLM_HAS_MAKE_SIGNED 1
#else #else
# define GLM_HAS_MAKE_SIGNED ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ # define GLM_HAS_MAKE_SIGNED ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50)))) ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif #endif
@ -455,7 +457,8 @@
# define GLM_HAS_BITSCAN_WINDOWS 0 # define GLM_HAS_BITSCAN_WINDOWS 0
#else #else
# define GLM_HAS_BITSCAN_WINDOWS ((GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\ # define GLM_HAS_BITSCAN_WINDOWS ((GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)))) ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH & GLM_ARCH_X86_BIT))))
#endif #endif
// OpenMP // OpenMP
@ -481,7 +484,7 @@
# define GLM_HAS_OPENMP 0 # define GLM_HAS_OPENMP 0
# endif # endif
# elif GLM_COMPILER & GLM_COMPILER_VC # elif GLM_COMPILER & GLM_COMPILER_VC
# if GLM_COMPILER >= GLM_COMPILER_VC2010 # if GLM_COMPILER >= GLM_COMPILER_VC10
# define GLM_HAS_OPENMP 20 # define GLM_HAS_OPENMP 20
# else # else
# define GLM_HAS_OPENMP 0 # define GLM_HAS_OPENMP 0
@ -640,7 +643,7 @@
# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
# define GLM_RESTRICT_FUNC __declspec(restrict) # define GLM_RESTRICT_FUNC __declspec(restrict)
# define GLM_RESTRICT __restrict # define GLM_RESTRICT __restrict
# if GLM_COMPILER >= GLM_COMPILER_VC2013 # if GLM_COMPILER >= GLM_COMPILER_VC12
# define GLM_VECTOR_CALL __vectorcall # define GLM_VECTOR_CALL __vectorcall
# else # else
# define GLM_VECTOR_CALL # define GLM_VECTOR_CALL
@ -693,11 +696,7 @@
#if GLM_HAS_CONSTEXPR #if GLM_HAS_CONSTEXPR
# define GLM_CONSTEXPR constexpr # define GLM_CONSTEXPR constexpr
//# if GLM_ARCH == GLM_ARCH_PURE
# define GLM_CONSTEXPR_CTOR constexpr # define GLM_CONSTEXPR_CTOR constexpr
//# else
//# define GLM_CONSTEXPR_CTOR
//# endif
# define GLM_RELAXED_CONSTEXPR constexpr # define GLM_RELAXED_CONSTEXPR constexpr
#elif GLM_HAS_CONSTEXPR_PARTIAL #elif GLM_HAS_CONSTEXPR_PARTIAL
# define GLM_CONSTEXPR constexpr # define GLM_CONSTEXPR constexpr
@ -709,6 +708,12 @@
# define GLM_RELAXED_CONSTEXPR const # define GLM_RELAXED_CONSTEXPR const
#endif #endif
#if GLM_ARCH == GLM_ARCH_PURE
# define GLM_CONSTEXPR_SIMD GLM_CONSTEXPR_CTOR
#else
# define GLM_CONSTEXPR_SIMD
#endif
#ifdef GLM_FORCE_EXPLICIT_CTOR #ifdef GLM_FORCE_EXPLICIT_CTOR
# define GLM_EXPLICIT explicit # define GLM_EXPLICIT explicit
#else #else

View File

@ -86,22 +86,22 @@ namespace glm
// -- Implicit basic constructors -- // -- Implicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4() GLM_DEFAULT_CTOR; GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4(tvec4<T, P> const& v) GLM_DEFAULT; GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(tvec4<T, P> const& v) GLM_DEFAULT;
template <precision Q> template <precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4(tvec4<T, Q> const& v); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(tvec4<T, Q> const& v);
// -- Explicit basic constructors -- // -- Explicit basic constructors --
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec4(ctor); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit tvec4(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec4(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit tvec4(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4(T a, T b, T c, T d); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(T a, T b, T c, T d);
// -- Conversion scalar constructors -- // -- Conversion scalar constructors --
/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) /// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template <typename A, typename B, typename C, typename D> template <typename A, typename B, typename C, typename D>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4(A a, B b, C c, D d); GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(A a, B b, C c, D d);
template <typename A, typename B, typename C, typename D> template <typename A, typename B, typename C, typename D>
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4(tvec1<A, P> const& a, tvec1<B, P> const& b, tvec1<C, P> const& c, tvec1<D, P> const& d); GLM_FUNC_DECL GLM_CONSTEXPR_CTOR tvec4(tvec1<A, P> const& a, tvec1<B, P> const& b, tvec1<C, P> const& c, tvec1<D, P> const& d);

View File

@ -156,7 +156,7 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4()
# ifndef GLM_FORCE_NO_CTOR_INIT # ifndef GLM_FORCE_NO_CTOR_INIT
: x(0), y(0), z(0), w(0) : x(0), y(0), z(0), w(0)
# endif # endif
@ -165,30 +165,30 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(tvec4<T, P> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(tvec4<T, P> const & v)
: x(v.x), y(v.y), z(v.z), w(v.w) : x(v.x), y(v.y), z(v.z), w(v.w)
{} {}
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template <typename T, precision P> template <typename T, precision P>
template <precision Q> template <precision Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(tvec4<T, Q> const & v) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(tvec4<T, Q> const & v)
: x(v.x), y(v.y), z(v.z), w(v.w) : x(v.x), y(v.y), z(v.z), w(v.w)
{} {}
// -- Explicit basic constructors -- // -- Explicit basic constructors --
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(ctor) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(ctor)
{} {}
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(T scalar) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(T scalar)
: x(scalar), y(scalar), z(scalar), w(scalar) : x(scalar), y(scalar), z(scalar), w(scalar)
{} {}
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(T a, T b, T c, T d) GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(T a, T b, T c, T d)
: x(a), y(b), z(c), w(d) : x(a), y(b), z(c), w(d)
{} {}
@ -196,7 +196,7 @@ namespace detail
template <typename T, precision P> template <typename T, precision P>
template <typename A, typename B, typename C, typename D> template <typename A, typename B, typename C, typename D>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<T, P>::tvec4(A a, B b, C c, D d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<T, P>::tvec4(A a, B b, C c, D d) :
x(static_cast<T>(a)), x(static_cast<T>(a)),
y(static_cast<T>(b)), y(static_cast<T>(b)),
z(static_cast<T>(c)), z(static_cast<T>(c)),

View File

@ -341,21 +341,21 @@ namespace detail
# if !GLM_HAS_DEFAULTED_FUNCTIONS # if !GLM_HAS_DEFAULTED_FUNCTIONS
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_lowp>::tvec4() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4()
# ifndef GLM_FORCE_NO_CTOR_INIT # ifndef GLM_FORCE_NO_CTOR_INIT
: data(_mm_setzero_ps()) : data(_mm_setzero_ps())
# endif # endif
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_mediump>::tvec4() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4()
# ifndef GLM_FORCE_NO_CTOR_INIT # ifndef GLM_FORCE_NO_CTOR_INIT
: data(_mm_setzero_ps()) : data(_mm_setzero_ps())
# endif # endif
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_highp>::tvec4() GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4()
# ifndef GLM_FORCE_NO_CTOR_INIT # ifndef GLM_FORCE_NO_CTOR_INIT
: data(_mm_setzero_ps()) : data(_mm_setzero_ps())
# endif # endif
@ -363,117 +363,117 @@ namespace detail
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_lowp>::tvec4(float s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(float s) :
data(_mm_set1_ps(s)) data(_mm_set1_ps(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_mediump>::tvec4(float s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(float s) :
data(_mm_set1_ps(s)) data(_mm_set1_ps(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_highp>::tvec4(float s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(float s) :
data(_mm_set1_ps(s)) data(_mm_set1_ps(s))
{} {}
# if GLM_ARCH & GLM_ARCH_AVX_BIT # if GLM_ARCH & GLM_ARCH_AVX_BIT
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<double, aligned_lowp>::tvec4(double s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_lowp>::tvec4(double s) :
data(_mm256_set1_pd(s)) data(_mm256_set1_pd(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<double, aligned_mediump>::tvec4(double s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_mediump>::tvec4(double s) :
data(_mm256_set1_pd(s)) data(_mm256_set1_pd(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<double, aligned_highp>::tvec4(double s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_highp>::tvec4(double s) :
data(_mm256_set1_pd(s)) data(_mm256_set1_pd(s))
{} {}
# endif # endif
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int32, aligned_lowp>::tvec4(int32 s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 s) :
data(_mm_set1_epi32(s)) data(_mm_set1_epi32(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int32, aligned_mediump>::tvec4(int32 s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::tvec4(int32 s) :
data(_mm_set1_epi32(s)) data(_mm_set1_epi32(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int32, aligned_highp>::tvec4(int32 s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::tvec4(int32 s) :
data(_mm_set1_epi32(s)) data(_mm_set1_epi32(s))
{} {}
# if GLM_ARCH & GLM_ARCH_AVX2_BIT # if GLM_ARCH & GLM_ARCH_AVX2_BIT
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int64, aligned_lowp>::tvec4(int64 s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_lowp>::tvec4(int64 s) :
data(_mm256_set1_epi64x(s)) data(_mm256_set1_epi64x(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int64, aligned_mediump>::tvec4(int64 s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_mediump>::tvec4(int64 s) :
data(_mm256_set1_epi64x(s)) data(_mm256_set1_epi64x(s))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int64, aligned_highp>::tvec4(int64 s) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_highp>::tvec4(int64 s) :
data(_mm256_set1_epi64x(s)) data(_mm256_set1_epi64x(s))
{} {}
# endif # endif
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_lowp>::tvec4(float a, float b, float c, float d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(float a, float b, float c, float d) :
data(_mm_set_ps(d, c, b, a)) data(_mm_set_ps(d, c, b, a))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_mediump>::tvec4(float a, float b, float c, float d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(float a, float b, float c, float d) :
data(_mm_set_ps(d, c, b, a)) data(_mm_set_ps(d, c, b, a))
{} {}
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_highp>::tvec4(float a, float b, float c, float d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(float a, float b, float c, float d) :
data(_mm_set_ps(d, c, b, a)) data(_mm_set_ps(d, c, b, a))
{} {}
template <> template <>
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int32, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) :
data(_mm_set_epi32(d, c, b, a)) data(_mm_set_epi32(d, c, b, a))
{} {}
template <> template <>
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int32, aligned_mediump>::tvec4(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::tvec4(int32 a, int32 b, int32 c, int32 d) :
data(_mm_set_epi32(d, c, b, a)) data(_mm_set_epi32(d, c, b, a))
{} {}
template <> template <>
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<int32, aligned_highp>::tvec4(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::tvec4(int32 a, int32 b, int32 c, int32 d) :
data(_mm_set_epi32(d, c, b, a)) data(_mm_set_epi32(d, c, b, a))
{} {}
template <> template <>
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
{} {}
template <> template <>
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_mediump>::tvec4(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(int32 a, int32 b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
{} {}
template <> template <>
template <> template <>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_highp>::tvec4(int32 a, int32 b, int32 c, int32 d) : GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(int32 a, int32 b, int32 c, int32 d) :
data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a)))
{} {}
}//namespace glm }//namespace glm

View File

@ -86,10 +86,11 @@
// Visual C++ defines // Visual C++ defines
#define GLM_COMPILER_VC 0x01000000 #define GLM_COMPILER_VC 0x01000000
#define GLM_COMPILER_VC2010 0x01000090 #define GLM_COMPILER_VC10 0x01000090
#define GLM_COMPILER_VC2012 0x010000A0 #define GLM_COMPILER_VC11 0x010000A0
#define GLM_COMPILER_VC2013 0x010000B0 #define GLM_COMPILER_VC12 0x010000B0
#define GLM_COMPILER_VC2015 0x010000C0 #define GLM_COMPILER_VC14 0x010000C0
#define GLM_COMPILER_VC15 0x010000D0
// GCC defines // GCC defines
#define GLM_COMPILER_GCC 0x02000000 #define GLM_COMPILER_GCC 0x02000000
@ -134,6 +135,9 @@
#define GLM_COMPILER_CLANG37 0x20000080 #define GLM_COMPILER_CLANG37 0x20000080
#define GLM_COMPILER_CLANG38 0x20000090 #define GLM_COMPILER_CLANG38 0x20000090
#define GLM_COMPILER_CLANG39 0x200000A0 #define GLM_COMPILER_CLANG39 0x200000A0
#define GLM_COMPILER_CLANG40 0x200000B0
#define GLM_COMPILER_CLANG41 0x200000C0
#define GLM_COMPILER_CLANG42 0x200000D0
// Build model // Build model
#define GLM_MODEL_32 0x00000010 #define GLM_MODEL_32 0x00000010
@ -208,8 +212,14 @@
# define GLM_COMPILER GLM_COMPILER_CLANG38 # define GLM_COMPILER GLM_COMPILER_CLANG38
# elif __clang_major__ == 3 && __clang_minor__ >= 9 # elif __clang_major__ == 3 && __clang_minor__ >= 9
# define GLM_COMPILER GLM_COMPILER_CLANG39 # define GLM_COMPILER GLM_COMPILER_CLANG39
# elif __clang_major__ == 4 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_CLANG40
# elif __clang_major__ == 4 && __clang_minor__ == 1
# define GLM_COMPILER GLM_COMPILER_CLANG41
# elif __clang_major__ == 4 && __clang_minor__ >= 2
# define GLM_COMPILER GLM_COMPILER_CLANG42
# elif __clang_major__ >= 4 # elif __clang_major__ >= 4
# define GLM_COMPILER GLM_COMPILER_CLANG39 # define GLM_COMPILER GLM_COMPILER_CLANG42
# else # else
# define GLM_COMPILER GLM_COMPILER_CLANG # define GLM_COMPILER GLM_COMPILER_CLANG
# endif # endif
@ -218,15 +228,17 @@
// Visual C++ // Visual C++
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
# if _MSC_VER < 1600 # if _MSC_VER < 1600
# error "GLM requires Visual C++ 2010 or higher" # error "GLM requires Visual C++ 10 - 2010 or higher"
# elif _MSC_VER == 1600 # elif _MSC_VER == 1600
# define GLM_COMPILER GLM_COMPILER_VC2010 # define GLM_COMPILER GLM_COMPILER_VC11
# elif _MSC_VER == 1700 # elif _MSC_VER == 1700
# define GLM_COMPILER GLM_COMPILER_VC2012 # define GLM_COMPILER GLM_COMPILER_VC11
# elif _MSC_VER == 1800 # elif _MSC_VER == 1800
# define GLM_COMPILER GLM_COMPILER_VC2013 # define GLM_COMPILER GLM_COMPILER_VC12
# elif _MSC_VER >= 1900 # elif _MSC_VER == 1900
# define GLM_COMPILER GLM_COMPILER_VC2015 # define GLM_COMPILER GLM_COMPILER_VC14
# elif _MSC_VER >= 1910
# define GLM_COMPILER GLM_COMPILER_VC15
# else//_MSC_VER # else//_MSC_VER
# define GLM_COMPILER GLM_COMPILER_VC # define GLM_COMPILER GLM_COMPILER_VC
# endif//_MSC_VER # endif//_MSC_VER

View File

@ -69,6 +69,11 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Removed GLM_LEFT_HANDED, use GLM_FORCE_LEFT_HANDED instead - Removed GLM_LEFT_HANDED, use GLM_FORCE_LEFT_HANDED instead
#### [GLM 0.9.8.2](https://github.com/g-truc/glm/tree/0.9.8) - 2016-09-25 #### [GLM 0.9.8.2](https://github.com/g-truc/glm/tree/0.9.8) - 2016-09-25
##### Improvements:
- Added Visual C++ 15 detection
- Added Clang 4.0 detection
- Refactored GLM_COMPILER_VC values
##### Fixes: ##### Fixes:
- Fixed Visual C++ constexpr build error #555, #556 - Fixed Visual C++ constexpr build error #555, #556

View File

@ -1,4 +1,6 @@
#ifndef GLM_FORCE_PURE
# define GLM_FORCE_PURE # define GLM_FORCE_PURE
#endif//GLM_FORCE_PURE
#define GLM_FORCE_ALIGNED #define GLM_FORCE_ALIGNED
#define GLM_FORCE_SWIZZLE #define GLM_FORCE_SWIZZLE
#include <glm/vector_relational.hpp> #include <glm/vector_relational.hpp>

View File

@ -10,17 +10,20 @@ int test_compiler()
{ {
switch(GLM_COMPILER) switch(GLM_COMPILER)
{ {
case GLM_COMPILER_VC2010: case GLM_COMPILER_VC10:
std::printf("GLM_COMPILER_VC2010\n"); std::printf("Visual C++ 10 - 2010\n");
break; break;
case GLM_COMPILER_VC2012: case GLM_COMPILER_VC11:
std::printf("GLM_COMPILER_VC2012\n"); std::printf("Visual C++ 11 - 2012\n");
break; break;
case GLM_COMPILER_VC2013: case GLM_COMPILER_VC12:
std::printf("GLM_COMPILER_VC2013\n"); std::printf("Visual C++ 12 - 2013\n");
break; break;
case GLM_COMPILER_VC2015: case GLM_COMPILER_VC14:
std::printf("GLM_COMPILER_VC2015\n"); std::printf("Visual C++ 14 - 2015\n");
break;
case GLM_COMPILER_VC15:
std::printf("Visual C++ 15 - 201X\n");
break; break;
default: default:
std::printf("Visual C++ version not detected\n"); std::printf("Visual C++ version not detected\n");
@ -33,58 +36,58 @@ int test_compiler()
switch(GLM_COMPILER) switch(GLM_COMPILER)
{ {
case GLM_COMPILER_GCC44: case GLM_COMPILER_GCC44:
std::printf("GLM_COMPILER_GCC44\n"); std::printf("GCC 4.4\n");
break; break;
case GLM_COMPILER_GCC45: case GLM_COMPILER_GCC45:
std::printf("GLM_COMPILER_GCC45\n"); std::printf("GCC 4.5\n");
break; break;
case GLM_COMPILER_GCC46: case GLM_COMPILER_GCC46:
std::printf("GLM_COMPILER_GCC46\n"); std::printf("GCC 4.6\n");
break; break;
case GLM_COMPILER_GCC47: case GLM_COMPILER_GCC47:
std::printf("GLM_COMPILER_GCC47\n"); std::printf("GCC 4.7\n");
break; break;
case GLM_COMPILER_GCC48: case GLM_COMPILER_GCC48:
std::printf("GLM_COMPILER_GCC48\n"); std::printf("GCC 4.8\n");
break; break;
case GLM_COMPILER_GCC49: case GLM_COMPILER_GCC49:
std::printf("GLM_COMPILER_GCC49\n"); std::printf("GCC 4.9\n");
break; break;
case GLM_COMPILER_GCC50: case GLM_COMPILER_GCC50:
std::printf("GLM_COMPILER_GCC50\n"); std::printf("GCC 5.0\n");
break; break;
case GLM_COMPILER_GCC51: case GLM_COMPILER_GCC51:
std::printf("GLM_COMPILER_GCC51\n"); std::printf("GCC 5.1\n");
break; break;
case GLM_COMPILER_GCC52: case GLM_COMPILER_GCC52:
std::printf("GLM_COMPILER_GCC52\n"); std::printf("GCC 5.2\n");
break; break;
case GLM_COMPILER_GCC53: case GLM_COMPILER_GCC53:
std::printf("GLM_COMPILER_GCC53\n"); std::printf("GCC 5.3\n");
break; break;
case GLM_COMPILER_GCC54: case GLM_COMPILER_GCC54:
std::printf("GLM_COMPILER_GCC54\n"); std::printf("GCC 5.4\n");
break; break;
case GLM_COMPILER_GCC60: case GLM_COMPILER_GCC60:
std::printf("GLM_COMPILER_GCC60\n"); std::printf("GCC 6.0\n");
break; break;
case GLM_COMPILER_GCC61: case GLM_COMPILER_GCC61:
std::printf("GLM_COMPILER_GCC61\n"); std::printf("GCC 6.1\n");
break; break;
case GLM_COMPILER_GCC62: case GLM_COMPILER_GCC62:
std::printf("GLM_COMPILER_GCC62\n"); std::printf("GCC 6.2\n");
break; break;
case GLM_COMPILER_GCC70: case GLM_COMPILER_GCC70:
std::printf("GLM_COMPILER_GCC70\n"); std::printf("GCC 7.0\n");
break; break;
case GLM_COMPILER_GCC71: case GLM_COMPILER_GCC71:
std::printf("GLM_COMPILER_GCC71\n"); std::printf("GCC 7.1\n");
break; break;
case GLM_COMPILER_GCC72: case GLM_COMPILER_GCC72:
std::printf("GLM_COMPILER_GCC72\n"); std::printf("GCC 7.2\n");
break; break;
case GLM_COMPILER_GCC80: case GLM_COMPILER_GCC80:
std::printf("GLM_COMPILER_GCC80\n"); std::printf("GCC 8.0\n");
break; break;
default: default:
std::printf("GCC version not detected\n"); std::printf("GCC version not detected\n");
@ -94,35 +97,44 @@ int test_compiler()
} }
else if(GLM_COMPILER & GLM_COMPILER_CUDA) else if(GLM_COMPILER & GLM_COMPILER_CUDA)
{ {
std::printf("GLM_COMPILER_CUDA\n"); std::printf("CUDA\n");
} }
else if(GLM_COMPILER & GLM_COMPILER_CLANG) else if(GLM_COMPILER & GLM_COMPILER_CLANG)
{ {
switch(GLM_COMPILER) switch(GLM_COMPILER)
{ {
case GLM_COMPILER_CLANG32: case GLM_COMPILER_CLANG32:
std::printf("GLM_COMPILER_CLANG32\n"); std::printf("Clang 3.2\n");
break; break;
case GLM_COMPILER_CLANG33: case GLM_COMPILER_CLANG33:
std::printf("GLM_COMPILER_CLANG33\n"); std::printf("Clang 3.3\n");
break; break;
case GLM_COMPILER_CLANG34: case GLM_COMPILER_CLANG34:
std::printf("GLM_COMPILER_CLANG34\n"); std::printf("Clang 3.4\n");
break; break;
case GLM_COMPILER_CLANG35: case GLM_COMPILER_CLANG35:
std::printf("GLM_COMPILER_CLANG35\n"); std::printf("Clang 3.5\n");
break; break;
case GLM_COMPILER_CLANG36: case GLM_COMPILER_CLANG36:
std::printf("GLM_COMPILER_CLANG36\n"); std::printf("Clang 3.6\n");
break; break;
case GLM_COMPILER_CLANG37: case GLM_COMPILER_CLANG37:
std::printf("GLM_COMPILER_CLANG37\n"); std::printf("Clang 3.7\n");
break; break;
case GLM_COMPILER_CLANG38: case GLM_COMPILER_CLANG38:
std::printf("GLM_COMPILER_CLANG38\n"); std::printf("Clang 3.8\n");
break; break;
case GLM_COMPILER_CLANG39: case GLM_COMPILER_CLANG39:
std::printf("GLM_COMPILER_CLANG39\n"); std::printf("Clang 3.9\n");
break;
case GLM_COMPILER_CLANG40:
std::printf("Clang 4.0\n");
break;
case GLM_COMPILER_CLANG41:
std::printf("Clang 4.1\n");
break;
case GLM_COMPILER_CLANG42:
std::printf("Clang 4.2\n");
break; break;
default: default:
std::printf("LLVM version not detected\n"); std::printf("LLVM version not detected\n");
@ -134,22 +146,22 @@ int test_compiler()
switch(GLM_COMPILER) switch(GLM_COMPILER)
{ {
case GLM_COMPILER_INTEL12: case GLM_COMPILER_INTEL12:
std::printf("GLM_COMPILER_INTEL12\n"); std::printf("ICC 12\n");
break; break;
case GLM_COMPILER_INTEL12_1: case GLM_COMPILER_INTEL12_1:
std::printf("GLM_COMPILER_INTEL12_1\n"); std::printf("ICC 12.1\n");
break; break;
case GLM_COMPILER_INTEL13: case GLM_COMPILER_INTEL13:
std::printf("GLM_COMPILER_INTEL13\n"); std::printf("ICC 13\n");
break; break;
case GLM_COMPILER_INTEL14: case GLM_COMPILER_INTEL14:
std::printf("GLM_COMPILER_INTEL14\n"); std::printf("ICC 14\n");
break; break;
case GLM_COMPILER_INTEL15: case GLM_COMPILER_INTEL15:
std::printf("GLM_COMPILER_INTEL15\n"); std::printf("ICC 15\n");
break; break;
case GLM_COMPILER_INTEL16: case GLM_COMPILER_INTEL16:
std::printf("GLM_COMPILER_INTEL16\n"); std::printf("ICC 16\n");
break; break;
default: default:
std::printf("Intel compiler version not detected\n"); std::printf("Intel compiler version not detected\n");

View File

@ -341,7 +341,7 @@ namespace bitfieldInterleave
return REG1 | (REG2 << 1); return REG1 | (REG2 << 1);
} }
*/ */
#if(GLM_ARCH != GLM_ARCH_PURE) #if GLM_ARCH & GLM_ARCH_SSE2_BIT
inline glm::uint64 sseBitfieldInterleave(glm::uint32 x, glm::uint32 y) inline glm::uint64 sseBitfieldInterleave(glm::uint32 x, glm::uint32 y)
{ {
GLM_ALIGN(16) glm::uint32 const Array[4] = {x, 0, y, 0}; GLM_ALIGN(16) glm::uint32 const Array[4] = {x, 0, y, 0};
@ -457,7 +457,7 @@ namespace bitfieldInterleave
return Result[0]; return Result[0];
} }
#endif//(GLM_ARCH != GLM_ARCH_PURE) #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
int test() int test()
{ {
@ -563,7 +563,7 @@ namespace bitfieldInterleave
std::printf("interleaveBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time)); std::printf("interleaveBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
} }
# if(GLM_ARCH != GLM_ARCH_PURE) # if GLM_ARCH & GLM_ARCH_SSE2_BIT
{ {
std::clock_t LastTime = std::clock(); std::clock_t LastTime = std::clock();
@ -585,7 +585,7 @@ namespace bitfieldInterleave
std::printf("sseUnalignedBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time)); std::printf("sseUnalignedBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
} }
# endif//(GLM_ARCH != GLM_ARCH_PURE) # endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
{ {
std::clock_t LastTime = std::clock(); std::clock_t LastTime = std::clock();