rocr: Fix Windows build and Ctz implementation (#1634)
Этот коммит содержится в:
1 родитель
d998a5280a
Коммит
ee1158b7b8
2 files changed
+19
-2
No files matched your search
@@ -470,8 +470,8 @@ int Ffs(int i) {
|
||||
|
||||
int Ctz(uint64_t i) {
|
||||
unsigned long index;
|
||||
if (_BitScanReverse64(&index, i)) {
|
||||
return sizeof(i) * 8 - 1 - index;
|
||||
if (_BitScanForward64(&index, i)) {
|
||||
return index;
|
||||
} else {
|
||||
return sizeof(i) * 8;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user