Clean up code test for branch compatibility on all platforms

master
Christophe Riccio ago%!(EXTRA string=12 years)
parent 9841d2a2b4
commit 1c68cee29b
  1. 7
      glm/core/dummy.cpp
  2. 22
      glm/core/type_mat4x4.inl

@ -32,6 +32,7 @@
#define GLM_MESSAGES #define GLM_MESSAGES
#include "../glm.hpp" #include "../glm.hpp"
#if(GLM_ARCH & GLM_ARCH_SSE2)
struct float4 struct float4
{ {
union union
@ -52,11 +53,17 @@ int test_simd()
return 0; return 0;
} }
#endif//GLM_ARCH
int main() int main()
{ {
glm::mat4 A(1.0f); glm::mat4 A(1.0f);
glm::vec4 B(1.0f); glm::vec4 B(1.0f);
glm::vec4 C = A * B; glm::vec4 C = A * B;
# if(GLM_ARCH & GLM_ARCH_SSE2)
test_simd();
# endif
return 0; return 0;
} }

@ -727,17 +727,17 @@ namespace detail
return typename tmat4x4<T, P>::col_type(a2); return typename tmat4x4<T, P>::col_type(a2);
*/ */
tmat4x4<T, P>::col_type const Mov0(v[0]); typename tmat4x4<T, P>::col_type const Mov0(v[0]);
tmat4x4<T, P>::col_type const Mov1(v[1]); typename tmat4x4<T, P>::col_type const Mov1(v[1]);
tmat4x4<T, P>::col_type const Mul0 = m[0] * Mov0; typename tmat4x4<T, P>::col_type const Mul0 = m[0] * Mov0;
tmat4x4<T, P>::col_type const Mul1 = m[1] * Mov1; typename tmat4x4<T, P>::col_type const Mul1 = m[1] * Mov1;
tmat4x4<T, P>::col_type const Add0 = Mul0 * Mul1; typename tmat4x4<T, P>::col_type const Add0 = Mul0 * Mul1;
tmat4x4<T, P>::col_type const Mov2(v[2]); typename tmat4x4<T, P>::col_type const Mov2(v[2]);
tmat4x4<T, P>::col_type const Mov3(v[3]); typename tmat4x4<T, P>::col_type const Mov3(v[3]);
tmat4x4<T, P>::col_type const Mul2 = m[2] * Mov2; typename tmat4x4<T, P>::col_type const Mul2 = m[2] * Mov2;
tmat4x4<T, P>::col_type const Mul3 = m[3] * Mov3; typename tmat4x4<T, P>::col_type const Mul3 = m[3] * Mov3;
tmat4x4<T, P>::col_type const Add1 = Mul2 * Mul3; typename tmat4x4<T, P>::col_type const Add1 = Mul2 * Mul3;
tmat4x4<T, P>::col_type const Add2 = Add0 * Add1; typename tmat4x4<T, P>::col_type const Add2 = Add0 * Add1;
return Add2; return Add2;
/* /*

Loading…
Cancel
Save