-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Numericshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
This is a proposal of the ideas discussed in issue #20147.
There are a few SIMD operations on System.Numerics.Vector<T> missing that are required to implement vectorized versions of log, exp, sin, and cos.
There is a C implementation of these methods using AVX intrinsics here, which I have translated into a C# implemention using Vector<T> here. In the implementation, I have added fake versions of the missing intrinsics.
@mellinoe suggested creating two separate issues for the missing methods (the other issue is dotnet/corefx#16835), so the purpose of this issue is to propose the addition of the following methods:
[Updated proposal with comments below]
namespace System.Numerics
{
public static class Vector
{
public static Vector<float> Floor(Vector<float> value);
public static Vector<double> Floor(Vector<double> value);
public static Vector<float> Ceiling(Vector<float> value);
public static Vector<double> Ceiling(Vector<double> value);
}
}which map directly to the following AVX intrinsics:
_mm256_floor_ps
_mm256_floor_pd
_mm256_ceil_ps
_mm256_ceil_pd
respectively.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Numericshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors