Skip to content

mpi: DIY_mpitype enable move semantics when DIY_MPI_AS_LIB'

Vicente Bolea requested to merge vbolea/diy:diy_mpi_as_lib_fixes into master

I noticed that the move semantics for DIY_##mpitype introduced here: c86350bc did not include their corresponding semantics for when diy::mpi is not used as a headers-only library, this is when VTKMDIY_MPI_AS_LIB=1. This is the case of VTK-m.

When VTKMDIY_MPI_AS_LIB=1 but there is no MPI, the no-mpi.hpp file is not included meaning that we do not have information of what is the type MPI_Win. Still, we need to provide a class that wraps it and can be moveable to be compatible with the change: c86350bc

This MR solves this by doing a manual move operation, basically a shallow copy followed by a memset(0) of the moved object, in this case a forward declared struct MPI_Win.

Edited by Vicente Bolea

Merge request reports

Loading