mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-09 12:02:34 -07:00
VoteAllEqual, FindLSB/MSB
This commit is contained in:
committed by
Isaac Marovitz
parent
b094d34575
commit
a71b5f1a3a
@@ -0,0 +1,6 @@
|
||||
template<typename T>
|
||||
inline T findMSBU32(T x)
|
||||
{
|
||||
T v = select(x, T(-1) - x, x < T(0));
|
||||
return select(clz(T(0)) - (clz(v) + T(1)), T(-1), v == T(0));
|
||||
}
|
Reference in New Issue
Block a user