Skip to content

Commit

Permalink
Quicker unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Feb 28, 2024
1 parent b942444 commit 1f25000
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions glm/detail/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
4 changes: 2 additions & 2 deletions test/ext/ext_scalar_integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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)
{
Expand Down
10 changes: 6 additions & 4 deletions test/gtc/gtc_bitfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace mask

static int perf()
{
int const Count = 100000000;
int const Count = 10000;

std::clock_t Timestamp1 = std::clock();

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion test/gtc/gtc_round.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 1f25000

Please sign in to comment.