Merge topic 'allow_diy_to_build_on_powerpc_clang'
496ebb96 Merge branch 'upstream-diy' into allow_diy_to_build_on_powerpc_clang 5dedd3c6 diy 2018-03-06 (56d516fd) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1102
This commit is contained in:
commit
d3fe1a6bd4
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user