Skip to content

Commit

Permalink
irecv: remove mdspan
Browse files Browse the repository at this point in the history
  • Loading branch information
cwpearson committed Apr 10, 2024
1 parent f211dae commit 8d0fe77
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/KokkosComm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void recv(const ExecSpace &space, RecvView &sv, int src, int tag,
return Impl::recv(space, sv, src, tag, comm);
}

template <KokkosExecutionSpace ExecSpace, ViewOrMdspan RecvView>
template <KokkosExecutionSpace ExecSpace, KokkosView RecvView>
Req irecv(const ExecSpace &space, RecvView &rv, int src, int tag,
MPI_Comm comm) {
return Impl::irecv(space, rv, src, tag, comm);
Expand Down
7 changes: 2 additions & 5 deletions src/impl/KokkosComm_irecv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace KokkosComm::Impl {

template <typename ExecSpace, typename RecvView, typename MpiArgs>
template <KokkosExecutionSpace ExecSpace, KokkosView RecvView, typename MpiArgs>
struct IrecvUnpacker {
IrecvUnpacker(const ExecSpace &space, RecvView &rv, MpiArgs &args)
: space_(space), rv_(rv), args_(args) {}
Expand All @@ -43,10 +43,7 @@ struct IrecvUnpacker {
MpiArgs args_;
};

/* FIXME: If RecvView is a Kokkos view, it can be a const ref
same is true for an mdspan?
*/
template <typename RecvView, typename ExecSpace>
template <KokkosExecutionSpace ExecSpace, KokkosView RecvView>
Req irecv(const ExecSpace &space, RecvView &rv, int src, int tag,
MPI_Comm comm) {
Kokkos::Tools::pushRegion("KokkosComm::Impl::irecv");
Expand Down
2 changes: 1 addition & 1 deletion src/impl/KokkosComm_packer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace KokkosComm::Impl {
namespace Packer {

template <KokkosView View>
template <KokkosView View, typename Packer>
struct MpiArgs {
using packer_type =
Packer; // the type of the packer that produced these arguments
Expand Down
15 changes: 0 additions & 15 deletions unit_tests/test_isendirecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,6 @@
//
//@HEADER

#if KOKKOSCOMM_ENABLE_MDSPAN
#if KOKKOSCOMM_MDSPAN_IN_EXPERIMENTAL
#include <experimental/mdspan>
#define MDSPAN_PREFIX() experimental::
#else
#include <mdspan>
#define MDSPAN_PREFIX()
#endif

using std::MDSPAN_PREFIX() dextents;
using std::MDSPAN_PREFIX() extents;
using std::MDSPAN_PREFIX() layout_stride;
using std::MDSPAN_PREFIX() mdspan;
#endif // KOKKOSCOMM_ENABLE_MDSPAN

#include <gtest/gtest.h>

#include "KokkosComm.hpp"
Expand Down

0 comments on commit 8d0fe77

Please sign in to comment.