Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
eaa08e0
Adding the Vector512 and Vector512<T> types
tannergooding Oct 4, 2022
03dd856
Support properly packing Vector512<T>
tannergooding Oct 4, 2022
8d7791e
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Oct 26, 2022
3a80f29
Responding to PR feedback and ensure Vector512 is treated as an HFA f…
tannergooding Oct 28, 2022
0157044
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Oct 31, 2022
012084a
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Nov 4, 2022
13dc1df
Bring Vector512 inline with the new Vector64/128/256 APIs
tannergooding Nov 4, 2022
7d23e27
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Nov 11, 2022
5e64c5f
Adding support for generating the Vector512 tests
tannergooding Oct 26, 2022
6ed6758
Generate the Vector512 tests
tannergooding Nov 11, 2022
0525759
Ensure the ref assembly is up to date
tannergooding Nov 11, 2022
35f01e1
Fixing a couple JIT asserts
tannergooding Nov 11, 2022
bc8b497
Fixing tests to pass the right number of constructor parameters
tannergooding Nov 11, 2022
437134a
Ensure the HWIntrinsic test templates support 64-byte alignment
tannergooding Nov 12, 2022
b8f0a16
Ensure the vector Dot tests correctly sum using pairs
tannergooding Nov 13, 2022
783bb1f
Ensure the Dot test computes the result pairs correctly
tannergooding Nov 14, 2022
ac01ed5
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Nov 16, 2022
ab3afe9
Simplify the alignment check to avoid future churn
tannergooding Nov 16, 2022
6d50c9a
Don't churn the Vector64/128/256 tests on the Vector512 PR
tannergooding Nov 16, 2022
dc43d8d
Do update the Dot tests to have the updated validation
tannergooding Nov 16, 2022
1124f4e
Fix Vector128 divide by scalar
fanyang-mono Nov 23, 2022
67abfd0
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Dec 11, 2022
6377be7
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Dec 19, 2022
3914d6d
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Jan 3, 2023
60e6826
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Jan 5, 2023
c72c3e5
Ensure field layout tests exist for Vector256 and Vector512
tannergooding Jan 5, 2023
ec270ad
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Jan 9, 2023
ad7e03d
Updating the R2R version from 8.0 to 9.0
tannergooding Jan 9, 2023
b6b62fd
Ensure Vector512 tests are disabled in the same place as the Vector64…
tannergooding Jan 9, 2023
f2e95d9
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Jan 10, 2023
3457948
Remove a stray .
tannergooding Jan 10, 2023
1b0adc0
Fixing the NativeAOT field layout tests
tannergooding Jan 7, 2023
6be8dec
Update an addition location where the R2R version is defined
tannergooding Jan 10, 2023
8f001fa
Merge remote-tracking branch 'dotnet/main' into vector512
tannergooding Jan 10, 2023
2527bcd
Disable Vector512 tests for llvmfullaot due to https://github.com/dot…
tannergooding Jan 10, 2023
d1fc03d
Increase the value of ngsharedvt-trampolines
fanyang-mono Jan 11, 2023
399e4c5
Move various HWIntrinsics to outerloop for unaccelerated platforms
tannergooding Jan 11, 2023
9bb141c
Ensure the HardwareIntrinsics tests are being filtered to outerloop w…
tannergooding Jan 11, 2023
6b049e1
Merge branch 'dotnet:main' into vector512
tannergooding Jan 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,10 @@ public T this[int index]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector128<T> operator /(Vector128<T> left, T right)
{
Unsafe.SkipInit(out Vector128<T> result);

for (int index = 0; index < Count; index++)
{
T value = Scalar<T>.Divide(left.GetElementUnsafe(index), right);
result.SetElementUnsafe(index, value);
}

return result;
return Vector128.Create(
left._lower / right,
left._upper / right
);
}

/// <summary>Compares two vectors to determine if all elements are equal.</summary>
Expand Down Expand Up @@ -258,15 +253,10 @@ public T this[int index]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector128<T> operator <<(Vector128<T> value, int shiftCount)
{
Unsafe.SkipInit(out Vector128<T> result);

for (int index = 0; index < Count; index++)
{
T element = Scalar<T>.ShiftLeft(value.GetElementUnsafe(index), shiftCount);
result.SetElementUnsafe(index, element);
}

return result;
return Vector128.Create(
value._lower << shiftCount,
value._upper << shiftCount
);
}

/// <summary>Multiplies two vectors to compute their element-wise product.</summary>
Expand Down Expand Up @@ -330,15 +320,10 @@ public T this[int index]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector128<T> operator >>(Vector128<T> value, int shiftCount)
{
Unsafe.SkipInit(out Vector128<T> result);

for (int index = 0; index < Count; index++)
{
T element = Scalar<T>.ShiftRightArithmetic(value.GetElementUnsafe(index), shiftCount);
result.SetElementUnsafe(index, element);
}

return result;
return Vector128.Create(
value._lower >> shiftCount,
value._upper >> shiftCount
);
}

/// <summary>Subtracts two vectors to compute their difference.</summary>
Expand Down Expand Up @@ -390,15 +375,10 @@ public static Vector128<T> operator >>(Vector128<T> value, int shiftCount)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector128<T> operator >>>(Vector128<T> value, int shiftCount)
{
Unsafe.SkipInit(out Vector128<T> result);

for (int index = 0; index < Count; index++)
{
T element = Scalar<T>.ShiftRightLogical(value.GetElementUnsafe(index), shiftCount);
result.SetElementUnsafe(index, element);
}

return result;
return Vector128.Create(
value._lower >>> shiftCount,
value._upper >>> shiftCount
);
}

/// <summary>Determines whether the specified object is equal to the current instance.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,7 @@ public static bool TryCopyTo<T>(this Vector256<T> vector, Span<T> destination)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static (Vector256<ulong> Lower, Vector256<ulong> Upper) Widen(Vector256<uint> source) => (WidenLower(source), WidenUpper(source));

/// <summary>Widens the lower half of a <see cref="Vector128{Byte}" /> into a <see cref="Vector128{UInt16} " />.</summary>
/// <summary>Widens the lower half of a <see cref="Vector256{Byte}" /> into a <see cref="Vector256{UInt16} " />.</summary>
/// <param name="source">The vector whose elements are to be widened.</param>
/// <returns>A vector that contain the widened lower half of <paramref name="source" />.</returns>
[Intrinsic]
Expand All @@ -2849,7 +2849,7 @@ public static Vector256<ushort> WidenLower(Vector256<byte> source)
);
}

/// <summary>Widens the lower half of a <see cref="Vector128{Int16}" /> into a <see cref="Vector128{Int32} " />.</summary>
/// <summary>Widens the lower half of a <see cref="Vector256{Int16}" /> into a <see cref="Vector256{Int32} " />.</summary>
/// <param name="source">The vector whose elements are to be widened.</param>
/// <returns>A vector that contain the widened lower half of <paramref name="source" />.</returns>
[Intrinsic]
Expand All @@ -2864,7 +2864,7 @@ public static Vector256<int> WidenLower(Vector256<short> source)
);
}

/// <summary>Widens the lower half of a <see cref="Vector128{Int32}" /> into a <see cref="Vector128{Int64} " />.</summary>
/// <summary>Widens the lower half of a <see cref="Vector256{Int32}" /> into a <see cref="Vector256{Int64} " />.</summary>
/// <param name="source">The vector whose elements are to be widened.</param>
/// <returns>A vector that contain the widened lower half of <paramref name="source" />.</returns>
[Intrinsic]
Expand All @@ -2879,7 +2879,7 @@ public static Vector256<long> WidenLower(Vector256<int> source)
);
}

/// <summary>Widens the lower half of a <see cref="Vector128{SByte}" /> into a <see cref="Vector128{Int16} " />.</summary>
/// <summary>Widens the lower half of a <see cref="Vector256{SByte}" /> into a <see cref="Vector256{Int16} " />.</summary>
/// <param name="source">The vector whose elements are to be widened.</param>
/// <returns>A vector that contain the widened lower half of <paramref name="source" />.</returns>
[Intrinsic]
Expand All @@ -2894,7 +2894,7 @@ public static Vector256<short> WidenLower(Vector256<sbyte> source)
Vector128.WidenUpper(lower)
);
}
/// <summary>Widens the lower half of a <see cref="Vector128{Single}" /> into a <see cref="Vector128{Double} " />.</summary>
/// <summary>Widens the lower half of a <see cref="Vector256{Single}" /> into a <see cref="Vector256{Double} " />.</summary>
/// <param name="source">The vector whose elements are to be widened.</param>
/// <returns>A vector that contain the widened lower half of <paramref name="source" />.</returns>
[Intrinsic]
Expand All @@ -2909,7 +2909,7 @@ public static Vector256<double> WidenLower(Vector256<float> source)
);
}

/// <summary>Widens the lower half of a <see cref="Vector128{UInt16}" /> into a <see cref="Vector128{UInt32} " />.</summary>
/// <summary>Widens the lower half of a <see cref="Vector256{UInt16}" /> into a <see cref="Vector256{UInt32} " />.</summary>
/// <param name="source">The vector whose elements are to be widened.</param>
/// <returns>A vector that contain the widened lower half of <paramref name="source" />.</returns>
[Intrinsic]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
Expand Down Expand Up @@ -197,15 +196,10 @@ public T this[int index]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector256<T> operator /(Vector256<T> left, T right)
{
Unsafe.SkipInit(out Vector256<T> result);

for (int index = 0; index < Count; index++)
{
T value = Scalar<T>.Divide(left.GetElementUnsafe(index), right);
result.SetElementUnsafe(index, value);
}

return result;
return Vector256.Create(
left._lower / right,
left._upper / right
);
}

/// <summary>Compares two vectors to determine if all elements are equal.</summary>
Expand Down Expand Up @@ -257,15 +251,10 @@ public T this[int index]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector256<T> operator <<(Vector256<T> value, int shiftCount)
{
Unsafe.SkipInit(out Vector256<T> result);

for (int index = 0; index < Count; index++)
{
T element = Scalar<T>.ShiftLeft(value.GetElementUnsafe(index), shiftCount);
result.SetElementUnsafe(index, element);
}

return result;
return Vector256.Create(
value._lower << shiftCount,
value._upper << shiftCount
);
}

/// <summary>Multiplies two vectors to compute their element-wise product.</summary>
Expand Down Expand Up @@ -329,15 +318,10 @@ public T this[int index]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector256<T> operator >>(Vector256<T> value, int shiftCount)
{
Unsafe.SkipInit(out Vector256<T> result);

for (int index = 0; index < Count; index++)
{
T element = Scalar<T>.ShiftRightArithmetic(value.GetElementUnsafe(index), shiftCount);
result.SetElementUnsafe(index, element);
}

return result;
return Vector256.Create(
value._lower >> shiftCount,
value._upper >> shiftCount
);
}

/// <summary>Subtracts two vectors to compute their difference.</summary>
Expand Down Expand Up @@ -389,15 +373,10 @@ public static Vector256<T> operator >>(Vector256<T> value, int shiftCount)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector256<T> operator >>>(Vector256<T> value, int shiftCount)
{
Unsafe.SkipInit(out Vector256<T> result);

for (int index = 0; index < Count; index++)
{
T element = Scalar<T>.ShiftRightLogical(value.GetElementUnsafe(index), shiftCount);
result.SetElementUnsafe(index, element);
}

return result;
return Vector256.Create(
value._lower >>> shiftCount,
value._upper >>> shiftCount
);
}

/// <summary>Determines whether the specified object is equal to the current instance.</summary>
Expand Down
Loading