10 #ifndef KOKKOS_TEUCHOS_COMM_ADAPTERS_MP_VECTOR_HPP
11 #define KOKKOS_TEUCHOS_COMM_ADAPTERS_MP_VECTOR_HPP
14 #if defined(HAVE_STOKHOS_TEUCHOSKOKKOSCOMM)
18 #include "Kokkos_TeuchosCommAdapters.hpp"
27 template<
typename Ordinal,
typename D,
typename ... P>
29 send (
const Kokkos::View<D,P...>& sendBuffer,
33 const Comm<Ordinal>& comm)
35 typedef Kokkos::View<
D,P...> view_type;
38 flat_array_type array = sendBuffer;
40 send(array, array_count, destRank, tag, comm);
44 template<
typename Ordinal,
typename D,
typename ... P>
46 ssend (
const Kokkos::View<D,P...>& sendBuffer,
50 const Comm<Ordinal>& comm)
52 typedef Kokkos::View<
D,P...> view_type;
55 flat_array_type array = sendBuffer;
57 ssend(array, array_count, destRank, tag, comm);
61 template<
typename Ordinal,
typename D,
typename ... P>
63 readySend (
const Kokkos::View<D,P...>& sendBuffer,
67 const Comm<Ordinal>& comm)
69 typedef Kokkos::View<
D,P...> view_type;
72 flat_array_type array = sendBuffer;
74 readySend(array, array_count, destRank, tag, comm);
78 template<
typename Ordinal,
typename D,
typename ... P>
80 isend (
const Kokkos::View<D,P...>& sendBuffer,
83 const Comm<Ordinal>& comm)
85 typedef Kokkos::View<
D,P...> view_type;
88 flat_array_type array = sendBuffer;
89 return isend(array, destRank, tag, comm);
93 template<
typename Ordinal,
typename D,
typename ... P>
95 ireceive (
const Kokkos::View<D,P...>& recvBuffer,
98 const Comm<Ordinal>& comm)
100 typedef Kokkos::View<
D,P...> view_type;
103 flat_array_type array = recvBuffer;
104 return ireceive(array, sourceRank, tag, comm);
KOKKOS_INLINE_FUNCTION constexpr std::enable_if< is_view_uq_pce< View< T, P...> >::value, unsigned >::type dimension_scalar(const View< T, P...> &view)
void send(const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
RCP< CommRequest< Ordinal > > ireceive(const ArrayRCP< Packet > &recvBuffer, const int sourceRank, const int tag, const Comm< Ordinal > &comm)
RCP< Teuchos::CommRequest< int > > isend(const ArrayRCP< const double > &sendBuffer, const int destRank, const int tag, const Comm< int > &comm)
void ssend(const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)
void readySend(const Packet sendBuffer[], const Ordinal count, const int destRank, const int tag, const Comm< Ordinal > &comm)