Memory management fixes in CUDA version of LINCS
commit747c371cb69bb5eb226aaaadf8f209eb3e2855aa
authorArtem Zhmurov <zhmurov@gmail.com>
Thu, 27 Jun 2019 10:04:23 +0000 (27 12:04 +0200)
committerArtem Zhmurov <zhmurov@gmail.com>
Wed, 3 Jul 2019 11:01:30 +0000 (3 13:01 +0200)
tree79177ec7b68e5e5a6d4d34627265b8897395b7bb
parent6afe4d46c9cbd50180fccfd3ca512a09bb8b4dd8
Memory management fixes in CUDA version of LINCS

This fix is to prepare LINCS to run with DD.

1. The masses array size depends on the current number of atoms
   rather than on the number of constraints.
2. The size of other arrays should be based on the number of
   threads launched on the GPU, which include padding added to
   align coupled constraints with the thread blocks. Also
   renamed variable according to conventions.

Refs #2885 and #2888

Change-Id: I20cb53ebc6da6a1ff2ee1e385613b27c4a01d11f
src/gromacs/mdlib/lincs_cuda_impl.cu
src/gromacs/mdlib/lincs_cuda_impl.h