Added a CMake option to execute GLM performance tests. Made quat and dualquat trivially constructible #263

This commit is contained in:
Christophe Riccio
2014-11-15 00:05:52 +01:00
parent b7b8b18f83
commit 0b8ca1a5b6
14 changed files with 70 additions and 36 deletions

View File

@@ -1018,7 +1018,6 @@ int main()
int Error(0);
Error += sign::test();
Error += sign::perf();
Error += test_floor();
Error += test_modf();
Error += test_floatBitsToInt();
@@ -1032,6 +1031,10 @@ int main()
Error += test_isnan();
Error += test_isinf();
# ifdef GLM_TEST_ENABLE_PERF
Error += sign::perf();
# endif
return Error;
}

View File

@@ -1321,11 +1321,8 @@ int main()
int Error = 0;
Error += ::bitCount::test();
Error += ::bitCount::perf();
Error += ::bitfieldReverse::test();
Error += ::bitfieldReverse::perf();
Error += ::findMSB::test();
Error += ::findMSB::perf();
Error += ::findLSB::test();
Error += ::umulExtended::test();
Error += ::imulExtended::test();
@@ -1334,5 +1331,11 @@ int main()
Error += ::bitfieldInsert::test();
Error += ::bitfieldExtract::test();
# ifdef GLM_TEST_ENABLE_PERF
Error += ::bitCount::perf();
Error += ::bitfieldReverse::perf();
Error += ::findMSB::perf();
# endif
return Error;
}

View File

@@ -240,11 +240,15 @@ int main()
Error += test_transpose();
Error += test_determinant();
Error += test_inverse();
# ifdef GLM_TEST_ENABLE_PERF
for(std::size_t i = 0; i < 1; ++i)
{
Error += test_inverse_perf<glm::vec3, glm::mat4>(i, "mat4");
Error += test_inverse_perf<glm::dvec3, glm::dmat4>(i, "dmat4");
}
# endif
return Error;
}

View File

@@ -425,8 +425,11 @@ int main()
std::size_t const Size(1000000);
Error += test_vec4_perf_AoS(Size);
Error += test_vec4_perf_SoA(Size);
# ifdef GLM_TEST_ENABLE_PERF
Error += test_vec4_perf_AoS(Size);
Error += test_vec4_perf_SoA(Size);
# endif
Error += test_vec4_ctor();
Error += test_vec4_size();
Error += test_vec4_operators();