MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / das_clz64

Function das_clz64

include/daScript/misc/platform.h:167–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 6

array_resizeFunction · 0.85
findBitfieldNameMethod · 0.85
array_growFunction · 0.85
das_block_partition_rFunction · 0.85
das_block_partition_tFunction · 0.85
uint64_clzFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected