76 references to LeadingZeroCount
http2cat (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
IIS.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
IIS.LongTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
IIS.NewHandler.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
IIS.NewShim.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
IISExpress.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
Microsoft.AspNetCore.DataProtection (1)
src\Shared\Encoding\Int7BitEncodingUtils.cs (1)
20return ((31 - System.Numerics.BitOperations.LeadingZeroCount(value | 1)) / 7) + 1;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
Microsoft.AspNetCore.Server.Kestrel.Core (3)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
434switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
Microsoft.AspNetCore.Shared.Tests (3)
src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
434switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
System.Net.Http (3)
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackDecoder.cs (1)
319switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\IntegerDecoder.cs (1)
71if (BitOperations.LeadingZeroCount((uint)b) <= _m)
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (1)
434switch (BitOperations.LeadingZeroCount(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
System.Private.CoreLib (39)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
282public static byte LeadingZeroCount(byte value) => (byte)(BitOperations.LeadingZeroCount(value) - 24);
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1196static char IBinaryInteger<char>.LeadingZeroCount(char value) => (char)(BitOperations.LeadingZeroCount(value) - 16);
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (3)
623newScale -= BitOperations.LeadingZeroCount(result[hiRes]); 2034curScale = BitOperations.LeadingZeroCount(tmp); 2307int shift = BitOperations.LeadingZeroCount(tmp);
src\libraries\System.Private.CoreLib\src\System\Half.cs (2)
1105int shiftDist = BitOperations.LeadingZeroCount(sig) - 16 - 5; 1539return MinExponent - (BitOperations.LeadingZeroCount(x.TrailingSignificand) - BiasedExponentLength);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
285public static short LeadingZeroCount(short value) => (short)(BitOperations.LeadingZeroCount((ushort)value) - 16);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
301public static int LeadingZeroCount(int value) => BitOperations.LeadingZeroCount((uint)value);
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
213return float.MinExponent - (BitOperations.LeadingZeroCount(x.TrailingSignificand) - float.BiasedExponentLength);
src\libraries\System.Private.CoreLib\src\System\Number.BigInteger.cs (2)
424return 32 - (uint)BitOperations.LeadingZeroCount(value); 523int shiftLeft = BitOperations.LeadingZeroCount(divHi);
src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (3)
102return (uint)(0x1_0000_0000ul >> LeadingZeroCount(value - 1)); 246return 32 + LeadingZeroCount((uint)value); 249return LeadingZeroCount(hi);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (1)
2085public static int LastIndexOf<T>(Vector128<T> vector, T value) => 31 - BitOperations.LeadingZeroCount(Equals(vector, Create(value)).ExtractMostSignificantBits());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.Numerics.cs (4)
284internal static int LastIndexOf(Vector2 vector, float value) => 31 - BitOperations.LeadingZeroCount(Equals(vector.AsVector128(), Create(value, value, -1, -1)).ExtractMostSignificantBits()); 289internal static int LastIndexOf(Vector3 vector, float value) => 31 - BitOperations.LeadingZeroCount(Equals(vector.AsVector128(), Create(value, value, value, -1)).ExtractMostSignificantBits()); 294internal static int LastIndexOfWhereAllBitsSet(Vector2 vector) => 31 - BitOperations.LeadingZeroCount(Equals(vector.AsVector128().AsInt32(), Vector128<int>.AllBitsSet).ExtractMostSignificantBits()); 299internal static int LastIndexOfWhereAllBitsSet(Vector3 vector) => 31 - BitOperations.LeadingZeroCount(Equals(vector.AsVector128().AsInt32(), Vector128<int>.AllBitsSet).ExtractMostSignificantBits());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (1)
2178public static int LastIndexOf<T>(Vector256<T> vector, T value) => 31 - BitOperations.LeadingZeroCount(Equals(vector, Create(value)).ExtractMostSignificantBits());
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (1)
2019public static int LastIndexOf<T>(Vector64<T> vector, T value) => 31 - BitOperations.LeadingZeroCount(Equals(vector, Create(value)).ExtractMostSignificantBits());
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
288public static sbyte LeadingZeroCount(sbyte value) => (sbyte)(BitOperations.LeadingZeroCount((byte)value) - 24);
src\libraries\System.Private.CoreLib\src\System\SearchValues\IndexOfAnyAsciiSearcher.cs (4)
1256int offsetInVector = 31 - BitOperations.LeadingZeroCount(mask); 1265int offsetInVector = 31 - BitOperations.LeadingZeroCount(mask); 1287int offsetInVector = 31 - BitOperations.LeadingZeroCount(mask); 1303int offsetInVector = 31 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (2)
883index = 31 - BitOperations.LeadingZeroCount(mask); 905index = 31 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (2)
372int highestSetBitIndex = 31 - BitOperations.LeadingZeroCount(mask); 421int highestSetBitIndex = 31 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (2)
391int bitPos = 30 - BitOperations.LeadingZeroCount(mask); 441int bitPos = 30 - BitOperations.LeadingZeroCount(mask);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (2)
3353int index = 31 - BitOperations.LeadingZeroCount(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero) 3361int index = 31 - BitOperations.LeadingZeroCount(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1181int shift = BitOperations.LeadingZeroCount(divHi);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
279public static ushort LeadingZeroCount(ushort value) => (ushort)(BitOperations.LeadingZeroCount(value) - 16);
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
296public static uint LeadingZeroCount(uint value) => (uint)BitOperations.LeadingZeroCount(value); 430int IBinaryInteger<uint>.GetShortestBitLength() => (sizeof(uint) * 8) - BitOperations.LeadingZeroCount(m_value);
System.Runtime.Numerics (11)
System\Numerics\BigInteger.cs (7)
858int c = BitOperations.LeadingZeroCount((uint)h); 1879int z = BitOperations.LeadingZeroCount((uint)h); 3103long bitLength = bitsArrayLength * 32L - BitOperations.LeadingZeroCount(highValue); 3620return (sizeof(int) * 8) - BitOperations.LeadingZeroCount((uint)(value)); 3624return (sizeof(int) * 8) + 1 - BitOperations.LeadingZeroCount((uint)(~value)); 3632result += (sizeof(uint) * 8) - BitOperations.LeadingZeroCount(bits[^1]); 3651result += (sizeof(uint) * 8) + 1 - BitOperations.LeadingZeroCount(~part);
System\Numerics\BigIntegerCalculator.DivRem.cs (3)
227int shift = BitOperations.LeadingZeroCount(divHi); 380int sigmaSmall = BitOperations.LeadingZeroCount(right[^1]); 393if (BitOperations.LeadingZeroCount(left[^1]) <= sigmaSmall)
System\Numerics\BigIntegerCalculator.GcdInv.cs (1)
267int z = BitOperations.LeadingZeroCount((uint)xh);
System.Windows.Forms.Tests (2)
System\Windows\Forms\DragDropHelperTests.cs (2)
123bool isDragImageNull = BitOperations.LeadingZeroCount((uint)(nint)pDragImage->hbmpDragImage).Equals(32); 150bool isDragImageNull = BitOperations.LeadingZeroCount((uint)(nint)pDragImage->hbmpDragImage).Equals(32);