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

Added a way to specify if the MPI operation used in global scans is commutative. #23

Merged
merged 2 commits into from
Mar 1, 2020

Conversation

asrivast28
Copy link
Contributor

Problem: There was no way to specify if a custom operation used in global_scan* is noncommutative.
Solution: Added a parameter to the global_scan* functions (only the ones that accept a function as a custom operation) for specifying if the operation is commutative.

PS: This is possibly a hacky solution for the problem. In my opinion, a possibly better way to handle this is to add a variation of global_scan* which takes mxx::custom_op as an argument. The user can then create the custom_op for noncommutative operations and provide that as an argument to the global_scan* operations. I think this would be closer to the way MPI interface handles this.

I have gone with the least intrusive solution for now but can implement the aforementioned solution if it seems more sensible.

include/mxx/reduction.hpp Outdated Show resolved Hide resolved
@asrivast28
Copy link
Contributor Author

Added overloads for global_scan* functions as per @patflick review #23 (comment)

@patflick patflick merged commit 84c9628 into patflick:master Mar 1, 2020
@asrivast28 asrivast28 deleted the NoncommutativeScan branch March 3, 2020 19:08
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

Successfully merging this pull request may close these issues.

None yet

2 participants