From b056a224985833642ff3ddba726e2d613cb40660 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 18 Oct 2011 11:21:34 +0100 Subject: [PATCH] Improved pure code path --- glm/gtx/simd_mat4.hpp | 4 ++++ glm/gtx/simd_vec4.hpp | 4 ++++ test/gtx/gtx_simd_mat4.cpp | 12 ++++++++++++ test/gtx/gtx_simd_vec4.cpp | 13 +++++++++++++ 4 files changed, 33 insertions(+) diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index 2688b7d2..1569a03e 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -41,6 +41,8 @@ // Dependency: #include "../glm.hpp" +#if(GLM_ARCH != GLM_ARCH_PURE) + #if(GLM_ARCH & GLM_ARCH_SSE2) # include "../core/intrinsic_matrix.hpp" # include "../gtx/simd_vec4.hpp" @@ -197,4 +199,6 @@ namespace detail #include "simd_mat4.inl" +#endif//(GLM_ARCH != GLM_ARCH_PURE) + #endif//GLM_GTX_simd_mat4 diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 132e88ca..c08fe51d 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -41,6 +41,8 @@ // Dependency: #include "../glm.hpp" +#if(GLM_ARCH != GLM_ARCH_PURE) + #if(GLM_ARCH & GLM_ARCH_SSE2) # include "../core/intrinsic_common.hpp" # include "../core/intrinsic_geometric.hpp" @@ -488,4 +490,6 @@ namespace detail #include "simd_vec4.inl" +#endif//(GLM_ARCH != GLM_ARCH_PURE) + #endif//GLM_GTX_simd_vec4 diff --git a/test/gtx/gtx_simd_mat4.cpp b/test/gtx/gtx_simd_mat4.cpp index 25605595..7563f38e 100644 --- a/test/gtx/gtx_simd_mat4.cpp +++ b/test/gtx/gtx_simd_mat4.cpp @@ -18,6 +18,8 @@ #include #include +#if(GLM_ARCH != GLM_ARCH_PURE) + std::vector test_detA(std::vector const & Data) { std::vector Test(Data.size()); @@ -288,3 +290,13 @@ int main() return Error; } +#else + +int main() +{ + int Error = 0; + + return Error; +} + +#endif//(GLM_ARCH != GLM_ARCH_PURE) diff --git a/test/gtx/gtx_simd_vec4.cpp b/test/gtx/gtx_simd_vec4.cpp index d5df3ada..078a782f 100644 --- a/test/gtx/gtx_simd_vec4.cpp +++ b/test/gtx/gtx_simd_vec4.cpp @@ -11,6 +11,8 @@ #include #include +#if(GLM_ARCH != GLM_ARCH_PURE) + int main() { glm::simdVec4 A1(0.0f, 0.1f, 0.2f, 0.3f); @@ -28,3 +30,14 @@ int main() return 0; } + +#else + +int main() +{ + int Error = 0; + + return Error; +} + +#endif//(GLM_ARCH != GLM_ARCH_PURE)