MathSharp icon indicating copy to clipboard operation
MathSharp copied to clipboard

[PROPOSAL] Add VectorX structs mirroring the System.Numerics Vectors

Open ghost opened this issue 5 years ago • 3 comments

Numerics Vectors only support floats, we could re-create them for Doubles, ints and longs (and possibly other types?). This would allow users to take advantage of vector instructions without having to do loads and saves themselves.

ghost avatar Sep 22 '19 09:09 ghost

This seems a good idea, but I would keep explicit loads and stores because they have a cost

john-h-k avatar Sep 24 '19 08:09 john-h-k

Agreed, the JIT probably optimizes this away with the built-in types but we can't count on it doing the same thing in this case (especially since we'd be explicitly calling the SSE/AVX Load/Store functions).

ghost avatar Sep 25 '19 11:09 ghost

I can/will/might do these, but they would just be a storage type, with proper ctors, ToString/GetHashCode/IEquatable<T>. No maths on them

john-h-k avatar Oct 05 '19 19:10 john-h-k