Store buffer without offset in GpuForceReduction::Impl::baseForce_
authorAndrey Alekseenko <al42and@gmail.com>
Wed, 10 Mar 2021 11:53:49 +0000 (14:53 +0300)
committerAndrey Alekseenko <al42and@gmail.com>
Fri, 19 Mar 2021 21:02:19 +0000 (00:02 +0300)
commit872b46deb8f6a67d95c6766cbcab15b0e050d4e3
tree1adf93a4614148f218bb6f114d647ec98e45a22d
parentc4a672b93b655ff674b671fd10ebe728b2d19ec8
Store buffer without offset in GpuForceReduction::Impl::baseForce_

- Store the pointer to the beginning of the array and apply offset to
it when invoking the kernel. Offsets to other arrays are applied at
the invocation time, so it makes sense to do the same with baseForce_.
- This also avoid storing pointers to the middle of the device buffer,
which is not a good fit for OpenCL and SYCL.

This change is preparation for adding a SYCL implementation of GPU
update (Issue #3932).
src/gromacs/mdlib/gpuforcereduction_impl.cu