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

Add apply function for tuple #105

Merged
merged 5 commits into from
Mar 31, 2022
Merged

Conversation

adayton1
Copy link
Member

No description provided.

@trws
Copy link
Member

trws commented Mar 30, 2022

This looks good, but how does it differ from invoke? Actually glancing at it, the existing invoke may be missing a forward where one would be appropriate, but perhaps that should be rectified and apply be an alias to invoke?

@adayton1
Copy link
Member Author

I guess it is the same thing as camp::invoke. Initially I was looking for a camp equivalent to std::apply (https://en.cppreference.com/w/cpp/utility/apply) since std::invoke and std::invoke_r take a parameter pack instead of a tuple. I could certainly make camp::apply an alias to camp::invoke and add the appropriate forwarding in camp::invoke.

@adayton1
Copy link
Member Author

@trws, I made apply an alias to invoke and added forwarding to invoke_with_order. Let me know what you think.

@trws
Copy link
Member

trws commented Mar 31, 2022

Sounds good to me. I think when we re-work the API for RAJA and CAMP on the way to 1.0 this is something to fix too, make apply the one for this and use invoke for its now established purpose.

@trws trws merged commit 7fa4111 into LLNL:main Mar 31, 2022
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.

2 participants