Decouple coordinates buffer management from buffer ops in NBNXM
authorArtem Zhmurov <zhmurov@gmail.com>
Tue, 10 Sep 2019 20:52:37 +0000 (22:52 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Wed, 11 Sep 2019 16:35:26 +0000 (18:35 +0200)
commitc69e061d078f8a829c86e96c2d4144ec32c03eec
treeacc7a3fd73d1dd65a2c58596213d850735c0e1ea
parent21abdb3cd5668412d41bdbc0abb2fd0d1240383d
Decouple coordinates buffer management from buffer ops in NBNXM

To make transition to the new device-side state propagator data
manager easier, the copy and plain buffers management have to be
decoupled from the actual operations on data in the buffers.
This commit splits the corresponding functions into two, and
decouples CPU- and GPU-based coordinate buffer ops one from
another. Since the coordinates are now clearly communicated
between PME and NBNXM, the plain pointer on the CPU-side code is
replaced with the DeviceBuffer<float>. The getters for the device-
side buffer now never return nullptr, but exit with the assertion
if the corresponding data is not intialized.

Change-Id: Ic793f815870a8b4f414a9b7ca0a5001e58f49c7a
src/gromacs/ewald/pme.h
src/gromacs/ewald/pme_gpu.cpp
src/gromacs/ewald/pme_gpu_internal.cpp
src/gromacs/ewald/pme_gpu_internal.h
src/gromacs/mdlib/sim_util.cpp
src/gromacs/nbnxm/atomdata.cpp
src/gromacs/nbnxm/atomdata.h
src/gromacs/nbnxm/cuda/nbnxm_cuda.cu
src/gromacs/nbnxm/nbnxm.cpp
src/gromacs/nbnxm/nbnxm.h
src/gromacs/nbnxm/nbnxm_gpu.h