Fixed build problems due to printf and std::clock_t #778

This commit is contained in:
Christophe Riccio
2018-06-18 12:40:00 +02:00
parent 5da834b725
commit 11c26f9edb
9 changed files with 103 additions and 100 deletions

View File

@@ -541,7 +541,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("glm::bitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("glm::bitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
{
@@ -552,7 +552,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("fastBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("fastBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
/*
{
@@ -563,7 +563,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("loopBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("loopBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
*/
{
@@ -574,7 +574,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("interleaveBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("interleaveBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
# if GLM_ARCH & GLM_ARCH_SSE2_BIT
@@ -586,7 +586,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("sseBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("sseBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
{
@@ -597,7 +597,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("sseUnalignedBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("sseUnalignedBitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
@@ -609,7 +609,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("glm::detail::bitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("glm::detail::bitfieldInterleave Time %d clocks\n", static_cast<int>(Time));
}
# if(GLM_ARCH & GLM_ARCH_SSE2_BIT && !(GLM_COMPILER & GLM_COMPILER_GCC))
@@ -629,7 +629,7 @@ namespace bitfieldInterleave
std::clock_t Time = std::clock() - LastTime;
std::printf("_mm_bit_interleave_si128 Time %d clocks\n", static_cast<unsigned int>(Time));
std::printf("_mm_bit_interleave_si128 Time %d clocks\n", static_cast<int>(Time));
}
# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
@@ -763,7 +763,7 @@ namespace bitfieldInterleave5
const std::clock_t EndTime = std::clock();
std::printf("glm::bitfieldInterleave<u8vec2> Time %d clocks\n", static_cast<unsigned int>(EndTime - BeginTime));
std::printf("glm::bitfieldInterleave<u8vec2> Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
return Error;
}
@@ -781,7 +781,7 @@ namespace bitfieldInterleave5
const std::clock_t EndTime = std::clock();
std::printf("bitfieldInterleave_u8vec2 Time %d clocks\n", static_cast<unsigned int>(EndTime - BeginTime));
std::printf("bitfieldInterleave_u8vec2 Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
return Error;
}
@@ -799,7 +799,7 @@ namespace bitfieldInterleave5
const std::clock_t EndTime = std::clock();
std::printf("glm::bitfieldInterleave<u8vec4> Time %d clocks\n", static_cast<unsigned int>(EndTime - BeginTime));
std::printf("glm::bitfieldInterleave<u8vec4> Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
return Error;
}
@@ -817,7 +817,7 @@ namespace bitfieldInterleave5
const std::clock_t EndTime = std::clock();
std::printf("bitfieldInterleave_u8vec4 Time %d clocks\n", static_cast<unsigned int>(EndTime - BeginTime));
std::printf("bitfieldInterleave_u8vec4 Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
return Error;
}
@@ -835,7 +835,7 @@ namespace bitfieldInterleave5
const std::clock_t EndTime = std::clock();
std::printf("glm::bitfieldInterleave<u16vec2> Time %d clocks\n", static_cast<unsigned int>(EndTime - BeginTime));
std::printf("glm::bitfieldInterleave<u16vec2> Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
return Error;
}
@@ -853,7 +853,7 @@ namespace bitfieldInterleave5
const std::clock_t EndTime = std::clock();
std::printf("bitfieldInterleave_u16vec2 Time %d clocks\n", static_cast<unsigned int>(EndTime - BeginTime));
std::printf("bitfieldInterleave_u16vec2 Time %d clocks\n", static_cast<int>(EndTime - BeginTime));
return Error;
}

View File

@@ -68,7 +68,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<int>: %ld clocks\n", End - Begin);
printf("glm::log2<int>: %d clocks\n", static_cast<int>(End - Begin));
}
{
@@ -82,7 +82,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<ivec4>: %ld clocks\n", End - Begin);
printf("glm::log2<ivec4>: %d clocks\n", static_cast<int>(End - Begin));
}
# if GLM_HAS_BITSCAN_WINDOWS
@@ -104,7 +104,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<ivec4> inlined: %ld clocks\n", End - Begin);
printf("glm::log2<ivec4> inlined: %d clocks\n", static_cast<int>(End - Begin));
}
@@ -124,7 +124,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<ivec4> inlined no cast: %ld clocks\n", End - Begin);
printf("glm::log2<ivec4> inlined no cast: %d clocks\n", static_cast<int>(End - Begin));
}
@@ -144,7 +144,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<ivec4> reinterpret: %ld clocks\n", End - Begin);
printf("glm::log2<ivec4> reinterpret: %d clocks\n", static_cast<int>(End - Begin));
}
# endif//GLM_HAS_BITSCAN_WINDOWS
@@ -159,7 +159,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<float>: %ld clocks\n", End - Begin);
printf("glm::log2<float>: %d clocks\n", static_cast<int>(End - Begin));
}
{
@@ -173,7 +173,7 @@ namespace log2_
std::clock_t End = clock();
printf("glm::log2<vec4>: %ld clocks\n", End - Begin);
printf("glm::log2<vec4>: %d clocks\n", static_cast<int>(End - Begin));
}
return Error;

View File

@@ -247,8 +247,8 @@ namespace ceilPowerOfTwo_advanced
std::clock_t Timestramp2 = std::clock();
std::printf("ceilPowerOfTwo_loop: %d clocks\n", static_cast<unsigned int>(Timestramp1 - Timestramp0));
std::printf("glm::ceilPowerOfTwo: %d clocks\n", static_cast<unsigned int>(Timestramp2 - Timestramp1));
std::printf("ceilPowerOfTwo_loop: %d clocks\n", static_cast<int>(Timestramp1 - Timestramp0));
std::printf("glm::ceilPowerOfTwo: %d clocks\n", static_cast<int>(Timestramp2 - Timestramp1));
return Error;
}