This commit is contained in:
Christophe Riccio 2016-05-04 21:08:03 +02:00
commit c8070624db
13 changed files with 102 additions and 99 deletions

View File

@ -255,7 +255,7 @@
# define GLM_CXX11_STATIC_ASSERT
# endif
#elif(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
#elif(GLM_COMPILER & GLM_COMPILER_LLVM)
# if(__has_feature(cxx_exceptions))
# define GLM_CXX98_EXCEPTIONS
# endif
@ -396,4 +396,4 @@
# define GLM_CXX11_VARIADIC_TEMPLATES
# endif
#endif//(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
#endif//(GLM_COMPILER & GLM_COMPILER_LLVM)

View File

@ -527,7 +527,7 @@ namespace detail
# else
return ::isnan(x) != 0;
# endif
# elif (GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))) && (GLM_PLATFORM & GLM_PLATFORM_ANDROID) && __cplusplus < 201103L
# elif (GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM)) && (GLM_PLATFORM & GLM_PLATFORM_ANDROID) && __cplusplus < 201103L
return _isnan(x) != 0;
# elif GLM_COMPILER & GLM_COMPILER_CUDA
return isnan(x) != 0;
@ -561,7 +561,7 @@ namespace detail
# else
return ::isinf(x);
# endif
# elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM)
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
return _isinf(x) != 0;
# else
@ -734,6 +734,6 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_FORCE_PURE
#if GLM_ARCH != GLM_ARCH_PURE
# include "func_common_simd.inl"
#endif

View File

@ -171,6 +171,6 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_FORCE_PURE
#if GLM_ARCH != GLM_ARCH_PURE
# include "func_geometric_simd.inl"
#endif

View File

@ -359,7 +359,7 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_FORCE_PURE
#if GLM_ARCH != GLM_ARCH_PURE
# include "func_integer_simd.inl"
#endif

View File

@ -279,7 +279,7 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_FORCE_PURE
#if GLM_ARCH != GLM_ARCH_PURE
# include "func_matrix_simd.inl"
#endif

View File

@ -28,10 +28,8 @@
# pragma message("GLM: CUDA compiler detected")
# elif GLM_COMPILER & GLM_COMPILER_VC
# pragma message("GLM: Visual C++ compiler detected")
# elif GLM_COMPILER & GLM_COMPILER_APPLE_CLANG
# pragma message("GLM: Clang compiler detected")
# elif GLM_COMPILER & GLM_COMPILER_LLVM
# pragma message("GLM: LLVM compiler detected")
# pragma message("GLM: Clang compiler detected")
# elif GLM_COMPILER & GLM_COMPILER_INTEL
# pragma message("GLM: Intel Compiler detected")
# elif GLM_COMPILER & GLM_COMPILER_GCC
@ -94,7 +92,7 @@
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
#elif defined(GLM_FORCE_SSE2)
# define GLM_ARCH (GLM_ARCH_SSE2)
#elif (GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX))
#elif (GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX))
// This is Skylake set of instruction set
# if defined(__AVX512BW__) && defined(__AVX512F__) && defined(__AVX512CD__) && defined(__AVX512VL__) && defined(__AVX512DQ__)
# define GLM_ARCH (GLM_ARCH_AVX512 | GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
@ -225,7 +223,7 @@
#elif defined(GLM_FORCE_CXX98)
# define GLM_LANG GLM_LANG_CXX98
#else
# if GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
# if GLM_COMPILER & GLM_COMPILER_LLVM
# if __cplusplus >= 201402L // GLM_COMPILER_LLVM34 + -std=c++14
# define GLM_LANG GLM_LANG_CXX14
# elif __has_feature(cxx_decltype_auto) && __has_feature(cxx_aggregate_nsdmi) // GLM_COMPILER_LLVM33 + -std=c++1y
@ -296,6 +294,17 @@
# else
# define GLM_LANG (GLM_LANG_CXX | GLM_MSC_EXT)
# endif
# elif GLM_COMPILER & GLM_COMPILER_CUDA
# ifdef _MSC_EXTENSIONS
# define GLM_MSC_EXT GLM_LANG_CXXMS_FLAG
# else
# define GLM_MSC_EXT 0
# endif
# if GLM_COMPILER >= GLM_COMPILER_CUDA75
# define GLM_LANG (GLM_LANG_CXX0X | GLM_MSC_EXT)
# else
# define GLM_LANG (GLM_LANG_CXX98 | GLM_MSC_EXT)
# endif
# else // Unknown compiler
# if __cplusplus >= 201402L
# define GLM_LANG GLM_LANG_CXX14
@ -347,7 +356,7 @@
#if GLM_PLATFORM == GLM_PLATFORM_ANDROID || GLM_PLATFORM == GLM_PLATFORM_CYGWIN
# define GLM_HAS_CXX11_STL 0
#elif GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#elif GLM_COMPILER & GLM_COMPILER_LLVM
# if __has_include(<__config>) // libc++
# include <__config>
//# else // libstdc++
@ -366,13 +375,14 @@
#endif
// N1720
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# 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_CUDA)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010))))
#endif
@ -382,13 +392,13 @@
#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_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_LLVM) && (GLM_COMPILER >= GLM_COMPILER_LLVM30)) || \
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_APPLE_CLANG) && (GLM_COMPILER >= GLM_COMPILER_APPLE_CLANG40)))
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_LLVM) && (GLM_COMPILER >= GLM_COMPILER_LLVM30)))
#endif
// N2235
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_CONSTEXPR __has_feature(cxx_constexpr)
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
@ -401,21 +411,22 @@
#endif
// N2672
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# 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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75))))
#endif
// N2544 Unrestricted unions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
#define GLM_NOT_BUGGY_VC32BITS (!(GLM_MODEL == GLM_MODEL_32 && (GLM_COMPILER & GLM_COMPILER_VC) && GLM_COMPILER < GLM_COMPILER_VC2013))
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
#elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG)
# define GLM_HAS_UNRESTRICTED_UNIONS 1
@ -423,13 +434,12 @@
# define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)) || \
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
#endif
//#define GLM_HAS_ANONYMOUS_UNION (((GLM_LANG & GLM_LANG_CXXMS_FLAG) | (GLM_LANG & GLM_LANG_CXX11_FLAG)) && GLM_NOT_BUGGY_VC32BITS)
// N2346
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_DEFAULTED_FUNCTIONS 1
@ -437,22 +447,24 @@
# 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_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12))))
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12)) || \
(GLM_COMPILER & GLM_COMPILER_CUDA)))
#endif
// N2118
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# 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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif
// N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
@ -460,11 +472,12 @@
# 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_VC2013)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif
// N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_TEMPLATE_ALIASES 1
@ -472,11 +485,12 @@
# 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_VC2013)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif
// N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
# define GLM_HAS_RANGE_FOR 1
@ -484,7 +498,8 @@
# 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_VC2012)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif
//
@ -503,7 +518,8 @@
# 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_VC2013)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA50))))
#endif
#if GLM_ARCH == GLM_ARCH_PURE
@ -516,19 +532,41 @@
// OpenMP
#ifdef _OPENMP
# if GLM_COMPILER & GLM_COMPILER_GCC
# if GLM_COMPILER >= GLM_COMPILER_GCC47
# if GLM_COMPILER >= GLM_COMPILER_GCC61
# define GLM_HAS_OPENMP 45
# elif GLM_COMPILER >= GLM_COMPILER_GCC49
# define GLM_HAS_OPENMP 40
# elif GLM_COMPILER >= GLM_COMPILER_GCC47
# define GLM_HAS_OPENMP 31
# elif GLM_COMPILER >= GLM_COMPILER_GCC44
# define GLM_HAS_OPENMP 30
# elif GLM_COMPILER >= GLM_COMPILER_GCC42
# define GLM_HAS_OPENMP 25
# else
# define GLM_HAS_OPENMP 0
# endif
# endif// GLM_COMPILER & GLM_COMPILER_GCC
# if GLM_COMPILER & GLM_COMPILER_VC
# elif GLM_COMPILER & GLM_COMPILER_LLVM
# if GLM_COMPILER >= GLM_COMPILER_LLVM38
# define GLM_HAS_OPENMP 31
# else
# define GLM_HAS_OPENMP 0
# endif
# elif GLM_COMPILER & GLM_COMPILER_VC
# if GLM_COMPILER >= GLM_COMPILER_VC2010
# define GLM_HAS_OPENMP 20
# else
# define GLM_HAS_OPENMP 0
# endif
# elif GLM_COMPILER & GLM_COMPILER_INTEL
# if GLM_COMPILER >= GLM_COMPILER_INTEL16
# define GLM_HAS_OPENMP 40
# elif GLM_COMPILER >= GLM_COMPILER_INTEL12
# define GLM_HAS_OPENMP 31
# else
# define GLM_HAS_OPENMP 0
# endif
# else
# define GLM_HAS_OPENMP 0
# endif// GLM_COMPILER & GLM_COMPILER_VC
#endif
@ -567,9 +605,12 @@
# if GLM_COMPILER & GLM_COMPILER_VC
# define GLM_INLINE __forceinline
# define GLM_NEVER_INLINE __declspec((noinline))
# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM)
# define GLM_INLINE inline __attribute__((__always_inline__))
# define GLM_NEVER_INLINE __attribute__((__noinline__))
# elif GLM_COMPILER & GLM_COMPILER_CUDA
# define GLM_INLINE __forceinline__
# define GLM_NEVER_INLINE __noinline__
# else
# define GLM_INLINE inline
# define GLM_NEVER_INLINE
@ -644,7 +685,7 @@
# else
# define GLM_VECTOR_CALL
# endif
#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_CUDA | GLM_COMPILER_INTEL)
#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM | GLM_COMPILER_CUDA | GLM_COMPILER_INTEL)
# define GLM_DEPRECATED __attribute__((__deprecated__))
# define GLM_ALIGN(x) __attribute__((aligned(x)))
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))

View File

@ -759,6 +759,6 @@ namespace detail
}
}//namespace glm
#if GLM_ARCH != GLM_FORCE_PURE
#if GLM_ARCH != GLM_ARCH_PURE
# include "type_mat4x4_simd.inl"
#endif

View File

@ -1180,6 +1180,6 @@ namespace glm
}
}//namespace glm
#if GLM_ARCH != GLM_FORCE_PURE
#if GLM_ARCH != GLM_ARCH_PURE
# include "type_vec4_simd.inl"
#endif

View File

@ -151,7 +151,7 @@ namespace detail
else if(glm::isinf(x))
return 0x1Fu << 6u;
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM)
uint Pack = 0u;
memcpy(&Pack, &x, sizeof(Pack));
# else
@ -172,7 +172,7 @@ namespace detail
uint Result = packed11ToFloat(x);
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM)
float Temp = 0;
memcpy(&Temp, &Result, sizeof(Temp));
return Temp;
@ -190,7 +190,7 @@ namespace detail
else if(glm::isinf(x))
return 0x1Fu << 5u;
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM)
uint Pack = 0;
memcpy(&Pack, &x, sizeof(Pack));
# else
@ -211,7 +211,7 @@ namespace detail
uint Result = packed10ToFloat(x);
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM)
float Temp = 0;
memcpy(&Temp, &Result, sizeof(Temp));
return Temp;

View File

@ -127,16 +127,6 @@
#define GLM_COMPILER_LLVM38 0x20000090
#define GLM_COMPILER_LLVM39 0x200000A0
// Apple Clang
#define GLM_COMPILER_APPLE_CLANG 0x40000000
#define GLM_COMPILER_APPLE_CLANG40 0x40000010
#define GLM_COMPILER_APPLE_CLANG41 0x40000020
#define GLM_COMPILER_APPLE_CLANG42 0x40000030
#define GLM_COMPILER_APPLE_CLANG50 0x40000040
#define GLM_COMPILER_APPLE_CLANG51 0x40000050
#define GLM_COMPILER_APPLE_CLANG60 0x40000060
#define GLM_COMPILER_APPLE_CLANG61 0x40000070
// Build model
#define GLM_MODEL_32 0x00000010
#define GLM_MODEL_64 0x00000020
@ -192,24 +182,18 @@
// Clang
#elif defined(__clang__)
# if GLM_PLATFORM & GLM_PLATFORM_APPLE
# if __clang_major__ == 4 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG40
# elif __clang_major__ == 4 && __clang_minor__ == 1
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG41
# elif __clang_major__ == 4 && __clang_minor__ == 2
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG42
# elif __clang_major__ == 5 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG50
# if __clang_major__ == 5 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_LLVM33
# elif __clang_major__ == 5 && __clang_minor__ == 1
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG51
# define GLM_COMPILER GLM_COMPILER_LLVM34
# elif __clang_major__ == 6 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG60
# define GLM_COMPILER GLM_COMPILER_LLVM35
# elif __clang_major__ == 6 && __clang_minor__ >= 1
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG61
# define GLM_COMPILER GLM_COMPILER_LLVM36
# elif __clang_major__ >= 7
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG61
# define GLM_COMPILER GLM_COMPILER_LLVM37
# else
# define GLM_COMPILER GLM_COMPILER_APPLE_CLANG
# define GLM_COMPILER GLM_COMPILER_LLVM
# endif
# else
# if __clang_major__ == 3 && __clang_minor__ == 0

View File

@ -69,6 +69,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Improved GTC_random linearRand documentation
- Improved GTC_reciprocal documentation
- Improved GLM_FORCE_EXPLICIT_CTOR coverage #481
- Improved OpenMP support detection for Clang, GCC, ICC and VC
##### Fixes:
- Fixed GTX_extended_min_max filename typo #386

View File

@ -84,36 +84,6 @@ int test_compiler()
{
std::printf("GLM_COMPILER_CUDA\n");
}
else if(GLM_COMPILER & GLM_COMPILER_APPLE_CLANG)
{
switch(GLM_COMPILER)
{
case GLM_COMPILER_APPLE_CLANG40:
std::printf("GLM_COMPILER_APPLE_CLANG40\n");
break;
case GLM_COMPILER_APPLE_CLANG41:
std::printf("GLM_COMPILER_APPLE_CLANG41\n");
break;
case GLM_COMPILER_APPLE_CLANG42:
std::printf("GLM_COMPILER_APPLE_CLANG42\n");
break;
case GLM_COMPILER_APPLE_CLANG50:
std::printf("GLM_COMPILER_APPLE_CLANG50\n");
break;
case GLM_COMPILER_APPLE_CLANG51:
std::printf("GLM_COMPILER_APPLE_CLANG51\n");
break;
case GLM_COMPILER_APPLE_CLANG60:
std::printf("GLM_COMPILER_APPLE_CLANG60\n");
break;
case GLM_COMPILER_APPLE_CLANG61:
std::printf("GLM_COMPILER_APPLE_CLANG61\n");
break;
default:
std::printf("Apple Clang version not detected\n");
break;
}
}
else if(GLM_COMPILER & GLM_COMPILER_LLVM)
{
switch(GLM_COMPILER)

View File

@ -113,6 +113,13 @@ int test_vec3_ctor()
return Error;
}
float foo()
{
glm::vec3 bar = glm::vec3(0.0f, 1.0f, 1.0f);
return glm::length(bar);
}
int test_vec3_operators()
{
int Error = 0;