18 references to IsPow2
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (1)
391
Debug.Assert(BitOperations.
IsPow2
(alignment));
ILCompiler.ReadyToRun (3)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\MachObjectWriter.cs (1)
391
Debug.Assert(BitOperations.
IsPow2
(alignment));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WebCilObjectWriter.cs (2)
202
Debug.Assert(BitOperations.
IsPow2
(webcilSection.MinAlignment) && BitOperations.
IsPow2
(WebcilSectionAlignment) &&
System.Private.CoreLib (10)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueueSegment.cs (1)
49
Debug.Assert(BitOperations.
IsPow2
(boundedLength), $"Must be a power of 2, got {boundedLength}");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
487
public static bool IsPow2(short value) => BitOperations.
IsPow2
(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
527
public static bool IsPow2(int value) => BitOperations.
IsPow2
(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
503
if (BitOperations.
IsPow2
(choices.Length))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (3)
570
Debug.Assert(BitOperations.
IsPow2
(InitialCapacity));
593
Debug.Assert(BitOperations.
IsPow2
(buckets.Length));
798
Debug.Assert(BitOperations.
IsPow2
(newSize));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
466
public static bool IsPow2(sbyte value) => BitOperations.
IsPow2
(value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (1)
38
if (!BitOperations.
IsPow2
(sizeof(T)))
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (1)
271
if (!BitOperations.
IsPow2
(alignment))
System.Private.Xml.Linq (1)
System\Xml\Linq\XHashtable.cs (1)
147
Debug.Assert(BitOperations.
IsPow2
(capacity), "capacity must be a power of 2");
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
777
return BitOperations.
IsPow2
(_sign);
System.Security.Cryptography (1)
System\Security\Cryptography\RandomNumberGenerator.cs (1)
362
if (BitOperations.
IsPow2
(choices.Length))
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexCharClass.cs (1)
1224
return BitOperations.
IsPow2
(mask);