mirror of
https://github.com/g-truc/glm.git
synced 2024-11-30 03:44:38 +00:00
Fixed build
This commit is contained in:
parent
a6b31d8fa1
commit
98fd37bef1
@ -979,6 +979,7 @@ namespace findLSB
|
||||
{0x00000000, -1}
|
||||
};
|
||||
|
||||
# if GLM_HAS_BITSCAN_WINDOWS
|
||||
template <typename genIUType>
|
||||
GLM_FUNC_QUALIFIER int findLSB_intrinsic(genIUType Value)
|
||||
{
|
||||
@ -991,6 +992,7 @@ namespace findLSB
|
||||
_BitScanForward(&Result, Value);
|
||||
return int(Result);
|
||||
}
|
||||
# endif
|
||||
|
||||
template <typename genIUType>
|
||||
GLM_FUNC_QUALIFIER int findLSB_095(genIUType Value)
|
||||
@ -1039,11 +1041,13 @@ namespace findLSB
|
||||
Error += DataI32[i].Return == Result ? 0 : 1;
|
||||
}
|
||||
|
||||
# if GLM_HAS_BITSCAN_WINDOWS
|
||||
for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(type<int>); ++i)
|
||||
{
|
||||
int Result = findLSB_intrinsic(DataI32[i].Value);
|
||||
Error += DataI32[i].Return == Result ? 0 : 1;
|
||||
}
|
||||
# endif
|
||||
|
||||
for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(type<int>); ++i)
|
||||
{
|
||||
@ -1094,12 +1098,14 @@ namespace findLSB
|
||||
|
||||
std::clock_t Timestamps2 = std::clock();
|
||||
|
||||
# if GLM_HAS_BITSCAN_WINDOWS
|
||||
for(std::size_t k = 0; k < Count; ++k)
|
||||
for(std::size_t i = 0; i < sizeof(DataI32) / sizeof(type<int>); ++i)
|
||||
{
|
||||
int Result = findLSB_intrinsic(DataI32[i].Value);
|
||||
Error += DataI32[i].Return == Result ? 0 : 1;
|
||||
}
|
||||
# endif
|
||||
|
||||
std::clock_t Timestamps3 = std::clock();
|
||||
|
||||
@ -1123,7 +1129,11 @@ namespace findLSB
|
||||
|
||||
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));
|
||||
|
||||
# if GLM_HAS_BITSCAN_WINDOWS
|
||||
std::printf("findLSB - intrinsics: %d clocks\n", static_cast<unsigned 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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user