Added Visual C++ 15 detection, Added Clang 4.0 detection, Refactored GLM_COMPILER_VC values
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user