Fixed GLM test warning

This commit is contained in:
Christophe Riccio 2016-11-24 21:16:02 +01:00
parent d39749d1d6
commit bb1debc9e1

View File

@ -257,8 +257,6 @@ void error(int x, int y) {
printf("Error for x = %08x, got %d\n", x, y);
}
/* ------------------------------ main ------------------------------ */
int main()
{
# ifdef NDEBUG
@ -286,7 +284,7 @@ int main()
if (ntz1(test[i]) != test[i+1]) error(test[i], ntz1(test[i]));}
TimestampEnd = std::clock();
printf("ntz1: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz1: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -294,7 +292,7 @@ int main()
if (ntz2(test[i]) != test[i+1]) error(test[i], ntz2(test[i]));}
TimestampEnd = std::clock();
printf("ntz2: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz2: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -302,7 +300,7 @@ int main()
if (ntz3(test[i]) != test[i+1]) error(test[i], ntz3(test[i]));}
TimestampEnd = std::clock();
printf("ntz3: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz3: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -310,7 +308,7 @@ int main()
if (ntz4(test[i]) != test[i+1]) error(test[i], ntz4(test[i]));}
TimestampEnd = std::clock();
printf("ntz4: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz4: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -318,7 +316,7 @@ int main()
if (ntz4a(test[i]) != test[i+1]) error(test[i], ntz4a(test[i]));}
TimestampEnd = std::clock();
printf("ntz4a: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz4a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -327,7 +325,7 @@ int main()
if (ntz5(test[i]) != m) error(test[i], ntz5(test[i]));}
TimestampEnd = std::clock();
printf("ntz5: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz5: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -335,7 +333,7 @@ int main()
if (ntz6(test[i]) != test[i+1]) error(test[i], ntz6(test[i]));}
TimestampEnd = std::clock();
printf("ntz6: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz6: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -343,7 +341,7 @@ int main()
if (ntz6a(test[i]) != test[i+1]) error(test[i], ntz6a(test[i]));}
TimestampEnd = std::clock();
printf("ntz6a: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz6a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -351,7 +349,7 @@ int main()
if (ntz7(test[i]) != test[i+1]) error(test[i], ntz7(test[i]));}
TimestampEnd = std::clock();
printf("ntz7: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz7: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -359,7 +357,7 @@ int main()
if (ntz7_christophe(test[i]) != test[i+1]) error(test[i], ntz7(test[i]));}
TimestampEnd = std::clock();
printf("ntz7_christophe: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz7_christophe: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -367,7 +365,7 @@ int main()
if (ntz8(test[i]) != test[i+1]) error(test[i], ntz8(test[i]));}
TimestampEnd = std::clock();
printf("ntz8: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz8: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -375,7 +373,7 @@ int main()
if (ntz8a(test[i]) != test[i+1]) error(test[i], ntz8a(test[i]));}
TimestampEnd = std::clock();
printf("ntz8a: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz8a: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -383,7 +381,7 @@ int main()
if (ntz9(test[i]) != test[i+1]) error(test[i], ntz9(test[i]));}
TimestampEnd = std::clock();
printf("ntz9: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz9: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
@ -391,7 +389,7 @@ int main()
if (ntz10(test[i]) != test[i+1]) error(test[i], ntz10(test[i]));}
TimestampEnd = std::clock();
printf("ntz10: %d clocks\n", TimestampEnd - TimestampBeg);
printf("ntz10: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));
if (errors == 0)
printf("Passed all %d cases.\n", sizeof(test)/8);