Added a CMake option to execute GLM performance tests. Made quat and dualquat trivially constructible #263
This commit is contained in:
@@ -637,7 +637,9 @@ int main()
|
||||
Error += ::bitfieldInterleave::test();
|
||||
//Error += ::bitRevert::test();
|
||||
|
||||
Error += ::mask::perf();
|
||||
# ifdef GLM_TEST_ENABLE_PERF
|
||||
Error += ::mask::perf();
|
||||
# endif
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
@@ -273,6 +273,20 @@ int test_quat_ctr()
|
||||
{
|
||||
int Error(0);
|
||||
|
||||
#if (GLM_LANG & GLM_LANG_CXX11_FLAG) || (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)
|
||||
// Error += std::is_trivially_default_constructible<glm::quat>::value ? 0 : 1;
|
||||
// Error += std::is_trivially_default_constructible<glm::dquat>::value ? 0 : 1;
|
||||
// Error += std::is_trivially_copy_assignable<glm::quat>::value ? 0 : 1;
|
||||
// Error += std::is_trivially_copy_assignable<glm::dquat>::value ? 0 : 1;
|
||||
Error += std::is_trivially_copyable<glm::quat>::value ? 0 : 1;
|
||||
Error += std::is_trivially_copyable<glm::dquat>::value ? 0 : 1;
|
||||
|
||||
Error += std::has_trivial_copy_constructor<glm::quat>::value ? 0 : 1;
|
||||
Error += std::has_trivial_copy_constructor<glm::dquat>::value ? 0 : 1;
|
||||
Error += std::is_copy_constructible<glm::quat>::value ? 0 : 1;
|
||||
Error += std::is_copy_constructible<glm::dquat>::value ? 0 : 1;
|
||||
#endif
|
||||
|
||||
# if GLM_HAS_INITIALIZER_LISTS
|
||||
{
|
||||
glm::quat A{0, 1, 2, 3};
|
||||
|
||||
@@ -299,7 +299,10 @@ int main()
|
||||
|
||||
Error += isPowerOfTwo::test();
|
||||
Error += ceilPowerOfTwo::test();
|
||||
Error += ceilPowerOfTwo::perf();
|
||||
|
||||
# ifdef GLM_TEST_ENABLE_PERF
|
||||
Error += ceilPowerOfTwo::perf();
|
||||
# endif
|
||||
|
||||
return Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user