Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Log2() [1/2]

static int System.Numerics.BitOperations.Log2 ( uint value)
inlinestatic

Definition at line 180 of file BitOperations.cs.

181 {
182 value |= 1u;
183 if (Lzcnt.IsSupported)
184 {
185 return (int)(0x1F ^ Lzcnt.LeadingZeroCount(value));
186 }
188 {
189 }
191 {
192 return (int)X86Base.BitScanReverse(value);
193 }
195 }
static int Log2SoftwareFallback(uint value)
static uint LeadingZeroCount(uint value)
Definition Lzcnt.cs:22
static uint BitScanReverse(uint value)
Definition X86Base.cs:35

References System.Runtime.Intrinsics.X86.X86Base.BitScanReverse(), System.Runtime.Intrinsics.Arm.ArmBase.IsSupported, System.Runtime.Intrinsics.X86.Lzcnt.IsSupported, System.Runtime.Intrinsics.X86.X86Base.IsSupported, System.Runtime.Intrinsics.X86.Lzcnt.LeadingZeroCount(), System.Numerics.BitOperations.Log2SoftwareFallback(), and System.value.

Referenced by System.Buffers.Text.FormattingHelpers.CountHexDigits(), System.Number.Dragon4(), System.Number.Dragon4Double(), System.Number.Dragon4Half(), System.Number.Dragon4Single(), System.Text.Encodings.Web.DefaultHtmlEncoder.EscaperImplementation.EncodeUtf16(), System.Text.Encodings.Web.DefaultHtmlEncoder.EscaperImplementation.EncodeUtf8(), System.Array.SorterObjectArray.IntrospectiveSort(), System.Array.SorterGenericArray.IntrospectiveSort(), System.Collections.Generic.ArraySortHelper< TKey, TValue >.IntrospectiveSort(), System.Collections.Generic.ArraySortHelper< TKey, TValue >.IntrospectiveSort(), System.SpanHelpers.LocateLastFoundByte(), System.SpanHelpers.LocateLastFoundChar(), System.Byte.Log2(), System.Char.Log2(), System.Int32.Log2(), System.Int64.Log2(), System.IntPtr.Log2(), System.UIntPtr.Log2(), System.SByte.Log2(), System.Int16.Log2(), System.UInt32.Log2(), System.Numerics.BitOperations.Log2(), System.UInt64.Log2(), System.UInt16.Log2(), System.Numerics.BitOperations.Log2Ceiling(), System.Numerics.BitOperations.Log2Ceiling(), System.Buffers.Utilities.SelectBucketIndex(), System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.Sort(), and System.Collections.Generic.GenericArraySortHelper< TKey, TValue >.Sort().