-
-
Notifications
You must be signed in to change notification settings - Fork 441
Open
Labels
area-MathsfeatureNew feature.New feature.help wantedExtra attention is neededExtra attention is neededtracking issue / epic
Milestone
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 -
Logof two args -
Reciprocal
Rounding
-
Floor -
Ceiling -
Round -
Roundof two args -
Truncate
Bit operations
-
ShiftLeft -
ShiftRight -
RotateLeft -
RotateRight
Tests
For all bitnesses x for all types
- 4 arithmetic operators
-
Less/GreaterThan(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/GreaterThan(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
-
Dividefor integers to be done in a more efficient way link -
Multiplyfor 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
structwhere possible - Hardware accelerated comparison operations for
longandulong
Far TODOs
- Propose & add support for Simd512 (that requires runtime support)
To discuss
-
AllBitsSetAPI for Scalar
Other
-
MaxValueOver2API for Simd and Scalar -
IsHardwareAcceleratedshould be&& IsSupported? OtherwiseSimd128<MyAwesomeType>.IsHardwareAcceleratedreturns true on net5 on avx machine -
Math.Absthrows onMath.Abs(int.MinValue). We can keep it, or we can have a faster version without this check -
CopySignAPI
Metadata
Metadata
Assignees
Labels
area-MathsfeatureNew feature.New feature.help wantedExtra attention is neededExtra attention is neededtracking issue / epic
Type
Projects
Status
In Progress