Lines Matching refs:value
15 uint32_t RoundUpToPowerOfTwo32(uint32_t value) {
16 DCHECK_LE(value, uint32_t{1} << 31);
17 if (value) --value;
20 return 1u << (32 - CountLeadingZeros(value));
22 value |= value >> 1;
23 value |= value >> 2;
24 value |= value >> 4;
25 value |= value >> 8;
26 value |= value >> 16;
27 return value + 1;
31 uint64_t RoundUpToPowerOfTwo64(uint64_t value) {
32 DCHECK_LE(value, uint64_t{1} << 63);
33 if (value) --value;
36 return uint64_t{1} << (64 - CountLeadingZeros(value));
38 value |= value >> 1;
39 value |= value >> 2;
40 value |= value >> 4;
41 value |= value >> 8;
42 value |= value >> 16;
43 value |= value >> 32;
44 return value + 1;
50 int64_t const value = static_cast<int64_t>(lhs) * static_cast<int64_t>(rhs);
51 return bit_cast<int32_t, uint32_t>(bit_cast<uint64_t>(value) >> 32u);