| 165 | return uint32_t(r); |
| 166 | } |
| 167 | __forceinline uint64_t das_clz64(uint64_t x) { |
| 168 | unsigned long r = 0; |
| 169 | #if defined(__i386__) || defined(_M_IX86) |
| 170 | if ( x >> 32 ) { |
| 171 | _BitScanReverse(&r, (unsigned long)(x >> 32)); |
| 172 | r += 32; |
| 173 | } else { |
| 174 | _BitScanReverse(&r, (unsigned long)x); |
| 175 | } |
| 176 | #else |
| 177 | _BitScanReverse64(&r, x); |
| 178 | #endif |
| 179 | return uint64_t(63 - r); |
| 180 | } |
| 181 | __forceinline uint64_t das_ctz64(uint64_t x) { |
| 182 | unsigned long r = 0; |
| 183 | #if defined(__i386__) || defined(_M_IX86) |
no outgoing calls
no test coverage detected