Introduce GpuBonded
commit87a698a30ebd6d5c2f437d74c0455c51cbc96e95
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 1 Nov 2018 11:49:03 +0000 (1 12:49 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 28 Nov 2018 07:22:18 +0000 (28 08:22 +0100)
treeec6c9dd3938215eb34472713e38e610affc44724
parent4b4ef7c74d7e2ae5337aa1520cb741745565d748
Introduce GpuBonded

This pimpl-ed class hides the GPU implementation details from
the high-level calling code.

Moved all GPU bonded force-calculation management code into the same
source file, separating them from the kernel definition and launch
file, which may help improve compilation time also.

Bound the kernel launch parameters for device buffers to GpuBonded
directly after neighbour search, for simplicity and efficiency. That
call now comes slightly later in the search-step call sequence.

Separated the launch of the energies transfer and the function
that waits upon, preparing for future reorganization.

Introduced HostStdVector to decrease verbosity of GpuBonded::Impl
declaration.

Now that there is no reason to have the stream member of
GpuBondedLists as a void *, removed the excess indirection that
introduced.

Moved symbols into gmx namespace per style. Used the appropriate
inclusion guards on helper .cuh files.

Noted several TODOs for follow up work.

Refs #2724

Change-Id: I612d8f0f973e6cfcc33a8176ba9f2525297542c4
18 files changed:
src/gromacs/gpu_utils/gpu_vec.cuh
src/gromacs/gpu_utils/hostallocator.h
src/gromacs/listed-forces/CMakeLists.txt
src/gromacs/listed-forces/gpubonded-impl.cpp [new file with mode: 0644]
src/gromacs/listed-forces/gpubonded-impl.cu [new file with mode: 0644]
src/gromacs/listed-forces/gpubonded-impl.h [new file with mode: 0644]
src/gromacs/listed-forces/gpubonded.h [new file with mode: 0644]
src/gromacs/listed-forces/gpubondedkernels.cu [moved from src/gromacs/listed-forces/bonded.cu with 86% similarity]
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/listed-forces.h
src/gromacs/listed-forces/manage-threading.cpp
src/gromacs/listed-forces/manage-threading.h [copied from src/gromacs/pbcutil/gpu_pbc.cuh with 52% similarity]
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/mdsetup.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdrun/runner.cpp
src/gromacs/mdtypes/forcerec.h
src/gromacs/pbcutil/gpu_pbc.cuh