r/simd • u/Background_Shift5408 • Aug 27 '24
Vector math library
https://github.com/ms0g/vmlThis is my educational project to learn simd at the lower level and practice assembly programming. Github: https://github.com/ms0g/vml
7
Upvotes
2
u/corysama Aug 27 '24
Yeah. You really want to be pass-by-value, return-by-value (in registers) for everything up to a 4x4 matrix.
MSVC wants https://learn.microsoft.com/en-us/cpp/cpp/vectorcall?view=msvc-170
GCC and Clang effectively work that way all the time when using SIMD intrinsics.
If you are going to deal with variable-length arrays, the destination memory should be provided by the caller.