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