49 references to LeadingZeroCount
ILCompiler.Compiler (4)
Compiler\ObjectWriter\Eabi\EabiUnwindConverter.cs (4)
262
int leadingZeros = BitOperations.
LeadingZeroCount
(mask);
263
int bitRunLength = BitOperations.
LeadingZeroCount
(~(mask << leadingZeros));
275
int leadingZeros = BitOperations.
LeadingZeroCount
(mask);
276
int bitRunLength = BitOperations.
LeadingZeroCount
(~(mask << leadingZeros));
ILCompiler.MetadataTransform (1)
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatWriter.cs (1)
1923
return (sizeof(uint) * 8) - BitOperations.
LeadingZeroCount
(x);
ILCompiler.ReadyToRun (3)
Compiler\DependencyAnalysis\ReadyToRun\DebugInfoTableNode.cs (2)
161
int bitWidthForNativeDelta = Math.Max(1, 32 - System.Numerics.BitOperations.
LeadingZeroCount
(maxNativeDelta));
162
int bitWidthForILOffset = Math.Max(1, 32 - System.Numerics.BitOperations.
LeadingZeroCount
(maxILValue));
src\runtime\src\coreclr\tools\Common\Internal\NativeFormat\NativeFormatWriter.cs (1)
1923
return (sizeof(uint) * 8) - BitOperations.
LeadingZeroCount
(x);
Microsoft.AspNetCore.Antiforgery (1)
src\aspnetcore\src\Shared\Encoding\Int7BitEncodingUtils.cs (1)
17
return ((31 - System.Numerics.BitOperations.
LeadingZeroCount
(value | 1)) / 7) + 1;
Microsoft.AspNetCore.DataProtection (1)
src\aspnetcore\src\Shared\Encoding\Int7BitEncodingUtils.cs (1)
17
return ((31 - System.Numerics.BitOperations.
LeadingZeroCount
(value | 1)) / 7) + 1;
Microsoft.AspNetCore.Server.Kestrel.Core (3)
src\aspnetcore\src\Shared\runtime\Http2\Hpack\HPackDecoder.cs (1)
319
switch (BitOperations.
LeadingZeroCount
(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\aspnetcore\src\Shared\runtime\Http2\Hpack\IntegerDecoder.cs (1)
71
if (BitOperations.
LeadingZeroCount
((uint)b) <= _m)
src\aspnetcore\src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
434
switch (BitOperations.
LeadingZeroCount
(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
System.Net.Http (3)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackDecoder.cs (1)
319
switch (BitOperations.
LeadingZeroCount
(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\IntegerDecoder.cs (1)
71
if (BitOperations.
LeadingZeroCount
((uint)b) <= _m)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (1)
434
switch (BitOperations.
LeadingZeroCount
(b) - 24) // byte 'b' is extended to uint, so will have 24 extra 0s.
System.Private.CoreLib (28)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
276
public static byte LeadingZeroCount(byte value) => (byte)(BitOperations.
LeadingZeroCount
(value) - 24);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1230
static char IBinaryInteger<char>.LeadingZeroCount(char value) => (char)(BitOperations.
LeadingZeroCount
(value) - 16);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (3)
613
newScale -= BitOperations.
LeadingZeroCount
(result[hiRes]);
2010
curScale = BitOperations.
LeadingZeroCount
(tmp);
2298
int shift = BitOperations.
LeadingZeroCount
(tmp);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1138
int shiftDist = BitOperations.
LeadingZeroCount
(sig) - 16 - 5;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
279
public static short LeadingZeroCount(short value) => (short)(BitOperations.
LeadingZeroCount
((ushort)value) - 16);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
295
public static int LeadingZeroCount(int value) => BitOperations.
LeadingZeroCount
((uint)value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
211
return float.MinExponent - (BitOperations.
LeadingZeroCount
(x.TrailingSignificand) - float.BiasedExponentLength);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (3)
102
return (uint)(0x1_0000_0000ul >>
LeadingZeroCount
(value - 1));
246
return 32 +
LeadingZeroCount
((uint)value);
249
return
LeadingZeroCount
(hi);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (1)
4381
return 31 - BitOperations.
LeadingZeroCount
(vector.ExtractMostSignificantBits());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (1)
4290
return 31 - BitOperations.
LeadingZeroCount
(vector.ExtractMostSignificantBits());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (2)
4500
return (Vector64<T>.Count - 1) - AdvSimdFixupBitCount<T>(BitOperations.
LeadingZeroCount
(AdvSimdExtractBitMask(vector)));
4504
return 31 - BitOperations.
LeadingZeroCount
(vector.ExtractMostSignificantBits());
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
282
public static sbyte LeadingZeroCount(sbyte value) => (sbyte)(BitOperations.
LeadingZeroCount
((byte)value) - 24);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMap.cs (2)
891
index = 31 - BitOperations.
LeadingZeroCount
(mask);
913
index = 31 - BitOperations.
LeadingZeroCount
(mask);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (2)
372
int highestSetBitIndex = 31 - BitOperations.
LeadingZeroCount
(mask);
421
int highestSetBitIndex = 31 - BitOperations.
LeadingZeroCount
(mask);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Char.cs (2)
392
int bitPos = 30 - BitOperations.
LeadingZeroCount
(mask);
442
int bitPos = 30 - BitOperations.
LeadingZeroCount
(mask);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (2)
3741
int index = 31 - BitOperations.
LeadingZeroCount
(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero)
3749
int index = 31 - BitOperations.
LeadingZeroCount
(notEqualsElements); // 31 = 32 (bits in Int32) - 1 (indexing from zero)
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
273
public static ushort LeadingZeroCount(ushort value) => (ushort)(BitOperations.
LeadingZeroCount
(value) - 16);
src\runtime\src\libraries\System.Private.CoreLib\src\System\UInt32.cs (2)
290
public static uint LeadingZeroCount(uint value) => (uint)BitOperations.
LeadingZeroCount
(value);
437
int IBinaryInteger<uint>.GetShortestBitLength() => (sizeof(uint) * 8) - BitOperations.
LeadingZeroCount
(m_value);
System.Runtime.Numerics (5)
System\Numerics\BigInteger.cs (4)
1030
c = BitOperations.
LeadingZeroCount
((uint)h);
2122
int z = BitOperations.
LeadingZeroCount
((uint)h);
3796
return value >= 0 ? 32 - BitOperations.
LeadingZeroCount
((uint)value) : 33 - BitOperations.
LeadingZeroCount
(~(uint)value);
System\Numerics\BigIntegerCalculator.GcdInv.cs (1)
332
int z = BitOperations.
LeadingZeroCount
((uint)xh);