-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
SIMD Math tracking issue #666
Comments
IdeasSinh / CoshThose two have similar formulas:
So we can have Sinh/Cosh method Speaking of implementation, we have var ex = Simd.Exp(x);
var exm = Simd.Reciprocal(ex);
var multiplier = Simd.Create(0.5);
var sinh = Simd.Multiply(Simd.Subtract(ex, exm), multiplier);
var cosh = Simd.Multiply(Simd.Add(ex, exm), multiplier);
return (sinh, cosh); Exp
Min/Max for longsvar compared = LessThan(left, right);
var antiCompared = GreaterThanOrEqual(left, right);
var withOnes = And(compared, Vector.Create(1));
var antiWithOnes = And(compared, Vector.Create(1));
var res = Or(Multiply(withOnes, left), Multiply(antiWithOnes, right)); State of number
|
Should verify that for Store (and other void returning methods) the nested method trick actually works. |
Future: Look at checking for IsHardwareAccelerated before calling down into other methods, don't want to ie call Not(LessThen(...)) if it's not hardware accelerated, because it means two loops with non-hardware accelerated Loads/Stores |
Future: Improve IsNegative check by checking for bit instead of doing a full blown compare |
Important: Notes from working group meeting |
COMMUNITY-DRIVEN WORK TRACKING ISSUE
Tracks implementation of the SIMD Math Proposal.
It is being implemented in the
feature/math-simd
.Tasks
API implementation
#665 (generator)
Create
Load
Add
Subtract
Multiply
Divide
Abs
And
Or
Xor
Not
AllBitsSet
IsHardwareAccelerated
#670
Equal
NotEqual
GreaterThan
GreaterOrEqual
LessThan
LessThanOrEqual
Min
Max
#684
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 argsReciprocal
Rounding
Floor
Ceiling
Round
Round
of two argsTruncate
Bit operations
ShiftLeft
ShiftRight
RotateLeft
RotateRight
Tests
For all bitnesses x for all types
#670
Less
/Greater
Than
(OrEqual
)Min
,Max
Not
)Equal
#684
Other
Create
,Load
,Store
Benchmarks
For all bitnesses x for all types
#670
Less
/Greater
Than
(OrEqual
)Min
,Max
Not
)Equal
#684
Abs
Other
Create
,Load
,Store
TODOs
#670
#684
Other
Divide
for integers to be done in a more efficient way linkMultiply
for bytes to be done in a more efficient way linkstruct
where possiblelong
andulong
Far TODOs
To discuss
#678
AllBitsSet
API for Scalar#690
Other
MaxValueOver2
API for Simd and ScalarIsHardwareAccelerated
should be&& IsSupported
? OtherwiseSimd128<MyAwesomeType>.IsHardwareAccelerated
returns true on net5 on avx machineMath.Abs
throws onMath.Abs(int.MinValue)
. We can keep it, or we can have a faster version without this checkCopySign
APIThe text was updated successfully, but these errors were encountered: