Skip to content

Commit

Permalink
Rename popcnt64_bitwise_noinline()
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jul 11, 2024
1 parent 27270d3 commit f9037c0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/primesieve/popcnt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace {
/// It uses 12 arithmetic operations, one of which is a multiply.
/// http://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation
///
NOINLINE uint64_t popcnt64_bitwise(uint64_t x)
NOINLINE uint64_t popcnt64_bitwise_noinline(uint64_t x)
{
uint64_t m1 = 0x5555555555555555ull;
uint64_t m2 = 0x3333333333333333ull;
Expand All @@ -59,7 +59,7 @@ ALWAYS_INLINE uint64_t popcnt64(uint64_t x)
return x;
}
else
return popcnt64_bitwise(x);
return popcnt64_bitwise_noinline(x);
}

} // namespace
Expand All @@ -73,7 +73,7 @@ namespace {
/// It uses 12 arithmetic operations, one of which is a multiply.
/// http://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation
///
NOINLINE uint64_t popcnt64_bitwise(uint64_t x)
NOINLINE uint64_t popcnt64_bitwise_noinline(uint64_t x)
{
uint64_t m1 = 0x5555555555555555ull;
uint64_t m2 = 0x3333333333333333ull;
Expand All @@ -98,7 +98,7 @@ ALWAYS_INLINE uint64_t popcnt64(uint64_t x)
return x0 + x1;
}
else
return popcnt64_bitwise(x);
return popcnt64_bitwise_noinline(x);
}

} // namespace
Expand Down Expand Up @@ -150,7 +150,7 @@ ALWAYS_INLINE uint64_t popcnt64(uint64_t x)
/// It uses 12 arithmetic operations, one of which is a multiply.
/// http://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation
///
NOINLINE uint64_t popcnt64_bitwise(uint64_t x)
NOINLINE uint64_t popcnt64_bitwise_noinline(uint64_t x)
{
uint64_t m1 = 0x5555555555555555ull;
uint64_t m2 = 0x3333333333333333ull;
Expand All @@ -169,7 +169,7 @@ ALWAYS_INLINE uint64_t popcnt64(uint64_t x)
if (cpu_supports_popcnt)
return __popcnt64(x);
else
return popcnt64_bitwise(x);
return popcnt64_bitwise_noinline(x);
}

#else
Expand Down Expand Up @@ -221,7 +221,7 @@ ALWAYS_INLINE uint64_t popcnt64(uint64_t x)
/// It uses 12 arithmetic operations, one of which is a multiply.
/// http://en.wikipedia.org/wiki/Hamming_weight#Efficient_implementation
///
NOINLINE uint64_t popcnt64_bitwise(uint64_t x)
NOINLINE uint64_t popcnt64_bitwise_noinline(uint64_t x)
{
uint64_t m1 = 0x5555555555555555ull;
uint64_t m2 = 0x3333333333333333ull;
Expand All @@ -241,7 +241,7 @@ ALWAYS_INLINE uint64_t popcnt64(uint64_t x)
return __popcnt(uint32_t(x)) +
__popcnt(uint32_t(x >> 32));
else
return popcnt64_bitwise(x);
return popcnt64_bitwise_noinline(x);
}

#else
Expand Down

0 comments on commit f9037c0

Please sign in to comment.