Removed simd precision qualifier. All precision qualifiers may generate SIMD instructions, precision may affect the generated instructions accordingly

This commit is contained in:
Christophe Riccio
2016-05-22 17:12:32 +02:00
parent 805939686c
commit 757fe39587
15 changed files with 251 additions and 327 deletions

View File

@@ -219,24 +219,24 @@ int test_inverse()
int test_inverse_simd()
{
int Failed(0);
int Error = 0;
glm::tmat4x4<float, glm::simd> const Identity(1);
glm::mat4x4 const Identity(1);
glm::tmat4x4<float, glm::simd> const A4x4(
glm::tvec4<float, glm::simd>(1, 0, 1, 0),
glm::tvec4<float, glm::simd>(0, 1, 0, 0),
glm::tvec4<float, glm::simd>(0, 0, 1, 0),
glm::tvec4<float, glm::simd>(0, 0, 0, 1));
glm::tmat4x4<float, glm::simd> const B4x4 = glm::inverse(A4x4);
glm::tmat4x4<float, glm::simd> const I4x4 = A4x4 * B4x4;
glm::mat4x4 const A4x4(
glm::vec4(1, 0, 1, 0),
glm::vec4(0, 1, 0, 0),
glm::vec4(0, 0, 1, 0),
glm::vec4(0, 0, 0, 1));
glm::mat4x4 const B4x4 = glm::inverse(A4x4);
glm::mat4x4 const I4x4 = A4x4 * B4x4;
Failed += glm::all(glm::epsilonEqual(I4x4[0], Identity[0], 0.001f)) ? 0 : 1;
Failed += glm::all(glm::epsilonEqual(I4x4[1], Identity[1], 0.001f)) ? 0 : 1;
Failed += glm::all(glm::epsilonEqual(I4x4[2], Identity[2], 0.001f)) ? 0 : 1;
Failed += glm::all(glm::epsilonEqual(I4x4[3], Identity[3], 0.001f)) ? 0 : 1;
Error += glm::all(glm::epsilonEqual(I4x4[0], Identity[0], 0.001f)) ? 0 : 1;
Error += glm::all(glm::epsilonEqual(I4x4[1], Identity[1], 0.001f)) ? 0 : 1;
Error += glm::all(glm::epsilonEqual(I4x4[2], Identity[2], 0.001f)) ? 0 : 1;
Error += glm::all(glm::epsilonEqual(I4x4[3], Identity[3], 0.001f)) ? 0 : 1;
return Failed;
return Error;
}
template <typename VEC3, typename MAT4>

View File

@@ -488,13 +488,13 @@ int test_vec4_simd()
{
int Error = 0;
glm::tvec4<float, glm::simd> a(std::clock(), std::clock(), std::clock(), std::clock());
glm::tvec4<float, glm::simd> b(std::clock(), std::clock(), std::clock(), std::clock());
glm::vec4 const a(std::clock(), std::clock(), std::clock(), std::clock());
glm::vec4 const b(std::clock(), std::clock(), std::clock(), std::clock());
glm::tvec4<float, glm::simd> c(b * a);
glm::tvec4<float, glm::simd> d(a + c);
glm::vec4 const c(b * a);
glm::vec4 const d(a + c);
Error += glm::all(glm::greaterThanEqual(d, glm::tvec4<float, glm::simd>(0))) ? 0 : 1;
Error += glm::all(glm::greaterThanEqual(d, glm::vec4(0))) ? 0 : 1;
return Error;
}