18 references to PopCount
System.Collections.Specialized (1)
System\Collections\Specialized\BitVector32.cs (1)
141short offset = (short)(priorOffset + BitOperations.PopCount((uint)(ushort)priorMask));
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
285public static byte PopCount(byte value) => (byte)BitOperations.PopCount(value);
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1166static char IBinaryInteger<char>.PopCount(char value) => (char)BitOperations.PopCount(value);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
288public static short PopCount(short value) => (short)BitOperations.PopCount((ushort)value);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
299public static int PopCount(int value) => BitOperations.PopCount((uint)value);
src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (1)
406if (PopCount(value) != 1)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\CastCache.cs (2)
38Debug.Assert(BitOperations.PopCount((uint)initialCacheSize) == 1 && initialCacheSize > 1); 39Debug.Assert(BitOperations.PopCount((uint)maxCacheSize) == 1 && maxCacheSize >= initialCacheSize);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\GenericCache.cs (2)
75Debug.Assert(BitOperations.PopCount((uint)initialCacheSize) == 1 && initialCacheSize > 1); 76Debug.Assert(BitOperations.PopCount((uint)maxCacheSize) == 1 && maxCacheSize >= initialCacheSize);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
291public static sbyte PopCount(sbyte value) => (sbyte)BitOperations.PopCount((byte)value);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (2)
3836count += BitOperations.PopCount(mask); 3860count += BitOperations.PopCount(mask);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (2)
129nuint popcnt = (uint)BitOperations.PopCount(mask); // on x64, perform zero-extension for free 225nuint surrogatePairsCountNuint = (uint)BitOperations.PopCount(highSurrogatesMask);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
282public static ushort PopCount(ushort value) => (ushort)BitOperations.PopCount(value);
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
294public static uint PopCount(uint value) => (uint)BitOperations.PopCount(value);
System.Reflection.Metadata (1)
System\Reflection\Internal\Utilities\BitArithmetic.cs (1)
21return BitOperations.PopCount(v);