Skip to content
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

Horizontal reductions with scalar initializer #66

Open
edanor opened this issue May 24, 2017 · 0 comments
Open

Horizontal reductions with scalar initializer #66

edanor opened this issue May 24, 2017 · 0 comments

Comments

@edanor
Copy link
Owner

edanor commented May 24, 2017

All reduction operations should also have a version with a scalar initializer. These operations are necessary to improve the programmability. For example to perform a hoirzontal reduction with a scalar value, the user has to write:

SIMDVec<float, 4> vec(...);
float init_value = ...;
float max_value = std::max(vec.hmax(), init_value);

With the scalar initializers one could just write:

float max_value = vec.hmax(init_value);

I've already extended the interface with HMAXS/MHMAXS, but the changes have to be propagated to all plugins and other reduction operations.

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

No branches or pull requests

1 participant