42 #ifndef KOKKOS_TEUCHOS_COMM_ADAPTERS_UQ_PCE_HPP
43 #define KOKKOS_TEUCHOS_COMM_ADAPTERS_UQ_PCE_HPP
46 #if defined(HAVE_STOKHOS_TEUCHOSKOKKOSCOMM)
50 #include "Kokkos_TeuchosCommAdapters.hpp"
59 template<
typename Ordinal,
typename D,
typename ... P>
61 send (
const Kokkos::View<D,P...>& sendBuffer,
65 const Comm<Ordinal>& comm)
67 typedef Kokkos::View<
D,P...> view_type;
70 flat_array_type array = sendBuffer;
72 send(array, array_count, destRank, tag, comm);
76 template<
typename Ordinal,
typename D,
typename ... P>
78 ssend (
const Kokkos::View<D,P...>& sendBuffer,
82 const Comm<Ordinal>& comm)
84 typedef Kokkos::View<
D,P...> view_type;
87 flat_array_type array = sendBuffer;
89 ssend(array, array_count, destRank, tag, comm);
93 template<
typename Ordinal,
typename D,
typename ... P>
95 readySend (
const Kokkos::View<D,P...>& sendBuffer,
99 const Comm<Ordinal>& comm)
101 typedef Kokkos::View<
D,P...> view_type;
104 flat_array_type array = sendBuffer;
106 readySend(array, array_count, destRank, tag, comm);
110 template<
typename Ordinal,
typename D,
typename ... P>
111 typename std::enable_if<
Kokkos::is_view_uq_pce< Kokkos::View<
D,P...> >::value, RCP<CommRequest<Ordinal> > >::type
112 isend (
const Kokkos::View<D,P...>& sendBuffer,
115 const Comm<Ordinal>& comm)
117 typedef Kokkos::View<
D,P...> view_type;
120 flat_array_type array = sendBuffer;
121 return isend(array, destRank, tag, comm);
125 template<
typename Ordinal,
typename D,
typename ... P>
126 typename std::enable_if<
Kokkos::is_view_uq_pce< Kokkos::View<
D,P...> >::value, RCP<CommRequest<Ordinal> > >::type
127 ireceive (
const Kokkos::View<D,P...>& recvBuffer,
128 const int sourceRank,
130 const Comm<Ordinal>& comm)
132 typedef Kokkos::View<
D,P...> view_type;
135 flat_array_type array = recvBuffer;
136 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)