23 references to LeadingZeroCount
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\Base2ExponentialHistogramAggregator.cs (1)
283return BitOperations.LeadingZeroCount((ulong)value);
System.Private.CoreLib (21)
src\libraries\System.Private.CoreLib\src\System\Int128.cs (2)
724return 64 + BitOperations.LeadingZeroCount(value._lower); 726return BitOperations.LeadingZeroCount(value._upper);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (3)
298public static long LeadingZeroCount(long value) => BitOperations.LeadingZeroCount((ulong)value); 490return (sizeof(long) * 8) - BitOperations.LeadingZeroCount((ulong)(value)); 494return (sizeof(long) * 8) + 1 - BitOperations.LeadingZeroCount((ulong)(~value));
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
898return double.MinExponent - (BitOperations.LeadingZeroCount(x.TrailingSignificand) - double.BiasedExponentLength);
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (1)
429return 64 - (uint)BitOperations.LeadingZeroCount(value);
src\libraries\System.Private.CoreLib\src\System\Number.DiyFp.cs (1)
93int lzcnt = BitOperations.LeadingZeroCount(f);
src\libraries\System.Private.CoreLib\src\System\Number.NumberToFloatingPointBits.cs (1)
1294int lz = BitOperations.LeadingZeroCount(w);
src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (2)
133int shift = 64 - LeadingZeroCount(value - 1); 263return LeadingZeroCount((ulong)value);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (1)
2200public static int LastIndexOf<T>(Vector512<T> vector, T value) => 63 - BitOperations.LeadingZeroCount(Equals(vector, Create(value)).ExtractMostSignificantBits());
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (2)
934index = 63 - BitOperations.LeadingZeroCount(mask); 956index = 63 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (1)
325int highestSetBitIndex = 63 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (1)
341int bitPos = 62 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (1)
3369int index = 63 - BitOperations.LeadingZeroCount(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (2)
795return 64 + BitOperations.LeadingZeroCount(value._lower); 797return BitOperations.LeadingZeroCount(value._upper);
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (2)
295public static ulong LeadingZeroCount(ulong value) => (ulong)BitOperations.LeadingZeroCount(value); 429int IBinaryInteger<ulong>.GetShortestBitLength() => (sizeof(ulong) * 8) - BitOperations.LeadingZeroCount(m_value);
System.Runtime.Numerics (1)
System\Numerics\NumericsHelpers.cs (1)
53int cbitShift = BitOperations.LeadingZeroCount(man) - 11;