mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Bitscan forward.
This commit is contained in:
parent
48bc79f6b1
commit
392a0e99bf
1 changed files with 2 additions and 2 deletions
|
|
@ -308,14 +308,14 @@ inline bool bitScanForward(uint64_t v, uint32_t *outFirstSetIndex)
|
|||
inline bool bitScanForward(uint32_t v, uint32_t *outFirstSetIndex)
|
||||
{
|
||||
int i = ffs(v);
|
||||
*out_first_set_index = i - 1;
|
||||
*outFirstSetIndex = i - 1;
|
||||
return i != 0;
|
||||
}
|
||||
|
||||
inline bool bitScanForward(uint64_t v, uint32_t *outFirstSetIndex)
|
||||
{
|
||||
int i = __builtin_ffsll(v);
|
||||
*out_first_set_index = i - 1;
|
||||
*outFirstSetIndex = i - 1;
|
||||
return i != 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue