Browse Source

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

Christophe Riccio 7 years ago
parent
commit
11c26f9edb

+ 3 - 0
readme.md

@@ -55,6 +55,9 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
 #### Features:
 - Added bitfieldDeinterleave to GTC_bitfield
 
+#### Fixes:
+- Fixed build problems due to printf and std::clock_t #778
+
 ### [GLM 0.9.9.0](https://github.com/g-truc/glm/releases/tag/0.9.9.0) - 2018-05-22
 #### Features:
 - Added RGBM encoding in GTC_packing #420

+ 19 - 19
test/core/core_func_common.cpp

@@ -325,7 +325,7 @@ namespace min_
 
 			std::clock_t Timestamp1 = std::clock();
 
-			std::printf("min_tern Time %d clocks\n", static_cast<unsigned int>(Timestamp1 - Timestamp0));
+			std::printf("min_tern Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
 		}
 
 		glm::int32 SumB = 0;
@@ -338,7 +338,7 @@ namespace min_
 
 			std::clock_t Timestamp1 = std::clock();
 
-			std::printf("min_int Time %d clocks\n", static_cast<unsigned int>(Timestamp1 - Timestamp0));
+			std::printf("min_int Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
 		}
 
 		Error += SumA == SumB ? 0 : 1;
@@ -1095,12 +1095,12 @@ namespace sign
 
 		std::clock_t Timestamp6 = std::clock();
 
-		std::printf("sign_cmp(rand) Time %d clocks\n", static_cast<unsigned int>(Timestamp1 - Timestamp0));
-		std::printf("sign_if(rand) Time %d clocks\n", static_cast<unsigned int>(Timestamp2 - Timestamp1));
-		std::printf("sign_alu1(rand) Time %d clocks\n", static_cast<unsigned int>(Timestamp3 - Timestamp2));
-		std::printf("sign_alu2(rand) Time %d clocks\n", static_cast<unsigned int>(Timestamp4 - Timestamp3));
-		std::printf("sign_sub(rand) Time %d clocks\n", static_cast<unsigned int>(Timestamp5 - Timestamp4));
-		std::printf("glm::sign(rand) Time %d clocks\n", static_cast<unsigned int>(Timestamp6 - Timestamp5));
+		std::printf("sign_cmp(rand) Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
+		std::printf("sign_if(rand) Time %d clocks\n", static_cast<int>(Timestamp2 - Timestamp1));
+		std::printf("sign_alu1(rand) Time %d clocks\n", static_cast<int>(Timestamp3 - Timestamp2));
+		std::printf("sign_alu2(rand) Time %d clocks\n", static_cast<int>(Timestamp4 - Timestamp3));
+		std::printf("sign_sub(rand) Time %d clocks\n", static_cast<int>(Timestamp5 - Timestamp4));
+		std::printf("glm::sign(rand) Time %d clocks\n", static_cast<int>(Timestamp6 - Timestamp5));
 
 		return Error;
 	}
@@ -1143,11 +1143,11 @@ namespace sign
 
 		std::clock_t Timestamp5 = std::clock();
 
-		std::printf("sign_cmp(linear) Time %d clocks\n", static_cast<unsigned int>(Timestamp1 - Timestamp0));
-		std::printf("sign_if(linear) Time %d clocks\n", static_cast<unsigned int>(Timestamp2 - Timestamp1));
-		std::printf("sign_alu1(linear) Time %d clocks\n", static_cast<unsigned int>(Timestamp3 - Timestamp2));
-		std::printf("sign_alu2(linear) Time %d clocks\n", static_cast<unsigned int>(Timestamp4 - Timestamp3));
-		std::printf("sign_sub(linear) Time %d clocks\n", static_cast<unsigned int>(Timestamp5 - Timestamp4));
+		std::printf("sign_cmp(linear) Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
+		std::printf("sign_if(linear) Time %d clocks\n", static_cast<int>(Timestamp2 - Timestamp1));
+		std::printf("sign_alu1(linear) Time %d clocks\n", static_cast<int>(Timestamp3 - Timestamp2));
+		std::printf("sign_alu2(linear) Time %d clocks\n", static_cast<int>(Timestamp4 - Timestamp3));
+		std::printf("sign_sub(linear) Time %d clocks\n", static_cast<int>(Timestamp5 - Timestamp4));
 
 		return Error;
 	}
@@ -1186,13 +1186,13 @@ namespace sign
 
 		std::clock_t Timestamp5 = std::clock();
 
-		std::printf("Sum %d\n", static_cast<unsigned int>(Sum));
+		std::printf("Sum %d\n", static_cast<int>(Sum));
 
-		std::printf("sign_cmp(linear_cal) Time %d clocks\n", static_cast<unsigned int>(Timestamp1 - Timestamp0));
-		std::printf("sign_if(linear_cal) Time %d clocks\n", static_cast<unsigned int>(Timestamp2 - Timestamp1));
-		std::printf("sign_alu1(linear_cal) Time %d clocks\n", static_cast<unsigned int>(Timestamp3 - Timestamp2));
-		std::printf("sign_alu2(linear_cal) Time %d clocks\n", static_cast<unsigned int>(Timestamp4 - Timestamp3));
-		std::printf("sign_sub(linear_cal) Time %d clocks\n", static_cast<unsigned int>(Timestamp5 - Timestamp4));
+		std::printf("sign_cmp(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp1 - Timestamp0));
+		std::printf("sign_if(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp2 - Timestamp1));
+		std::printf("sign_alu1(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp3 - Timestamp2));
+		std::printf("sign_alu2(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp4 - Timestamp3));
+		std::printf("sign_sub(linear_cal) Time %d clocks\n", static_cast<int>(Timestamp5 - Timestamp4));
 
 		return Error;
 	}

+ 25 - 25
test/core/core_func_integer.cpp

@@ -471,10 +471,10 @@ namespace bitfieldReverse
 
 		std::clock_t Timestamps4 = std::clock();
 
-		std::printf("glm::bitfieldReverse: %d clocks\n", static_cast<unsigned int>(Timestamps1 - Timestamps0));
-		std::printf("bitfieldReverseLoop: %d clocks\n", static_cast<unsigned int>(Timestamps2 - Timestamps1));
-		std::printf("bitfieldReverseUint32: %d clocks\n", static_cast<unsigned int>(Timestamps3 - Timestamps2));
-		std::printf("bitfieldReverseOps: %d clocks\n", static_cast<unsigned int>(Timestamps4 - Timestamps3));
+		std::printf("glm::bitfieldReverse: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
+		std::printf("bitfieldReverseLoop: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
+		std::printf("bitfieldReverseUint32: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
+		std::printf("bitfieldReverseOps: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
 
 		return Error;
 	}
@@ -508,10 +508,10 @@ namespace bitfieldReverse
 
 		std::clock_t Timestamps4 = std::clock();
 
-		std::printf("glm::bitfieldReverse - 64: %d clocks\n", static_cast<unsigned int>(Timestamps1 - Timestamps0));
-		std::printf("bitfieldReverseLoop - 64: %d clocks\n", static_cast<unsigned int>(Timestamps2 - Timestamps1));
-		std::printf("bitfieldReverseUint - 64: %d clocks\n", static_cast<unsigned int>(Timestamps3 - Timestamps2));
-		std::printf("bitfieldReverseOps - 64: %d clocks\n", static_cast<unsigned int>(Timestamps4 - Timestamps3));
+		std::printf("glm::bitfieldReverse - 64: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
+		std::printf("bitfieldReverseLoop - 64: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
+		std::printf("bitfieldReverseUint - 64: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
+		std::printf("bitfieldReverseOps - 64: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
 
 		return Error;
 	}
@@ -740,18 +740,18 @@ namespace findMSB
 			std::clock_t Timestamps7 = std::clock();
 #		endif
 
-		std::printf("glm::findMSB: %d clocks\n", static_cast<unsigned int>(Timestamps1 - Timestamps0));
-		std::printf("findMSB - nlz1: %d clocks\n", static_cast<unsigned int>(Timestamps2 - Timestamps1));
-		std::printf("findMSB - nlz2: %d clocks\n", static_cast<unsigned int>(Timestamps3 - Timestamps2));
-		std::printf("findMSB - 0.9.5: %d clocks\n", static_cast<unsigned int>(Timestamps4 - Timestamps3));
+		std::printf("glm::findMSB: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
+		std::printf("findMSB - nlz1: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
+		std::printf("findMSB - nlz2: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
+		std::printf("findMSB - 0.9.5: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
 
 #		if GLM_HAS_BITSCAN_WINDOWS
-			std::printf("findMSB - intrinsics: %d clocks\n", static_cast<unsigned int>(Timestamps5 - Timestamps4));
+			std::printf("findMSB - intrinsics: %d clocks\n", static_cast<int>(Timestamps5 - Timestamps4));
 #		endif//GLM_HAS_BITSCAN_WINDOWS
-		std::printf("findMSB - pop: %d clocks\n", static_cast<unsigned int>(Timestamps6 - Timestamps5));
+		std::printf("findMSB - pop: %d clocks\n", static_cast<int>(Timestamps6 - Timestamps5));
 
 #		if GLM_ARCH & GLM_ARCH_AVX && GLM_COMPILER & GLM_COMPILER_VC
-			std::printf("findMSB - avx tzcnt: %d clocks\n", static_cast<unsigned int>(Timestamps7 - Timestamps6));
+			std::printf("findMSB - avx tzcnt: %d clocks\n", static_cast<int>(Timestamps7 - Timestamps6));
 #		endif//GLM_ARCH & GLM_ARCH_AVX && GLM_PLATFORM & GLM_PLATFORM_WINDOWS
 
 		return Error;
@@ -1086,15 +1086,15 @@ namespace findLSB
 
 		std::clock_t Timestamps5 = std::clock();
 
-		std::printf("glm::findLSB: %d clocks\n", static_cast<unsigned int>(Timestamps1 - Timestamps0));
-		std::printf("findLSB - 0.9.5: %d clocks\n", static_cast<unsigned int>(Timestamps2 - Timestamps1));
+		std::printf("glm::findLSB: %d clocks\n", static_cast<int>(Timestamps1 - Timestamps0));
+		std::printf("findLSB - 0.9.5: %d clocks\n", static_cast<int>(Timestamps2 - Timestamps1));
 
 #		if GLM_HAS_BITSCAN_WINDOWS
-			std::printf("findLSB - intrinsics: %d clocks\n", static_cast<unsigned int>(Timestamps3 - Timestamps2));
+			std::printf("findLSB - intrinsics: %d clocks\n", static_cast<int>(Timestamps3 - Timestamps2));
 #		endif
 
-		std::printf("findLSB - ntz2: %d clocks\n", static_cast<unsigned int>(Timestamps4 - Timestamps3));
-		std::printf("findLSB - branchfree: %d clocks\n", static_cast<unsigned int>(Timestamps5 - Timestamps4));
+		std::printf("findLSB - ntz2: %d clocks\n", static_cast<int>(Timestamps4 - Timestamps3));
+		std::printf("findLSB - branchfree: %d clocks\n", static_cast<int>(Timestamps5 - Timestamps4));
 
 		return Error;
 	}
@@ -1485,11 +1485,11 @@ namespace bitCount
 
 		std::clock_t TimestampsF = std::clock();
 
-		std::printf("bitCount - TimeIf %d\n", static_cast<unsigned int>(TimestampsB - TimestampsA));
-		std::printf("bitCount - TimeVec %d\n", static_cast<unsigned int>(TimestampsC - TimestampsB));
-		std::printf("bitCount - TimeDefault %d\n", static_cast<unsigned int>(TimestampsD - TimestampsC));
-		std::printf("bitCount - TimeVec4 %d\n", static_cast<unsigned int>(TimestampsE - TimestampsD));
-		std::printf("bitCount - bitfield %d\n", static_cast<unsigned int>(TimestampsF - TimestampsE));
+		std::printf("bitCount - TimeIf %d\n", static_cast<int>(TimestampsB - TimestampsA));
+		std::printf("bitCount - TimeVec %d\n", static_cast<int>(TimestampsC - TimestampsB));
+		std::printf("bitCount - TimeDefault %d\n", static_cast<int>(TimestampsD - TimestampsC));
+		std::printf("bitCount - TimeVec4 %d\n", static_cast<int>(TimestampsE - TimestampsD));
+		std::printf("bitCount - bitfield %d\n", static_cast<int>(TimestampsF - TimestampsE));
 
 		return Error;
 	}

+ 11 - 11
test/core/core_func_integer_bit_count.cpp

@@ -199,7 +199,7 @@ int main()
 		if (pop0(test[i]) != test[i+1]) error(test[i], pop0(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop0: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop0: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -207,7 +207,7 @@ int main()
 		if (pop1(test[i]) != test[i+1]) error(test[i], pop1(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop1: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop1: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -215,7 +215,7 @@ int main()
 		if (pop2(test[i]) != test[i+1]) error(test[i], pop2(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop2: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop2: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -223,7 +223,7 @@ int main()
 		if (pop3(test[i]) != test[i+1]) error(test[i], pop3(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop3: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop3: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -231,7 +231,7 @@ int main()
 		if (pop4(test[i]) != test[i+1]) error(test[i], pop4(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop4: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop4: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -239,7 +239,7 @@ int main()
 		if (pop5(test[i]) != test[i+1]) error(test[i], pop5(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop5: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop5: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -247,7 +247,7 @@ int main()
 		if (pop5a(test[i]) != test[i+1]) error(test[i], pop5a(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop5a: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop5a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -255,7 +255,7 @@ int main()
 		if (pop6(test[i]) != test[i+1]) error(test[i], pop6(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop6: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop6: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -264,7 +264,7 @@ int main()
 		if (pop7(test[i]) != test[i+1]) error(test[i], pop7(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop7: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop7: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -273,7 +273,7 @@ int main()
 		if (pop8(test[i]) != test[i+1]) error(test[i], pop8(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop8: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop8: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	TimestampBeg = std::clock();
 	for (std::size_t k = 0; k < Count; ++k)
@@ -282,7 +282,7 @@ int main()
 		if (pop9(test[i]) != test[i+1]) error(test[i], pop9(test[i]));}
 	TimestampEnd = std::clock();
 
-	printf("pop9: %ld clocks\n", TimestampEnd - TimestampBeg);
+	printf("pop9: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
 
 	if (errors == 0)
 		printf("Passed all %d cases.\n", static_cast<int>(sizeof(test)/8));

+ 2 - 2
test/core/core_type_vec4.cpp

@@ -433,7 +433,7 @@ static int test_vec4_perf_AoS(std::size_t Size)
 
 	std::clock_t EndTime = std::clock();
 
-	std::printf("AoS: %ld\n", EndTime - StartTime);
+	std::printf("AoS: %d\n", static_cast<int>(EndTime - StartTime));
 
 	return Error;
 }
@@ -472,7 +472,7 @@ static int test_vec4_perf_SoA(std::size_t Size)
 
 	std::clock_t EndTime = std::clock();
 
-	std::printf("SoA: %ld\n", EndTime - StartTime);
+	std::printf("SoA: %d\n", static_cast<int>(EndTime - StartTime));
 
 	return Error;
 }

+ 14 - 14
test/gtc/gtc_bitfield.cpp

@@ -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;
 	}

+ 7 - 7
test/gtc/gtc_integer.cpp

@@ -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;

+ 2 - 2
test/gtc/gtc_round.cpp

@@ -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;
 	}

+ 20 - 20
test/gtx/gtx_fast_trigonometry.cpp

@@ -31,8 +31,8 @@ namespace fastCos
 		const std::clock_t timestamp3 = std::clock();
 		const std::clock_t time_fast = timestamp2 - timestamp1;
 		const std::clock_t time_default = timestamp3 - timestamp2;
-		std::printf("fastCos Time %d clocks\n", static_cast<unsigned int>(time_fast));
-		std::printf("cos Time %d clocks\n", static_cast<unsigned int>(time_default));
+		std::printf("fastCos Time %d clocks\n", static_cast<int>(time_fast));
+		std::printf("cos Time %d clocks\n", static_cast<int>(time_default));
 
 		return time_fast <= time_default ? 0 : 1;
 	}
@@ -65,8 +65,8 @@ namespace fastSin
 		const std::clock_t timestamp3 = std::clock();
 		const std::clock_t time_fast = timestamp2 - timestamp1;
 		const std::clock_t time_default = timestamp3 - timestamp2;
-		std::printf("fastSin Time %d clocks\n", static_cast<unsigned int>(time_fast));
-		std::printf("sin Time %d clocks\n", static_cast<unsigned int>(time_default));
+		std::printf("fastSin Time %d clocks\n", static_cast<int>(time_fast));
+		std::printf("sin Time %d clocks\n", static_cast<int>(time_default));
 
 		return time_fast <= time_default ? 0 : 1;
 	}
@@ -91,8 +91,8 @@ namespace fastTan
 		const std::clock_t timestamp3 = std::clock();
 		const std::clock_t time_fast = timestamp2 - timestamp1;
 		const std::clock_t time_default = timestamp3 - timestamp2;
-		std::printf("fastTan Time %d clocks\n", static_cast<unsigned int>(time_fast));
-		std::printf("tan Time %d clocks\n", static_cast<unsigned int>(time_default));
+		std::printf("fastTan Time %d clocks\n", static_cast<int>(time_fast));
+		std::printf("tan Time %d clocks\n", static_cast<int>(time_default));
 
 		return time_fast <= time_default ? 0 : 1;
 	}
@@ -118,8 +118,8 @@ namespace fastAcos
 		const std::clock_t time_fast = timestamp2 - timestamp1;
 		const std::clock_t time_default = timestamp3 - timestamp2;
 
-		std::printf("fastAcos Time %d clocks\n", static_cast<unsigned int>(time_fast));
-		std::printf("acos Time %d clocks\n", static_cast<unsigned int>(time_default));
+		std::printf("fastAcos Time %d clocks\n", static_cast<int>(time_fast));
+		std::printf("acos Time %d clocks\n", static_cast<int>(time_default));
 
 		return time_fast <= time_default ? 0 : 1;
 	}
@@ -141,8 +141,8 @@ namespace fastAsin
 		const std::clock_t timestamp3 = std::clock();
 		const std::clock_t time_fast = timestamp2 - timestamp1;
 		const std::clock_t time_default = timestamp3 - timestamp2;
-		std::printf("fastAsin Time %d clocks\n", static_cast<unsigned int>(time_fast));
-		std::printf("asin Time %d clocks\n", static_cast<unsigned int>(time_default));
+		std::printf("fastAsin Time %d clocks\n", static_cast<int>(time_fast));
+		std::printf("asin Time %d clocks\n", static_cast<int>(time_default));
 
 		return time_fast <= time_default ? 0 : 1;
 	}
@@ -164,8 +164,8 @@ namespace fastAtan
 		const std::clock_t timestamp3 = std::clock();
 		const std::clock_t time_fast = timestamp2 - timestamp1;
 		const std::clock_t time_default = timestamp3 - timestamp2;
-		std::printf("fastAtan Time %d clocks\n", static_cast<unsigned int>(time_fast));
-		std::printf("atan Time %d clocks\n", static_cast<unsigned int>(time_default));
+		std::printf("fastAtan Time %d clocks\n", static_cast<int>(time_fast));
+		std::printf("atan Time %d clocks\n", static_cast<int>(time_default));
 
 		return time_fast <= time_default ? 0 : 1;
 	}
@@ -247,7 +247,7 @@ namespace taylorCos
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("fastCosNew %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("fastCosNew %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -288,7 +288,7 @@ namespace taylorCos
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("fastCosDeterminisctic %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("fastCosDeterminisctic %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -335,7 +335,7 @@ namespace taylorCos
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("fastCosRef %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("fastCosRef %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -357,7 +357,7 @@ namespace taylorCos
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("fastCosOld %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("fastCosOld %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -379,7 +379,7 @@ namespace taylorCos
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("cos %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("cos %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -474,7 +474,7 @@ namespace taylor2
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("taylorCosA %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("taylorCosA %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -496,7 +496,7 @@ namespace taylor2
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("taylorCosB %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("taylorCosB %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)
@@ -518,7 +518,7 @@ namespace taylor2
 
 		std::clock_t const TimeStampEnd = std::clock();
 
-		std::printf("taylorCosC %ld clocks\n", TimeStampEnd - TimeStampBegin);
+		std::printf("taylorCosC %d clocks\n", static_cast<int>(TimeStampEnd - TimeStampBegin));
 
 		int Error = 0;
 		for(std::size_t i = 0; i < Samples; ++i)