-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Numerics
Milestone
Description
Updated Proposal
Original Proposal
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 #20509), so the purpose of this issue is to propose the addition of the following methods:
public static Vector<short> ShiftLeft(Vector<short> x, int n)
public static Vector<int> ShiftLeft(Vector<int> x, int n)
public static Vector<long> ShiftLeft(Vector<long> x, int n)
public static Vector<short> ShiftRight(Vector<short> x, int n)
public static Vector<int> ShiftRight(Vector<int> x, int n)
public static Vector<long> ShiftRight(Vector<long> x, int n)
which map directly to the following AVX2 intrinsics:
_mm256_slli_epi16
_mm256_slli_epi32
_mm256_slli_epi64
_mm256_srli_epi16
_mm256_srli_epi32
_mm256_srli_epi64
respectively.
HFadeel, adamsitnik, itsamelambda, 4creators, pebezo and 5 more
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.Numerics