Fixed SIMD code path selection
This commit is contained in:
@@ -176,18 +176,24 @@ int test_instruction_set()
|
||||
|
||||
if(GLM_ARCH == GLM_ARCH_PURE)
|
||||
std::printf("GLM_ARCH_PURE ");
|
||||
if(GLM_ARCH & GLM_ARCH_ARM)
|
||||
std::printf("GLM_ARCH_ARM ");
|
||||
if(GLM_ARCH & GLM_ARCH_ARM_FLAG)
|
||||
std::printf("ARM ");
|
||||
if(GLM_ARCH & GLM_ARCH_NEON_FLAG)
|
||||
std::printf("NEON ");
|
||||
if(GLM_ARCH & GLM_ARCH_AVX2)
|
||||
std::printf("GLM_ARCH_AVX2 ");
|
||||
std::printf("AVX2 ");
|
||||
if(GLM_ARCH & GLM_ARCH_AVX)
|
||||
std::printf("GLM_ARCH_AVX ");
|
||||
if(GLM_ARCH & GLM_ARCH_AVX)
|
||||
std::printf("GLM_ARCH_SSE4 ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSE3)
|
||||
std::printf("GLM_ARCH_SSE3 ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSE2)
|
||||
std::printf("GLM_ARCH_SSE2 ");
|
||||
std::printf("AVX ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSE42_FLAG)
|
||||
std::printf("SSE4.2 ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSE41_FLAG)
|
||||
std::printf("SSE4.1 ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSSE3_FLAG)
|
||||
std::printf("SSSE3 ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSE3_FLAG)
|
||||
std::printf("SSE3 ");
|
||||
if(GLM_ARCH & GLM_ARCH_SSE2_FLAG)
|
||||
std::printf("SSE2 ");
|
||||
|
||||
std::printf("\n");
|
||||
|
||||
|
||||
@@ -505,7 +505,7 @@ namespace bitfieldInterleave
|
||||
assert(A == C);
|
||||
assert(A == D);
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_SSE2
|
||||
# if GLM_ARCH & GLM_ARCH_SSE2_FLAG
|
||||
glm::uint64 E = sseBitfieldInterleave(x, y);
|
||||
glm::uint64 F = sseUnalignedBitfieldInterleave(x, y);
|
||||
assert(A == E);
|
||||
@@ -515,7 +515,7 @@ namespace bitfieldInterleave
|
||||
glm::uint64 Result[2];
|
||||
_mm_storeu_si128((__m128i*)Result, G);
|
||||
assert(A == Result[0]);
|
||||
# endif//GLM_ARCH & GLM_ARCH_SSE2
|
||||
# endif//GLM_ARCH & GLM_ARCH_SSE2_FLAG
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ namespace bitfieldInterleave
|
||||
std::printf("glm::detail::bitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
|
||||
}
|
||||
|
||||
# if(GLM_ARCH & GLM_ARCH_SSE2 && !(GLM_COMPILER & GLM_COMPILER_GCC))
|
||||
# if(GLM_ARCH & GLM_ARCH_SSE2_FLAG && !(GLM_COMPILER & GLM_COMPILER_GCC))
|
||||
{
|
||||
// SIMD
|
||||
std::vector<__m128i> SimdData;
|
||||
@@ -648,7 +648,7 @@ namespace bitfieldInterleave
|
||||
|
||||
std::printf("_mm_bit_interleave_si128 Time %d clocks\n", static_cast<unsigned int>(Time));
|
||||
}
|
||||
# endif//GLM_ARCH & GLM_ARCH_SSE2
|
||||
# endif//GLM_ARCH & GLM_ARCH_SSE2_FLAG
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user