Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Vector*.IsHardwareAccelerated to be recursive #69578

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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 @@ -25,6 +25,13 @@ static GenericVectorTests()
dummy = System.Numerics.Vector<float>.One;
}

[Fact]
public unsafe void IsHardwareAcceleratedTest()
{
var methodInfo = typeof(Vector).GetMethod("get_IsHardwareAccelerated");
tannergooding marked this conversation as resolved.
Show resolved Hide resolved
Assert.Equal(Vector.IsHardwareAccelerated, methodInfo.Invoke(null, null));
}

#region Constructor Tests

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static partial class Vector
public static bool IsHardwareAccelerated
{
[Intrinsic]
get => false;
get => IsHardwareAccelerated;
}

/// <summary>Computes the absolute value of each element in a vector.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static class Vector128
public static bool IsHardwareAccelerated
{
[Intrinsic]
get => false;
get => IsHardwareAccelerated;
}

/// <summary>Computes the absolute value of each element in a vector.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static class Vector256
public static bool IsHardwareAccelerated
{
[Intrinsic]
get => false;
get => IsHardwareAccelerated;
}

/// <summary>Computes the absolute value of each element in a vector.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class Vector64
public static bool IsHardwareAccelerated
{
[Intrinsic]
get => false;
get => IsHardwareAccelerated;
}

/// <summary>Computes the absolute value of each element in a vector.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector128Tests
{
[Fact]
public unsafe void Vector128IsHardwareAcceleratedTest()
{
var methodInfo = typeof(Vector128).GetMethod("get_IsHardwareAccelerated");
tannergooding marked this conversation as resolved.
Show resolved Hide resolved
Assert.Equal(Vector128.IsHardwareAccelerated, methodInfo.Invoke(null, null));
}

[Fact]
public unsafe void Vector128ByteExtractMostSignificantBitsTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector256Tests
{
[Fact]
public unsafe void Vector256IsHardwareAcceleratedTest()
{
var methodInfo = typeof(Vector256).GetMethod("get_IsHardwareAccelerated");
tannergooding marked this conversation as resolved.
Show resolved Hide resolved
Assert.Equal(Vector256.IsHardwareAccelerated, methodInfo.Invoke(null, null));
}

[Fact]
public unsafe void Vector256ByteExtractMostSignificantBitsTest()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ namespace System.Runtime.Intrinsics.Tests.Vectors
{
public sealed class Vector64Tests
{
[Fact]
public unsafe void Vector64IsHardwareAcceleratedTest()
{
var methodInfo = typeof(Vector64).GetMethod("get_IsHardwareAccelerated");
tannergooding marked this conversation as resolved.
Show resolved Hide resolved
Assert.Equal(Vector64.IsHardwareAccelerated, methodInfo.Invoke(null, null));
}

[Fact]
public unsafe void Vector64ByteExtractMostSignificantBitsTest()
{
Expand Down