VoteAllEqual, FindLSB/MSB

This commit is contained in:
Isaac Marovitz
2024-06-22 14:38:09 +01:00
committed by Evan Husted
parent fac2cbbbbf
commit a1ab7fe6a2
13 changed files with 101 additions and 23 deletions

View File

@@ -0,0 +1,5 @@
template<typename T>
inline T findLSB(T x)
{
return select(ctz(x), T(-1), x == T(0));
}