Skip to content

Commit

Permalink
Fix VC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Feb 8, 2024
1 parent ce58d95 commit f28c262
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/core/core_func_integer_find_lsb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static int ntz7(unsigned x)
# pragma warning(push)
# pragma warning(disable : 4146)
#endif

/*
static int ntz7_christophe(unsigned x)
{
unsigned y, bz, b4, b3, b2, b1, b0;
Expand All @@ -180,6 +180,7 @@ static int ntz7_christophe(unsigned x)
b0 = static_cast<unsigned>(!static_cast<bool>(y & 0x55555555)) * 1;
return bz + b4 + b3 + b2 + b1 + b0;
}
*/

/* Below is David Seal's algorithm, found at
http://www.ciphersbyritter.com/NEWS4/BITCT.HTM Table
Expand Down Expand Up @@ -385,15 +386,15 @@ int main()
TimestampEnd = std::clock();

std::printf("ntz7: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));

/*
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
for (i = 0; i < n; i += 2) {
if (ntz7_christophe(test[i]) != test[i+1]) error(test[i], ntz7(test[i]));}
TimestampEnd = std::clock();
std::printf("ntz7_christophe: %d clocks\n", static_cast<int>(TimestampEnd - TimestampBeg));

*/
TimestampBeg = std::clock();
for (std::size_t k = 0; k < Count; ++k)
for (i = 0; i < n; i += 2) {
Expand Down

0 comments on commit f28c262

Please sign in to comment.