Expose RoundUpToPowerOf2 (#53992)
authorHuo Yaoyuan <huoyaoyuan@hotmail.com>
Fri, 11 Jun 2021 21:17:50 +0000 (05:17 +0800)
committerGitHub <noreply@github.com>
Fri, 11 Jun 2021 21:17:50 +0000 (21:17 +0000)
commitffcef4afbcb2f4cfc88f0c063a12b1e9b84d36ba
treeddb0c24e82778c0b2aa328dbaaf5cd3d65dc8393
parent146b3b16d77b26905ec78f024161d1534f8ee0ed
Expose RoundUpToPowerOf2 (#53992)

* 32bit

* 64bit

* Expose in public api

* Unit test

* Add more tests

* Use in test

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
src/libraries/Common/tests/Tests/System/Collections/Generic/ArrayBuilderTests.cs
src/libraries/System.Buffers/tests/ArrayPool/UnitTests.cs
src/libraries/System.Private.CoreLib/src/System/Numerics/BitOperations.cs
src/libraries/System.Runtime.Extensions/tests/System/Numerics/BitOperationsTests.cs
src/libraries/System.Runtime/ref/System.Runtime.cs