Add SYCL implementation of LINCS
[alexxy/gromacs.git] / src / gromacs / mdlib / lincs_gpu.h
index 690d21df82f1135b6108b4b6831c54003730f8a8..5fc68b08d4642ab9e279ffb21211a4c1ce08c273 100644 (file)
@@ -96,6 +96,13 @@ struct LincsGpuKernelParameters
     DeviceBuffer<AtomPair> d_constraints;
     //! Equilibrium distances for the constraints (GPU)
     DeviceBuffer<float> d_constraintsTargetLengths;
+    /*! Whether there are coupled constraints.
+     *
+     * In SYCL, the accessors can not be initialized with an empty buffer.
+     * In case there are no coupled constraints, the respective buffers below are
+     * empty. So we need to inform the kernel launcher that these are optional.
+     */
+    bool haveCoupledConstraints = false;
     //! Number of constraints, coupled with the current one (GPU)
     DeviceBuffer<int> d_coupledConstraintsCounts;
     //! List of coupled with the current one (GPU)