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

◆ Widen() [1/7]

static unsafe void System.Numerics.Vector< T >.Widen ( Vector< byte > source,
out Vector< ushort > low,
out Vector< ushort > high )
inlinestatic

Definition at line 493 of file Vector.cs.

494 {
495 int count = Vector<byte>.Count;
496 ushort* ptr = stackalloc ushort[count / 2];
497 for (int i = 0; i < count / 2; i++)
498 {
499 ptr[i] = source[i];
500 }
501 ushort* ptr2 = stackalloc ushort[count / 2];
502 for (int j = 0; j < count / 2; j++)
503 {
504 ptr2[j] = source[j + count / 2];
505 }
506 low = *(Vector<ushort>*)ptr;
507 high = *(Vector<ushort>*)ptr2;
508 }

References System.count, System.Numerics.Vector< T >.Count, and System.source.

Referenced by System.Text.ASCIIUtility.WidenAsciiToUtf16(), and System.Text.Latin1Utility.WidenLatin1ToUtf16_Fallback().