Lines Matching defs:value
37 // Undefined for zero value.
38 INLINE(static int CountTrailingZeros(uint32_t value));
41 // Undefined for zero value.
42 INLINE(static int CountLeadingZeros(uint32_t value));
45 INLINE(static int CountSetBits(uint32_t value));
49 int CompilerIntrinsics::CountTrailingZeros(uint32_t value) {
50 return __builtin_ctz(value);
53 int CompilerIntrinsics::CountLeadingZeros(uint32_t value) {
54 return __builtin_clz(value);
57 int CompilerIntrinsics::CountSetBits(uint32_t value) {
58 return __builtin_popcount(value);
66 int CompilerIntrinsics::CountTrailingZeros(uint32_t value) {
68 _BitScanForward(&result, static_cast<long>(value)); //NOLINT
72 int CompilerIntrinsics::CountLeadingZeros(uint32_t value) {
74 _BitScanReverse(&result, static_cast<long>(value)); //NOLINT
78 int CompilerIntrinsics::CountSetBits(uint32_t value) {
80 value = ((value >> 1) & 0x55555555) + (value & 0x55555555);
81 value = ((value >> 2) & 0x33333333) + (value & 0x33333333);
82 value = ((value >> 4) & 0x0f0f0f0f) + (value & 0x0f0f0f0f);
83 value = ((value >> 8) & 0x00ff00ff) + (value & 0x00ff00ff);
84 value = ((value >> 16) & 0x0000ffff) + (value & 0x0000ffff);
85 return value;