Commit 496ebb96 authored by Robert Maynard's avatar Robert Maynard
Browse files

Merge branch 'upstream-diy' into allow_diy_to_build_on_powerpc_clang

* upstream-diy:
  diy 2018-03-06 (56d516fd)
parents 4fd3203b 5dedd3c6
......@@ -40,17 +40,41 @@ namespace mpi
//! Receive `x` from `dest` using `tag` (blocking).
//! If `T` is an `std::vector<...>`, `recv` will resize it to fit exactly the sent number of values.
template<class T>
status recv(int source, int tag, T& x) const { return detail::recv<T>()(comm_, source, tag, x); }
template <class T>
status recv(int source, int tag, T &x) const
{
#if defined(DIY_NO_MPI) && defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ < 8 // CUDA 7.5 workaround
(void) source; (void)tag; (void)x;
DIY_UNSUPPORTED_MPI_CALL(MPI_Recv);
#else
return detail::recv<T>{}(comm_, source, tag, x);
#endif
}
//! Non-blocking version of `send()`.
template<class T>
request isend(int dest, int tag, const T& x) const { return detail::isend<T>()(comm_, dest, tag, x); }
template <class T>
request isend(int dest, int tag, const T &x) const
{
#if defined(DIY_NO_MPI) && defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ < 8 // CUDA 7.5 workaround
(void) dest; (void)tag; (void)x;
DIY_UNSUPPORTED_MPI_CALL(MPI_Send);
#else
return detail::isend<T>{}(comm_, dest, tag, x);
#endif
}
//! Non-blocking version of `recv()`.
//! If `T` is an `std::vector<...>`, its size must be big enough to accommodate the sent values.
template<class T>
request irecv(int source, int tag, T& x) const { return detail::irecv<T>()(comm_, source, tag, x); }
template <class T>
request irecv(int source, int tag, T &x) const
{
#if defined(DIY_NO_MPI) && defined(__CUDACC_VER_MAJOR__) && __CUDACC_VER_MAJOR__ < 8 // CUDA 7.5 workaround
(void)source; (void)tag; (void)x;
DIY_UNSUPPORTED_MPI_CALL(MPI_Irecv);
#else
return detail::irecv<T>()(comm_, source, tag, x);
#endif
}
//! probe
inline
......
......@@ -89,7 +89,8 @@ namespace diy
template<class T>
struct Serialization: public detail::Default
{
#if defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 5)
#if (defined(__clang__) && !defined(__ppc64__)) || (defined(__GNUC__) && __GNUC__ >= 5)
//exempt power-pc clang variants due to: https://gitlab.kitware.com/vtk/vtk-m/issues/201
static_assert(std::is_trivially_copyable<T>::value, "Default serialization works only for trivially copyable types");
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment