mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 19:34:36 +00:00
Removed GLM_TEST_ENABLE_PERF
This commit is contained in:
parent
0b9b157e24
commit
a42f84ed47
@ -13,11 +13,6 @@ if(NOT GLM_TEST_ENABLE)
|
|||||||
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
|
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(GLM_PERF_ENABLE "GLM perf" OFF)
|
|
||||||
if(GLM_PERF_ENABLE)
|
|
||||||
add_definitions(-DGLM_TEST_ENABLE_PERF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX))
|
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX))
|
||||||
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
|
option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF)
|
||||||
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
|
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
|
||||||
|
@ -1156,7 +1156,7 @@ int main()
|
|||||||
Error += isnan_::test();
|
Error += isnan_::test();
|
||||||
Error += isinf_::test();
|
Error += isinf_::test();
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += sign::perf();
|
Error += sign::perf();
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -1578,7 +1578,7 @@ int main()
|
|||||||
Error += ::bitfieldInsert::test();
|
Error += ::bitfieldInsert::test();
|
||||||
Error += ::bitfieldExtract::test();
|
Error += ::bitfieldExtract::test();
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += ::bitCount::perf();
|
Error += ::bitCount::perf();
|
||||||
Error += ::bitfieldReverse::perf();
|
Error += ::bitfieldReverse::perf();
|
||||||
Error += ::findMSB::perf();
|
Error += ::findMSB::perf();
|
||||||
|
@ -207,7 +207,7 @@ void error(int x, int y)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
|
|
||||||
int i, n;
|
int i, n;
|
||||||
static int test[] = {0,0, 1,1, 2,1, 3,2, 4,1, 5,2, 6,2, 7,3,
|
static int test[] = {0,0, 1,1, 2,1, 3,2, 4,1, 5,2, 6,2, 7,3,
|
||||||
@ -318,5 +318,5 @@ int main()
|
|||||||
if (errors == 0)
|
if (errors == 0)
|
||||||
printf("Passed all %d cases.\n", sizeof(test)/8);
|
printf("Passed all %d cases.\n", sizeof(test)/8);
|
||||||
|
|
||||||
# endif//GLM_TEST_ENABLE_PERF
|
# endif//NDEBUG
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ void error(int x, int y) {
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
|
|
||||||
int i, m, n;
|
int i, m, n;
|
||||||
static unsigned test[] = {0,32, 1,0, 2,1, 3,0, 4,2, 5,0, 6,1, 7,0,
|
static unsigned test[] = {0,32, 1,0, 2,1, 3,0, 4,2, 5,0, 6,1, 7,0,
|
||||||
@ -427,5 +427,5 @@ int main()
|
|||||||
if (errors == 0)
|
if (errors == 0)
|
||||||
printf("Passed all %d cases.\n", sizeof(test)/8);
|
printf("Passed all %d cases.\n", sizeof(test)/8);
|
||||||
|
|
||||||
# endif//GLM_TEST_ENABLE_PERF
|
# endif//NDEBUG
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ void error(int x, int y) {
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
|
|
||||||
int i, n;
|
int i, n;
|
||||||
static unsigned test[] = {0,32, 1,31, 2,30, 3,30, 4,29, 5,29, 6,29,
|
static unsigned test[] = {0,32, 1,31, 2,30, 3,30, 4,29, 5,29, 6,29,
|
||||||
@ -464,5 +464,5 @@ int main()
|
|||||||
if (errors == 0)
|
if (errors == 0)
|
||||||
printf("Passed all %d cases.\n", sizeof(test)/8);
|
printf("Passed all %d cases.\n", sizeof(test)/8);
|
||||||
|
|
||||||
# endif//GLM_TEST_ENABLE_PERF
|
# endif//NDEBUG
|
||||||
}
|
}
|
||||||
|
@ -263,13 +263,13 @@ int main()
|
|||||||
Error += test_determinant();
|
Error += test_determinant();
|
||||||
Error += test_inverse();
|
Error += test_inverse();
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
for(std::size_t i = 0; i < 1; ++i)
|
for(std::size_t i = 0; i < 1; ++i)
|
||||||
{
|
{
|
||||||
Error += test_inverse_perf<glm::vec3, glm::mat4>(i, "mat4");
|
Error += test_inverse_perf<glm::vec3, glm::mat4>(i, "mat4");
|
||||||
Error += test_inverse_perf<glm::dvec3, glm::dmat4>(i, "dmat4");
|
Error += test_inverse_perf<glm::dvec3, glm::dmat4>(i, "dmat4");
|
||||||
}
|
}
|
||||||
# endif
|
# endif//NDEBUG
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
@ -448,10 +448,10 @@ int main()
|
|||||||
|
|
||||||
std::size_t const Size(1000000);
|
std::size_t const Size(1000000);
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += test_vec4_perf_AoS(Size);
|
Error += test_vec4_perf_AoS(Size);
|
||||||
Error += test_vec4_perf_SoA(Size);
|
Error += test_vec4_perf_SoA(Size);
|
||||||
# endif
|
# endif//NDEBUG
|
||||||
|
|
||||||
Error += test_vec4_ctor();
|
Error += test_vec4_ctor();
|
||||||
Error += test_vec4_size();
|
Error += test_vec4_size();
|
||||||
|
@ -664,10 +664,10 @@ int main()
|
|||||||
Error += ::bitfieldInterleave::test();
|
Error += ::bitfieldInterleave::test();
|
||||||
//Error += ::bitRevert::test();
|
//Error += ::bitRevert::test();
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += ::mask::perf();
|
Error += ::mask::perf();
|
||||||
Error += ::bitfieldInterleave::perf();
|
Error += ::bitfieldInterleave::perf();
|
||||||
# endif
|
# endif//NDEBUG
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
@ -263,9 +263,9 @@ int main()
|
|||||||
Error += ::log2_::test();
|
Error += ::log2_::test();
|
||||||
Error += ::mod_::test();
|
Error += ::mod_::test();
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += ::log2_::perf();
|
Error += ::log2_::perf();
|
||||||
# endif
|
# endif//NDEBUG
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
@ -300,9 +300,9 @@ int main()
|
|||||||
Error += isPowerOfTwo::test();
|
Error += isPowerOfTwo::test();
|
||||||
Error += ceilPowerOfTwo::test();
|
Error += ceilPowerOfTwo::test();
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += ceilPowerOfTwo::perf();
|
Error += ceilPowerOfTwo::perf();
|
||||||
# endif
|
# endif//NDEBUG
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
@ -178,14 +178,14 @@ int main()
|
|||||||
{
|
{
|
||||||
int Error(0);
|
int Error(0);
|
||||||
|
|
||||||
# ifdef GLM_TEST_ENABLE_PERF
|
# ifdef NDEBUG
|
||||||
Error += ::fastCos::perf();
|
Error += ::fastCos::perf();
|
||||||
Error += ::fastSin::perf();
|
Error += ::fastSin::perf();
|
||||||
Error += ::fastTan::perf();
|
Error += ::fastTan::perf();
|
||||||
Error += ::fastAcos::perf();
|
Error += ::fastAcos::perf();
|
||||||
Error += ::fastAsin::perf();
|
Error += ::fastAsin::perf();
|
||||||
Error += ::fastAtan::perf();
|
Error += ::fastAtan::perf();
|
||||||
# endif
|
# endif//NDEBUG
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user