mirror of
https://github.com/g-truc/glm.git
synced 2024-11-09 20:21:47 +00:00
Quicker unit tests
This commit is contained in:
parent
b9424441b1
commit
1f25000a30
@ -5,10 +5,10 @@
|
||||
|
||||
#define GLM_VERSION_MAJOR 1
|
||||
#define GLM_VERSION_MINOR 0
|
||||
#define GLM_VERSION_PATCH 0
|
||||
#define GLM_VERSION_PATCH 1
|
||||
#define GLM_VERSION_REVISION 0 // Deprecated
|
||||
#define GLM_VERSION 1000 // Deprecated
|
||||
#define GLM_VERSION_MESSAGE "GLM: version 1.0.0"
|
||||
#define GLM_VERSION_MESSAGE "GLM: version 1.0.1"
|
||||
|
||||
#define GLM_MAKE_API_VERSION(variant, major, minor, patch) \
|
||||
((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch)))
|
||||
|
@ -222,7 +222,7 @@ namespace nextPowerOfTwo_advanced
|
||||
int Error(0);
|
||||
|
||||
std::vector<glm::uint> v;
|
||||
v.resize(100000000);
|
||||
v.resize(10000);
|
||||
|
||||
std::clock_t Timestramp0 = std::clock();
|
||||
|
||||
@ -586,7 +586,7 @@ namespace nextMultiple
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
glm::uint const Samples = 10000;
|
||||
glm::uint const Samples = 100;
|
||||
|
||||
for(int i = 0; i < 4; ++i)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ namespace mask
|
||||
|
||||
static int perf()
|
||||
{
|
||||
int const Count = 100000000;
|
||||
int const Count = 10000;
|
||||
|
||||
std::clock_t Timestamp1 = std::clock();
|
||||
|
||||
@ -123,7 +123,7 @@ namespace mask
|
||||
std::printf("mask[zero]: %d\n", static_cast<unsigned int>(TimeZero));
|
||||
std::printf("mask[half]: %d\n", static_cast<unsigned int>(TimeHalf));
|
||||
|
||||
return TimeDefault < TimeLoop ? 0 : 1;
|
||||
return TimeDefault <= TimeLoop ? 0 : 1;
|
||||
}
|
||||
|
||||
#if GLM_COMPILER & GLM_COMPILER_CLANG
|
||||
@ -559,8 +559,8 @@ namespace bitfieldInterleave
|
||||
|
||||
static int perf()
|
||||
{
|
||||
glm::uint32 x_max = 1 << 11;
|
||||
glm::uint32 y_max = 1 << 10;
|
||||
glm::uint32 x_max = 1 << 7;
|
||||
glm::uint32 y_max = 1 << 6;
|
||||
|
||||
// ALU
|
||||
std::vector<glm::uint64> Data(x_max * y_max);
|
||||
@ -647,6 +647,7 @@ namespace bitfieldInterleave
|
||||
std::printf("glm::detail::bitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
|
||||
}
|
||||
|
||||
# if((GLM_PLATFORM & GLM_PLATFORM_WINDOWS) || (GLM_PLATFORM & GLM_PLATFORM_LINUX))
|
||||
# if(GLM_ARCH & GLM_ARCH_SSE2_BIT && !(GLM_COMPILER & GLM_COMPILER_GCC))
|
||||
{
|
||||
// SIMD
|
||||
@ -667,6 +668,7 @@ namespace bitfieldInterleave
|
||||
std::printf("_mm_bit_interleave_si128 Time %d clocks\n", static_cast<int>(Time));
|
||||
}
|
||||
# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
|
||||
# endif//GLM_PLATFORM GLM_PLATFORM_APPLE
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ namespace ceilPowerOfTwo_advanced
|
||||
int Error(0);
|
||||
|
||||
std::vector<glm::uint> v;
|
||||
v.resize(100000000);
|
||||
v.resize(10000);
|
||||
|
||||
std::clock_t Timestramp0 = std::clock();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user