mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 10:14:35 +00:00
Merge branch '0.9.8'
This commit is contained in:
commit
09a81dad23
@ -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/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>
|
||||
GLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);
|
||||
# endif
|
||||
|
@ -178,11 +178,11 @@
|
||||
# ifdef _MSC_EXTENSIONS
|
||||
# if __cplusplus >= 201402L
|
||||
# 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)
|
||||
# elif __cplusplus >= 201103L
|
||||
# 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)
|
||||
# elif __cplusplus >= 199711L
|
||||
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
||||
@ -194,7 +194,7 @@
|
||||
# define GLM_LANG GLM_LANG_CXX14
|
||||
# elif __cplusplus >= 201103L
|
||||
# define GLM_LANG GLM_LANG_CXX11
|
||||
# elif GLM_COMPILER >= GLM_COMPILER_VC2010
|
||||
# elif GLM_COMPILER >= GLM_COMPILER_VC10
|
||||
# define GLM_LANG GLM_LANG_CXX0X
|
||||
# elif __cplusplus >= 199711L
|
||||
# define GLM_LANG GLM_LANG_CXX98
|
||||
@ -288,7 +288,7 @@
|
||||
#else
|
||||
# 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_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))))
|
||||
#endif
|
||||
|
||||
@ -299,9 +299,9 @@
|
||||
# define GLM_HAS_STATIC_ASSERT 1
|
||||
#else
|
||||
# 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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010))))
|
||||
((GLM_COMPILER & GLM_COMPILER_VC))))
|
||||
#endif
|
||||
|
||||
// N1988
|
||||
@ -309,10 +309,10 @@
|
||||
# define GLM_HAS_EXTENDED_INTEGER_TYPE 1
|
||||
#else
|
||||
# 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_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
||||
((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_GCC)) || \
|
||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG)))
|
||||
#endif
|
||||
|
||||
// N2235
|
||||
@ -324,8 +324,9 @@
|
||||
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
|
||||
#else
|
||||
# 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
|
||||
# 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
|
||||
|
||||
// N2672
|
||||
@ -335,8 +336,8 @@
|
||||
# define GLM_HAS_INITIALIZER_LISTS 1
|
||||
#else
|
||||
# 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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75))))
|
||||
#endif
|
||||
|
||||
@ -361,8 +362,8 @@
|
||||
# define GLM_HAS_DEFAULTED_FUNCTIONS 1
|
||||
#else
|
||||
# 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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12)) || \
|
||||
(GLM_COMPILER & GLM_COMPILER_CUDA)))
|
||||
#endif
|
||||
@ -374,8 +375,8 @@
|
||||
# define GLM_HAS_RVALUE_REFERENCES 1
|
||||
#else
|
||||
# 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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \
|
||||
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
|
||||
#endif
|
||||
|
||||
@ -388,7 +389,7 @@
|
||||
# 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_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))))
|
||||
#endif
|
||||
|
||||
@ -401,7 +402,7 @@
|
||||
# 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_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))))
|
||||
#endif
|
||||
|
||||
@ -414,7 +415,7 @@
|
||||
# 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_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))))
|
||||
#endif
|
||||
|
||||
@ -427,7 +428,7 @@
|
||||
# define GLM_HAS_ALIGNOF ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
|
||||
((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))))
|
||||
#endif
|
||||
|
||||
@ -436,6 +437,7 @@
|
||||
# define GLM_HAS_ASSIGNABLE 1
|
||||
#else
|
||||
# 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))))
|
||||
#endif
|
||||
|
||||
@ -447,7 +449,7 @@
|
||||
# define GLM_HAS_MAKE_SIGNED 1
|
||||
#else
|
||||
# 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))))
|
||||
#endif
|
||||
|
||||
@ -455,7 +457,8 @@
|
||||
# define GLM_HAS_BITSCAN_WINDOWS 0
|
||||
#else
|
||||
# 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
|
||||
|
||||
// OpenMP
|
||||
@ -481,7 +484,7 @@
|
||||
# define GLM_HAS_OPENMP 0
|
||||
# endif
|
||||
# elif GLM_COMPILER & GLM_COMPILER_VC
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC2010
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC10
|
||||
# define GLM_HAS_OPENMP 20
|
||||
# else
|
||||
# define GLM_HAS_OPENMP 0
|
||||
@ -640,7 +643,7 @@
|
||||
# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
|
||||
# define GLM_RESTRICT_FUNC __declspec(restrict)
|
||||
# define GLM_RESTRICT __restrict
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC2013
|
||||
# if GLM_COMPILER >= GLM_COMPILER_VC12
|
||||
# define GLM_VECTOR_CALL __vectorcall
|
||||
# else
|
||||
# define GLM_VECTOR_CALL
|
||||
@ -693,11 +696,7 @@
|
||||
|
||||
#if GLM_HAS_CONSTEXPR
|
||||
# define GLM_CONSTEXPR constexpr
|
||||
//# if GLM_ARCH == GLM_ARCH_PURE
|
||||
# define GLM_CONSTEXPR_CTOR constexpr
|
||||
//# else
|
||||
//# define GLM_CONSTEXPR_CTOR
|
||||
//# endif
|
||||
# define GLM_CONSTEXPR_CTOR constexpr
|
||||
# define GLM_RELAXED_CONSTEXPR constexpr
|
||||
#elif GLM_HAS_CONSTEXPR_PARTIAL
|
||||
# define GLM_CONSTEXPR constexpr
|
||||
@ -709,6 +708,12 @@
|
||||
# define GLM_RELAXED_CONSTEXPR const
|
||||
#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
|
||||
# define GLM_EXPLICIT explicit
|
||||
#else
|
||||
|
@ -86,22 +86,22 @@ namespace glm
|
||||
|
||||
// -- Implicit basic constructors --
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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() GLM_DEFAULT_CTOR;
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(tvec4<T, P> const& v) GLM_DEFAULT;
|
||||
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 --
|
||||
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec4(ctor);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR_CTOR 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 explicit tvec4(ctor);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD explicit tvec4(T scalar);
|
||||
GLM_FUNC_DECL GLM_CONSTEXPR_SIMD tvec4(T a, T b, T c, T d);
|
||||
|
||||
// -- Conversion scalar constructors --
|
||||
|
||||
/// 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>
|
||||
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>
|
||||
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);
|
||||
|
||||
|
@ -156,7 +156,7 @@ namespace detail
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT)
|
||||
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
|
||||
: x(0), y(0), z(0), w(0)
|
||||
# endif
|
||||
@ -165,30 +165,30 @@ namespace detail
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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)
|
||||
{}
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
template <typename T, precision P>
|
||||
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)
|
||||
{}
|
||||
|
||||
// -- Explicit basic constructors --
|
||||
|
||||
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>
|
||||
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)
|
||||
{}
|
||||
|
||||
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)
|
||||
{}
|
||||
|
||||
@ -196,7 +196,7 @@ namespace detail
|
||||
|
||||
template <typename T, precision P>
|
||||
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)),
|
||||
y(static_cast<T>(b)),
|
||||
z(static_cast<T>(c)),
|
||||
|
@ -341,21 +341,21 @@ namespace detail
|
||||
|
||||
# if !GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
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
|
||||
: data(_mm_setzero_ps())
|
||||
# endif
|
||||
{}
|
||||
|
||||
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
|
||||
: data(_mm_setzero_ps())
|
||||
# endif
|
||||
{}
|
||||
|
||||
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
|
||||
: data(_mm_setzero_ps())
|
||||
# endif
|
||||
@ -363,117 +363,117 @@ namespace detail
|
||||
# endif//!GLM_HAS_DEFAULTED_FUNCTIONS
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_AVX_BIT
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
# endif
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_AVX2_BIT
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
# endif
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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))
|
||||
{}
|
||||
|
||||
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)))
|
||||
{}
|
||||
|
||||
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)))
|
||||
{}
|
||||
|
||||
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)))
|
||||
{}
|
||||
}//namespace glm
|
||||
|
@ -86,10 +86,11 @@
|
||||
|
||||
// Visual C++ defines
|
||||
#define GLM_COMPILER_VC 0x01000000
|
||||
#define GLM_COMPILER_VC2010 0x01000090
|
||||
#define GLM_COMPILER_VC2012 0x010000A0
|
||||
#define GLM_COMPILER_VC2013 0x010000B0
|
||||
#define GLM_COMPILER_VC2015 0x010000C0
|
||||
#define GLM_COMPILER_VC10 0x01000090
|
||||
#define GLM_COMPILER_VC11 0x010000A0
|
||||
#define GLM_COMPILER_VC12 0x010000B0
|
||||
#define GLM_COMPILER_VC14 0x010000C0
|
||||
#define GLM_COMPILER_VC15 0x010000D0
|
||||
|
||||
// GCC defines
|
||||
#define GLM_COMPILER_GCC 0x02000000
|
||||
@ -126,14 +127,17 @@
|
||||
|
||||
// Clang
|
||||
#define GLM_COMPILER_CLANG 0x20000000
|
||||
#define GLM_COMPILER_CLANG32 0x20000030
|
||||
#define GLM_COMPILER_CLANG33 0x20000040
|
||||
#define GLM_COMPILER_CLANG34 0x20000050
|
||||
#define GLM_COMPILER_CLANG35 0x20000060
|
||||
#define GLM_COMPILER_CLANG36 0x20000070
|
||||
#define GLM_COMPILER_CLANG37 0x20000080
|
||||
#define GLM_COMPILER_CLANG38 0x20000090
|
||||
#define GLM_COMPILER_CLANG39 0x200000A0
|
||||
#define GLM_COMPILER_CLANG32 0x20000030
|
||||
#define GLM_COMPILER_CLANG33 0x20000040
|
||||
#define GLM_COMPILER_CLANG34 0x20000050
|
||||
#define GLM_COMPILER_CLANG35 0x20000060
|
||||
#define GLM_COMPILER_CLANG36 0x20000070
|
||||
#define GLM_COMPILER_CLANG37 0x20000080
|
||||
#define GLM_COMPILER_CLANG38 0x20000090
|
||||
#define GLM_COMPILER_CLANG39 0x200000A0
|
||||
#define GLM_COMPILER_CLANG40 0x200000B0
|
||||
#define GLM_COMPILER_CLANG41 0x200000C0
|
||||
#define GLM_COMPILER_CLANG42 0x200000D0
|
||||
|
||||
// Build model
|
||||
#define GLM_MODEL_32 0x00000010
|
||||
@ -208,8 +212,14 @@
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG38
|
||||
# elif __clang_major__ == 3 && __clang_minor__ >= 9
|
||||
# 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
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG39
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG42
|
||||
# else
|
||||
# define GLM_COMPILER GLM_COMPILER_CLANG
|
||||
# endif
|
||||
@ -218,15 +228,17 @@
|
||||
// Visual C++
|
||||
#elif defined(_MSC_VER)
|
||||
# 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
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2010
|
||||
# define GLM_COMPILER GLM_COMPILER_VC11
|
||||
# elif _MSC_VER == 1700
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2012
|
||||
# define GLM_COMPILER GLM_COMPILER_VC11
|
||||
# elif _MSC_VER == 1800
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2013
|
||||
# elif _MSC_VER >= 1900
|
||||
# define GLM_COMPILER GLM_COMPILER_VC2015
|
||||
# define GLM_COMPILER GLM_COMPILER_VC12
|
||||
# elif _MSC_VER == 1900
|
||||
# define GLM_COMPILER GLM_COMPILER_VC14
|
||||
# elif _MSC_VER >= 1910
|
||||
# define GLM_COMPILER GLM_COMPILER_VC15
|
||||
# else//_MSC_VER
|
||||
# define GLM_COMPILER GLM_COMPILER_VC
|
||||
# endif//_MSC_VER
|
||||
|
@ -69,6 +69,11 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
||||
- 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
|
||||
##### Improvements:
|
||||
- Added Visual C++ 15 detection
|
||||
- Added Clang 4.0 detection
|
||||
- Refactored GLM_COMPILER_VC values
|
||||
|
||||
##### Fixes:
|
||||
- Fixed Visual C++ constexpr build error #555, #556
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
#define GLM_FORCE_PURE
|
||||
#ifndef GLM_FORCE_PURE
|
||||
# define GLM_FORCE_PURE
|
||||
#endif//GLM_FORCE_PURE
|
||||
#define GLM_FORCE_ALIGNED
|
||||
#define GLM_FORCE_SWIZZLE
|
||||
#include <glm/vector_relational.hpp>
|
||||
|
@ -10,17 +10,20 @@ int test_compiler()
|
||||
{
|
||||
switch(GLM_COMPILER)
|
||||
{
|
||||
case GLM_COMPILER_VC2010:
|
||||
std::printf("GLM_COMPILER_VC2010\n");
|
||||
case GLM_COMPILER_VC10:
|
||||
std::printf("Visual C++ 10 - 2010\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC2012:
|
||||
std::printf("GLM_COMPILER_VC2012\n");
|
||||
case GLM_COMPILER_VC11:
|
||||
std::printf("Visual C++ 11 - 2012\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC2013:
|
||||
std::printf("GLM_COMPILER_VC2013\n");
|
||||
case GLM_COMPILER_VC12:
|
||||
std::printf("Visual C++ 12 - 2013\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC2015:
|
||||
std::printf("GLM_COMPILER_VC2015\n");
|
||||
case GLM_COMPILER_VC14:
|
||||
std::printf("Visual C++ 14 - 2015\n");
|
||||
break;
|
||||
case GLM_COMPILER_VC15:
|
||||
std::printf("Visual C++ 15 - 201X\n");
|
||||
break;
|
||||
default:
|
||||
std::printf("Visual C++ version not detected\n");
|
||||
@ -33,58 +36,58 @@ int test_compiler()
|
||||
switch(GLM_COMPILER)
|
||||
{
|
||||
case GLM_COMPILER_GCC44:
|
||||
std::printf("GLM_COMPILER_GCC44\n");
|
||||
std::printf("GCC 4.4\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC45:
|
||||
std::printf("GLM_COMPILER_GCC45\n");
|
||||
std::printf("GCC 4.5\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC46:
|
||||
std::printf("GLM_COMPILER_GCC46\n");
|
||||
std::printf("GCC 4.6\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC47:
|
||||
std::printf("GLM_COMPILER_GCC47\n");
|
||||
std::printf("GCC 4.7\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC48:
|
||||
std::printf("GLM_COMPILER_GCC48\n");
|
||||
std::printf("GCC 4.8\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC49:
|
||||
std::printf("GLM_COMPILER_GCC49\n");
|
||||
std::printf("GCC 4.9\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC50:
|
||||
std::printf("GLM_COMPILER_GCC50\n");
|
||||
std::printf("GCC 5.0\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC51:
|
||||
std::printf("GLM_COMPILER_GCC51\n");
|
||||
std::printf("GCC 5.1\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC52:
|
||||
std::printf("GLM_COMPILER_GCC52\n");
|
||||
std::printf("GCC 5.2\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC53:
|
||||
std::printf("GLM_COMPILER_GCC53\n");
|
||||
std::printf("GCC 5.3\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC54:
|
||||
std::printf("GLM_COMPILER_GCC54\n");
|
||||
std::printf("GCC 5.4\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC60:
|
||||
std::printf("GLM_COMPILER_GCC60\n");
|
||||
std::printf("GCC 6.0\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC61:
|
||||
std::printf("GLM_COMPILER_GCC61\n");
|
||||
std::printf("GCC 6.1\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC62:
|
||||
std::printf("GLM_COMPILER_GCC62\n");
|
||||
std::printf("GCC 6.2\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC70:
|
||||
std::printf("GLM_COMPILER_GCC70\n");
|
||||
std::printf("GCC 7.0\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC71:
|
||||
std::printf("GLM_COMPILER_GCC71\n");
|
||||
std::printf("GCC 7.1\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC72:
|
||||
std::printf("GLM_COMPILER_GCC72\n");
|
||||
std::printf("GCC 7.2\n");
|
||||
break;
|
||||
case GLM_COMPILER_GCC80:
|
||||
std::printf("GLM_COMPILER_GCC80\n");
|
||||
std::printf("GCC 8.0\n");
|
||||
break;
|
||||
default:
|
||||
std::printf("GCC version not detected\n");
|
||||
@ -94,35 +97,44 @@ int test_compiler()
|
||||
}
|
||||
else if(GLM_COMPILER & GLM_COMPILER_CUDA)
|
||||
{
|
||||
std::printf("GLM_COMPILER_CUDA\n");
|
||||
std::printf("CUDA\n");
|
||||
}
|
||||
else if(GLM_COMPILER & GLM_COMPILER_CLANG)
|
||||
{
|
||||
switch(GLM_COMPILER)
|
||||
{
|
||||
case GLM_COMPILER_CLANG32:
|
||||
std::printf("GLM_COMPILER_CLANG32\n");
|
||||
std::printf("Clang 3.2\n");
|
||||
break;
|
||||
case GLM_COMPILER_CLANG33:
|
||||
std::printf("GLM_COMPILER_CLANG33\n");
|
||||
std::printf("Clang 3.3\n");
|
||||
break;
|
||||
case GLM_COMPILER_CLANG34:
|
||||
std::printf("GLM_COMPILER_CLANG34\n");
|
||||
std::printf("Clang 3.4\n");
|
||||
break;
|
||||
case GLM_COMPILER_CLANG35:
|
||||
std::printf("GLM_COMPILER_CLANG35\n");
|
||||
std::printf("Clang 3.5\n");
|
||||
break;
|
||||
case GLM_COMPILER_CLANG36:
|
||||
std::printf("GLM_COMPILER_CLANG36\n");
|
||||
std::printf("Clang 3.6\n");
|
||||
break;
|
||||
case GLM_COMPILER_CLANG37:
|
||||
std::printf("GLM_COMPILER_CLANG37\n");
|
||||
std::printf("Clang 3.7\n");
|
||||
break;
|
||||
case GLM_COMPILER_CLANG38:
|
||||
std::printf("GLM_COMPILER_CLANG38\n");
|
||||
std::printf("Clang 3.8\n");
|
||||
break;
|
||||
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;
|
||||
default:
|
||||
std::printf("LLVM version not detected\n");
|
||||
@ -134,22 +146,22 @@ int test_compiler()
|
||||
switch(GLM_COMPILER)
|
||||
{
|
||||
case GLM_COMPILER_INTEL12:
|
||||
std::printf("GLM_COMPILER_INTEL12\n");
|
||||
std::printf("ICC 12\n");
|
||||
break;
|
||||
case GLM_COMPILER_INTEL12_1:
|
||||
std::printf("GLM_COMPILER_INTEL12_1\n");
|
||||
std::printf("ICC 12.1\n");
|
||||
break;
|
||||
case GLM_COMPILER_INTEL13:
|
||||
std::printf("GLM_COMPILER_INTEL13\n");
|
||||
std::printf("ICC 13\n");
|
||||
break;
|
||||
case GLM_COMPILER_INTEL14:
|
||||
std::printf("GLM_COMPILER_INTEL14\n");
|
||||
std::printf("ICC 14\n");
|
||||
break;
|
||||
case GLM_COMPILER_INTEL15:
|
||||
std::printf("GLM_COMPILER_INTEL15\n");
|
||||
std::printf("ICC 15\n");
|
||||
break;
|
||||
case GLM_COMPILER_INTEL16:
|
||||
std::printf("GLM_COMPILER_INTEL16\n");
|
||||
std::printf("ICC 16\n");
|
||||
break;
|
||||
default:
|
||||
std::printf("Intel compiler version not detected\n");
|
||||
|
@ -341,7 +341,7 @@ namespace bitfieldInterleave
|
||||
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)
|
||||
{
|
||||
GLM_ALIGN(16) glm::uint32 const Array[4] = {x, 0, y, 0};
|
||||
@ -457,7 +457,7 @@ namespace bitfieldInterleave
|
||||
|
||||
return Result[0];
|
||||
}
|
||||
#endif//(GLM_ARCH != GLM_ARCH_PURE)
|
||||
#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
|
||||
|
||||
int test()
|
||||
{
|
||||
@ -563,7 +563,7 @@ namespace bitfieldInterleave
|
||||
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();
|
||||
|
||||
@ -585,7 +585,7 @@ namespace bitfieldInterleave
|
||||
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user