16 references to LeadingZeroCount
System.Private.CoreLib (8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (3)
325
public static nint LeadingZeroCount(nint value) => BitOperations.
LeadingZeroCount
((nuint)value);
512
return (sizeof(nint_t) * 8) - BitOperations.
LeadingZeroCount
((nuint)value);
516
return (sizeof(nint_t) * 8) + 1 - BitOperations.
LeadingZeroCount
((nuint)(~value));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (1)
550
return (lastIndex * BitsPerBlock) + (BitsPerBlock - BitOperations.
LeadingZeroCount
(value._blocks[lastIndex]));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (1)
245
byte shift = (byte)BitOperations.
LeadingZeroCount
((nuint)(size - 1));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (1)
234
byte shift = (byte)BitOperations.
LeadingZeroCount
((nuint)(size - 1));
src\runtime\src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (2)
321
public static nuint LeadingZeroCount(nuint value) => (nuint)BitOperations.
LeadingZeroCount
(value);
449
int IBinaryInteger<nuint>.GetShortestBitLength() => (sizeof(nuint_t) * 8) - BitOperations.
LeadingZeroCount
(_value);
System.Runtime.Numerics (8)
System\Numerics\BigInteger.cs (8)
1615
int lzc = BitOperations.
LeadingZeroCount
(highLimb);
1621
int lzc = BitOperations.
LeadingZeroCount
(~highLimb);
3282
BitOperations.
LeadingZeroCount
(highValue);
3391
return BitOperations.
LeadingZeroCount
(value._bits[^1]) & 31;
3803
result += BigIntegerCalculator.BitsPerLimb - BitOperations.
LeadingZeroCount
(bits[^1]);
3818
result += BigIntegerCalculator.BitsPerLimb + 1 - BitOperations.
LeadingZeroCount
(~part);
4035
? (BigInteger)((BigIntegerCalculator.BitsPerLimb - 1) ^ BitOperations.
LeadingZeroCount
((nuint)value._sign | 1))
4036
: (BigInteger)(((long)value._bits.Length * BigIntegerCalculator.BitsPerLimb - 1) ^ BitOperations.
LeadingZeroCount
(value._bits[^1]));