Templated, uniformly-named C++ functions wrapping what should have been single PTX - but aren't (in a dedicated non_builtins
namespace).
More...
|
template<typename I > |
KAT_FD int | kat::non_builtins::find_first_set (I x) |
| Determine the 1-based index of the first non-zero bit in the argument. More...
|
|
template<> |
KAT_FD int | kat::non_builtins::find_first_set< int > (int x) |
|
template<> |
KAT_FD int | kat::non_builtins::find_first_set< long long > (long long x) |
|
template<typename I , bool FixSemanticsForZero = true> |
KAT_FD int | kat::non_builtins::count_trailing_zeros (I x) |
| counts the number of initial zeros when considering the binary representation of a number from least to most significant digit More...
|
|
template<typename I > |
KAT_FD int | kat::non_builtins::count_leading_zeros (I x) |
| counts the number of initial zeros when considering the binary representation of a number from most to least significant digit More...
|
|
Templated, uniformly-named C++ functions wrapping what should have been single PTX - but aren't (in a dedicated non_builtins
namespace).
There are several functions one would expect would compile to single PTX instructions (Similar ones do compile to single PTX instructions, and on the CPU, they themselves often translate to a single machine instruction) - but strangely, they do not. Implementations of such functions are found in this file rather than in on_device/builtins.cuh
; and they get a different namespace to avoid accidental confusion.