Skip to content

scalar_prod implementation #504

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

Closed
sebasv opened this issue Oct 19, 2018 · 3 comments
Closed

scalar_prod implementation #504

sebasv opened this issue Oct 19, 2018 · 3 comments

Comments

@sebasv
Copy link
Contributor

sebasv commented Oct 19, 2018

I am missing a scalar_prod function. on ArrayBase. This seems straightforward to implement (almost blindly copy/paste scalar_sum), so I will be submitting a pull request. I am not familiar enough with computer engineering to say if an unrolled_prod is a valuable addition as well, so I will just include it in the PR awaiting feedback from someone with more background!

@jturner314
Copy link
Member

I am not familiar enough with computer engineering to say if an unrolled_prod is a valuable addition as well

If you're interested, this is a pretty good article for background, even though it's talking about C++ with the MS compiler instead of Rust with LLVM. Basically, in order to allow the compiler to perform the sum/product using SIMD even with strict floating-point behavior, it's helpful to explicitly unroll and reorder the sum/product manually.

@sebasv
Copy link
Contributor Author

sebasv commented Oct 23, 2018

That seems like a very nice read, thank you!

@jturner314
Copy link
Member

Implemented in #505.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants