-
Notifications
You must be signed in to change notification settings - Fork 10
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 irecv wrapper in KokkosComm namespace #76
Conversation
I'd like this too for #53. |
Also needs |
src/KokkosComm.hpp
Outdated
@@ -33,6 +34,11 @@ Req isend(const ExecSpace &space, const SendView &sv, int dest, int tag, MPI_Com | |||
return Impl::isend<SendMode>(space, sv, dest, tag, comm); | |||
} | |||
|
|||
template <KokkosView RecvView> | |||
void irecv(RecvView &sv, int src, int tag, MPI_Comm comm, MPI_Request req) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use sv
for the receiving view? I think it was previously clearer with rv
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to more closely match the recv
wrapper in the file:
template <KokkosExecutionSpace ExecSpace, KokkosView RecvView>
void recv(const ExecSpace &space, RecvView &sv, int src, int tag, MPI_Comm comm) {
return Impl::recv(space, sv, src, tag, comm);
}
I agree it is clearer, I can change it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can change the recv
wrapper to RecvView &rv
as well then 👍
As the |
template <CommMode SendMode = CommMode::Default, KokkosExecutionSpace ExecSpace, KokkosView SendView> | ||
void send(const ExecSpace &space, const SendView &sv, int dest, int tag, MPI_Comm comm) { | ||
return Impl::send<SendMode>(space, sv, dest, tag, comm); | ||
} | ||
|
||
template <KokkosExecutionSpace ExecSpace, KokkosView RecvView> | ||
void recv(const ExecSpace &space, RecvView &sv, int src, int tag, MPI_Comm comm) { | ||
return Impl::recv(space, sv, src, tag, comm); | ||
void recv(const ExecSpace &space, RecvView &rv, int src, int tag, MPI_Comm comm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If all we do right now is just passing things through, can't we simply do
namespace KokkosComm {
using Impl::recv;
using Impl::alltoall;
}
Edit: was too late with the review.
Currently, irecv is only available in the Impl namespace.