From 98b49418082dfa6a3e98c84f551e9aa15732369a Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Fri, 13 Oct 2023 15:42:46 +0200 Subject: [PATCH] Fix type of argument to plumed_cmd --- platforms/cuda/src/CudaPlumedKernels.cpp | 2 +- platforms/opencl/src/OpenCLPlumedKernels.cpp | 2 +- platforms/reference/src/ReferencePlumedKernels.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platforms/cuda/src/CudaPlumedKernels.cpp b/platforms/cuda/src/CudaPlumedKernels.cpp index cee0948..e4a0e79 100644 --- a/platforms/cuda/src/CudaPlumedKernels.cpp +++ b/platforms/cuda/src/CudaPlumedKernels.cpp @@ -236,7 +236,7 @@ void CudaCalcPlumedForceKernel::executeOnWorkerThread() { plumed_cmd(plumedmain, "setBox", &boxVectors[0][0]); } double virial[9]; - plumed_cmd(plumedmain, "setVirial", &virial); + plumed_cmd(plumedmain, "setVirial", &virial[0]); // Calculate the forces and energy. diff --git a/platforms/opencl/src/OpenCLPlumedKernels.cpp b/platforms/opencl/src/OpenCLPlumedKernels.cpp index 29e40c1..c253fab 100644 --- a/platforms/opencl/src/OpenCLPlumedKernels.cpp +++ b/platforms/opencl/src/OpenCLPlumedKernels.cpp @@ -195,7 +195,7 @@ void OpenCLCalcPlumedForceKernel::executeOnWorkerThread() { plumed_cmd(plumedmain, "setBox", &boxVectors[0][0]); } double virial[9]; - plumed_cmd(plumedmain, "setVirial", &virial); + plumed_cmd(plumedmain, "setVirial", &virial[0]); // Calculate the forces and energy. diff --git a/platforms/reference/src/ReferencePlumedKernels.cpp b/platforms/reference/src/ReferencePlumedKernels.cpp index 0a60d05..7212d76 100644 --- a/platforms/reference/src/ReferencePlumedKernels.cpp +++ b/platforms/reference/src/ReferencePlumedKernels.cpp @@ -152,7 +152,7 @@ double ReferenceCalcPlumedForceKernel::execute(ContextImpl& context, bool includ plumed_cmd(plumedmain, "setBox", &boxVectors[0][0]); } double virial[9]; - plumed_cmd(plumedmain, "setVirial", &virial); + plumed_cmd(plumedmain, "setVirial", &virial[0]); // Calculate the forces and energy.