Open
Description
COMMUNITY-DRIVEN WORK TRACKING ISSUE
Tracks implementation of the SIMD Math Proposal.
It is being implemented in the feature/math-simd
.
Tasks
API implementation
-
Create
-
Load
-
Add
-
Subtract
-
Multiply
-
Divide
-
Abs
- Constants
-
And
-
Or
-
Xor
-
Not
-
AllBitsSet
-
IsHardwareAccelerated
-
Equal
-
NotEqual
-
GreaterThan
-
GreaterOrEqual
-
LessThan
-
LessThanOrEqual
-
Min
-
Max
-
IsFinite
-
IsInfinity
-
IsNaN
-
IsNegative
-
IsNegativeInfinity
-
IsNormal
-
IsPositiveInfinity
-
Sign
Arithmetics
-
Negate
Special
-
As
-
IEEERemainder
Trigonometry
-
Acos
-
Acosh
-
Asin
-
Asinh
-
Atan2
-
Atan
-
Atanh
-
Cos
-
Cosh
-
Sin
-
Sinh
-
Tan
-
Tanh
Powers
-
Exp
-
Cbrt
-
Sqrt
-
Pow
-
Log10
-
Log
-
Log
of two args -
Reciprocal
Rounding
-
Floor
-
Ceiling
-
Round
-
Round
of two args -
Truncate
Bit operations
-
ShiftLeft
-
ShiftRight
-
RotateLeft
-
RotateRight
Tests
For all bitnesses x for all types
- 4 arithmetic operators
-
Less
/Greater
Than
(OrEqual
) -
Min
,Max
- (
Not
)Equal
- Bitwise operations
- State of number
Other
-
Create
,Load
,Store
- Regular trigonometry
- Hyperbolic trigonometry
- Inverse trigonometry
- Inverse hyperbolic trigonometry
- Power
- Rounding
- Bit operations
Benchmarks
For all bitnesses x for all types
- 4 arithmetic operators
-
Less
/Greater
Than
(OrEqual
) -
Min
,Max
- (
Not
)Equal
- State of number
- Bitwise operations
-
Abs
Other
-
Create
,Load
,Store
- Regular trigonometry
- Hyperbolic trigonometry
- Inverse trigonometry
- Inverse hyperbolic trigonometry
- Power
- Rounding
- Bit operations
TODOs
- Make fallback to 128-bit if 256-bit is not supported
- Use naive operations for 8-byte values on simd64
- The random feeder should be either static or without seed or anything, otherwise it fills both vectors with the same data
Other
-
Divide
for integers to be done in a more efficient way link -
Multiply
for bytes to be done in a more efficient way link - Use intrinsic ShiftRight/ShiftLeft once proposal is impl
- Remove unmanaged constraints where possible
- Relax constraints to
struct
where possible - Hardware accelerated comparison operations for
long
andulong
Far TODOs
- Propose & add support for Simd512 (that requires runtime support)
To discuss
-
AllBitsSet
API for Scalar
Other
-
MaxValueOver2
API for Simd and Scalar -
IsHardwareAccelerated
should be&& IsSupported
? OtherwiseSimd128<MyAwesomeType>.IsHardwareAccelerated
returns true on net5 on avx machine -
Math.Abs
throws onMath.Abs(int.MinValue)
. We can keep it, or we can have a faster version without this check -
CopySign
API
Metadata
Metadata
Assignees
Type
Projects
Status
In Progress