1#ifndef PRISM_INTERNAL_BIT_H
2#define PRISM_INTERNAL_BIT_H
13#if defined(__GNUC__) || defined(__clang__)
14#define pm_ctzll(v) ((unsigned) __builtin_ctzll(v))
15#elif defined(_MSC_VER)
22 _BitScanForward64(&index, v);
23 return (
unsigned) index;
31 v &= (uint64_t) (-(int64_t) v);
32 if (v & 0x00000000FFFFFFFFULL) c += 0;
else c += 32;
33 if (v & 0x0000FFFF0000FFFFULL) c += 0;
else c += 16;
34 if (v & 0x00FF00FF00FF00FFULL) c += 0;
else c += 8;
35 if (v & 0x0F0F0F0F0F0F0F0FULL) c += 0;
else c += 4;
36 if (v & 0x3333333333333333ULL) c += 0;
else c += 2;
37 if (v & 0x5555555555555555ULL) c += 0;
else c += 1;
#define PRISM_INLINE
Old Visual Studio versions do not support the inline keyword, so we need to define it to be __inline.