Added Visual C++ 15 detection, Added Clang 4.0 detection, Refactored GLM_COMPILER_VC values
This commit is contained in:
parent
5f5e800a24
commit
1c85265f97
@ -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
|
||||
|
@ -184,11 +184,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)
|
||||
@ -200,7 +200,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
|
||||
@ -294,7 +294,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
|
||||
|
||||
@ -305,9 +305,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
|
||||
@ -315,10 +315,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
|
||||
@ -330,8 +330,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
|
||||
@ -341,8 +342,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
|
||||
|
||||
@ -367,8 +368,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
|
||||
@ -380,8 +381,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
|
||||
|
||||
@ -394,7 +395,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
|
||||
|
||||
@ -407,7 +408,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
|
||||
|
||||
@ -420,7 +421,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
|
||||
|
||||
@ -433,7 +434,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
|
||||
|
||||
@ -442,6 +443,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
|
||||
|
||||
@ -453,7 +455,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
|
||||
|
||||
@ -461,7 +463,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
|
||||
@ -487,7 +490,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
|
||||
@ -660,7 +663,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
|
||||
|
@ -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
|
||||
|
@ -52,6 +52,11 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
||||
## Release notes
|
||||
|
||||
#### [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