Lines Matching refs:width
16 int CountLeadingZeros(uint64_t value, int width) {
18 DCHECK((width == 32) || (width == 64));
20 uint64_t bit_test = 1UL << (width - 1);
21 while ((count < width) && ((bit_test & value) == 0)) {
29 int CountLeadingSignBits(int64_t value, int width) {
31 DCHECK((width == 32) || (width == 64));
33 return CountLeadingZeros(value, width) - 1;
35 return CountLeadingZeros(~value, width) - 1;
40 int CountTrailingZeros(uint64_t value, int width) {
42 DCHECK((width == 32) || (width == 64));
44 while ((count < width) && (((value >> count) & 1) == 0)) {
51 int CountSetBits(uint64_t value, int width) {
54 DCHECK((width == 32) || (width == 64));
57 value &= (0xffffffffffffffffUL >> (64-width));