Browse Source

Improved pure code path

Christophe Riccio 14 years ago
parent
commit
b056a22498
4 changed files with 33 additions and 0 deletions
  1. 4 0
      glm/gtx/simd_mat4.hpp
  2. 4 0
      glm/gtx/simd_vec4.hpp
  3. 12 0
      test/gtx/gtx_simd_mat4.cpp
  4. 13 0
      test/gtx/gtx_simd_vec4.cpp

+ 4 - 0
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

+ 4 - 0
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

+ 12 - 0
test/gtx/gtx_simd_mat4.cpp

@@ -18,6 +18,8 @@
 #include <ctime>
 #include <vector>
 
+#if(GLM_ARCH != GLM_ARCH_PURE)
+
 std::vector<float> test_detA(std::vector<glm::mat4> const & Data)
 {
 	std::vector<float> 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)

+ 13 - 0
test/gtx/gtx_simd_vec4.cpp

@@ -11,6 +11,8 @@
 #include <glm/gtx/simd_vec4.hpp>
 #include <cstdio>
 
+#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)