Normalize whitespace/indentation
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
This commit is contained in:
Родитель
1531f06527
Коммит
b8ad9c2183
|
@ -20,7 +20,8 @@ namespace System.Numerics
|
||||||
{
|
{
|
||||||
internal class ConstantHelper
|
internal class ConstantHelper
|
||||||
{
|
{
|
||||||
<# foreach (var type in supportedTypes)
|
<#
|
||||||
|
foreach (var type in supportedTypes)
|
||||||
{
|
{
|
||||||
string hexValue = "0x" + new string('f', Marshal.SizeOf(type) * 2);
|
string hexValue = "0x" + new string('f', Marshal.SizeOf(type) * 2);
|
||||||
#>
|
#>
|
||||||
|
@ -57,4 +58,4 @@ namespace System.Numerics
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace System.Numerics
|
||||||
internal byte _byte;
|
internal byte _byte;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculates the size of this struct in bytes, by computing the offset of a field in a structure
|
// Calculates the size of this struct in bytes, by computing the offset of a field in a structure
|
||||||
private static unsafe int InitializeCount()
|
private static unsafe int InitializeCount()
|
||||||
{
|
{
|
||||||
VectorSizeHelper vsh;
|
VectorSizeHelper vsh;
|
||||||
|
@ -5182,21 +5182,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<byte> Narrow(Vector<ushort> low, Vector<ushort> high)
|
public static unsafe Vector<byte> Narrow(Vector<ushort> low, Vector<ushort> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<byte>.Count;
|
int elements = Vector<byte>.Count;
|
||||||
byte* retPtr = stackalloc byte[elements];
|
byte* retPtr = stackalloc byte[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (byte)low[i];
|
retPtr[i] = (byte)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (byte)high[i];
|
retPtr[i + (elements / 2)] = (byte)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<byte>(retPtr);
|
return new Vector<byte>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5209,21 +5209,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<ushort> Narrow(Vector<uint> low, Vector<uint> high)
|
public static unsafe Vector<ushort> Narrow(Vector<uint> low, Vector<uint> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<ushort>.Count;
|
int elements = Vector<ushort>.Count;
|
||||||
ushort* retPtr = stackalloc ushort[elements];
|
ushort* retPtr = stackalloc ushort[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (ushort)low[i];
|
retPtr[i] = (ushort)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (ushort)high[i];
|
retPtr[i + (elements / 2)] = (ushort)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<ushort>(retPtr);
|
return new Vector<ushort>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5236,21 +5236,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<uint> Narrow(Vector<ulong> low, Vector<ulong> high)
|
public static unsafe Vector<uint> Narrow(Vector<ulong> low, Vector<ulong> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<uint>.Count;
|
int elements = Vector<uint>.Count;
|
||||||
uint* retPtr = stackalloc uint[elements];
|
uint* retPtr = stackalloc uint[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (uint)low[i];
|
retPtr[i] = (uint)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (uint)high[i];
|
retPtr[i + (elements / 2)] = (uint)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<uint>(retPtr);
|
return new Vector<uint>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5263,21 +5263,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<sbyte> Narrow(Vector<short> low, Vector<short> high)
|
public static unsafe Vector<sbyte> Narrow(Vector<short> low, Vector<short> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<sbyte>.Count;
|
int elements = Vector<sbyte>.Count;
|
||||||
sbyte* retPtr = stackalloc sbyte[elements];
|
sbyte* retPtr = stackalloc sbyte[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (sbyte)low[i];
|
retPtr[i] = (sbyte)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (sbyte)high[i];
|
retPtr[i + (elements / 2)] = (sbyte)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<sbyte>(retPtr);
|
return new Vector<sbyte>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5289,21 +5289,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<short> Narrow(Vector<int> low, Vector<int> high)
|
public static unsafe Vector<short> Narrow(Vector<int> low, Vector<int> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<short>.Count;
|
int elements = Vector<short>.Count;
|
||||||
short* retPtr = stackalloc short[elements];
|
short* retPtr = stackalloc short[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (short)low[i];
|
retPtr[i] = (short)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (short)high[i];
|
retPtr[i + (elements / 2)] = (short)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<short>(retPtr);
|
return new Vector<short>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5315,21 +5315,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<int> Narrow(Vector<long> low, Vector<long> high)
|
public static unsafe Vector<int> Narrow(Vector<long> low, Vector<long> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<int>.Count;
|
int elements = Vector<int>.Count;
|
||||||
int* retPtr = stackalloc int[elements];
|
int* retPtr = stackalloc int[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (int)low[i];
|
retPtr[i] = (int)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (int)high[i];
|
retPtr[i + (elements / 2)] = (int)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<int>(retPtr);
|
return new Vector<int>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5341,21 +5341,21 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<float> Narrow(Vector<double> low, Vector<double> high)
|
public static unsafe Vector<float> Narrow(Vector<double> low, Vector<double> high)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<float>.Count;
|
int elements = Vector<float>.Count;
|
||||||
float* retPtr = stackalloc float[elements];
|
float* retPtr = stackalloc float[elements];
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (float)low[i];
|
retPtr[i] = (float)low[i];
|
||||||
}
|
}
|
||||||
for (int i = 0; i < elements / 2; i++)
|
for (int i = 0; i < elements / 2; i++)
|
||||||
{
|
{
|
||||||
retPtr[i + (elements / 2)] = (float)high[i];
|
retPtr[i + (elements / 2)] = (float)high[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<float>(retPtr);
|
return new Vector<float>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Widen/Narrow
|
#endregion Widen/Narrow
|
||||||
|
@ -5369,17 +5369,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<float> ConvertToSingle(Vector<int> value)
|
public static unsafe Vector<float> ConvertToSingle(Vector<int> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<float>.Count;
|
int elements = Vector<float>.Count;
|
||||||
float* retPtr = stackalloc float[elements];
|
float* retPtr = stackalloc float[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (float)value[i];
|
retPtr[i] = (float)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<float>(retPtr);
|
return new Vector<float>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5391,17 +5391,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<float> ConvertToSingle(Vector<uint> value)
|
public static unsafe Vector<float> ConvertToSingle(Vector<uint> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<float>.Count;
|
int elements = Vector<float>.Count;
|
||||||
float* retPtr = stackalloc float[elements];
|
float* retPtr = stackalloc float[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (float)value[i];
|
retPtr[i] = (float)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<float>(retPtr);
|
return new Vector<float>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5412,17 +5412,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<double> ConvertToDouble(Vector<long> value)
|
public static unsafe Vector<double> ConvertToDouble(Vector<long> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<double>.Count;
|
int elements = Vector<double>.Count;
|
||||||
double* retPtr = stackalloc double[elements];
|
double* retPtr = stackalloc double[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (double)value[i];
|
retPtr[i] = (double)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<double>(retPtr);
|
return new Vector<double>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5434,17 +5434,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<double> ConvertToDouble(Vector<ulong> value)
|
public static unsafe Vector<double> ConvertToDouble(Vector<ulong> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<double>.Count;
|
int elements = Vector<double>.Count;
|
||||||
double* retPtr = stackalloc double[elements];
|
double* retPtr = stackalloc double[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (double)value[i];
|
retPtr[i] = (double)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<double>(retPtr);
|
return new Vector<double>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5455,17 +5455,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<int> ConvertToInt32(Vector<float> value)
|
public static unsafe Vector<int> ConvertToInt32(Vector<float> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<int>.Count;
|
int elements = Vector<int>.Count;
|
||||||
int* retPtr = stackalloc int[elements];
|
int* retPtr = stackalloc int[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (int)value[i];
|
retPtr[i] = (int)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<int>(retPtr);
|
return new Vector<int>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5477,17 +5477,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<uint> ConvertToUInt32(Vector<float> value)
|
public static unsafe Vector<uint> ConvertToUInt32(Vector<float> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<uint>.Count;
|
int elements = Vector<uint>.Count;
|
||||||
uint* retPtr = stackalloc uint[elements];
|
uint* retPtr = stackalloc uint[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (uint)value[i];
|
retPtr[i] = (uint)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<uint>(retPtr);
|
return new Vector<uint>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5498,17 +5498,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<long> ConvertToInt64(Vector<double> value)
|
public static unsafe Vector<long> ConvertToInt64(Vector<double> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<long>.Count;
|
int elements = Vector<long>.Count;
|
||||||
long* retPtr = stackalloc long[elements];
|
long* retPtr = stackalloc long[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (long)value[i];
|
retPtr[i] = (long)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<long>(retPtr);
|
return new Vector<long>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -5520,17 +5520,17 @@ namespace System.Numerics
|
||||||
[Intrinsic]
|
[Intrinsic]
|
||||||
public static unsafe Vector<ulong> ConvertToUInt64(Vector<double> value)
|
public static unsafe Vector<ulong> ConvertToUInt64(Vector<double> value)
|
||||||
{
|
{
|
||||||
unchecked
|
unchecked
|
||||||
{
|
{
|
||||||
int elements = Vector<ulong>.Count;
|
int elements = Vector<ulong>.Count;
|
||||||
ulong* retPtr = stackalloc ulong[elements];
|
ulong* retPtr = stackalloc ulong[elements];
|
||||||
for (int i = 0; i < elements; i++)
|
for (int i = 0; i < elements; i++)
|
||||||
{
|
{
|
||||||
retPtr[i] = (ulong)value[i];
|
retPtr[i] = (ulong)value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Vector<ulong>(retPtr);
|
return new Vector<ulong>(retPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Same-Size Conversion
|
#endregion Same-Size Conversion
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче