CUDA version of LINCS constraints.
Implementation of the LINCS constraints for NVIDIA GPUs.
Currently works isolated from the other parts of the code:
coordinates and velocities are copied to and from GPU on
every integration timestep. Part of the GPU-only loop.
Loosely based on change 9162 by Alan Gray. To enable,
set the environmental variable GMX_LINCS_GPU.
Limitations:
1. Works only if the constraints can be split in short
uncoupled groups (currently < 256, designed for H-bonds
constraints).
2. Does not change the matrix inversion order for costraints
triangles.
3. Does not support free energy computations.
4. Assumes no communications between domains (i.e. assumes that
there is no constraints connecting atoms from two different
domains).
5. Number of thread per blocks should be a power of 2 for
reduction of virial to work.
TODOs:
1. Move more data from the global memory to local.
2. Change .at() to []
3. Add sorting by the number of coupled constraints to decrease
warp divergencies.
4. numAtoms should be changeable (for multi-GPU case).
Refs #2816, #2885
Change-Id: I3c975cf898053b7467bcd30459e60ce2c8852be6