Commit 596be80f authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed error using tabulated functions with a CustomGBForce

parent 30592159
......@@ -4100,6 +4100,8 @@ double CudaCalcCustomGBForceKernel::execute(ContextImpl& context, bool includeFo
for (auto& buffer : d->getBuffers())
gradientChainRuleArgs.push_back(&buffer.getMemory());
}
for (auto& function : tabulatedFunctions)
gradientChainRuleArgs.push_back(&function.getDevicePointer());
}
}
if (globals.isInitialized()) {
......
......@@ -4365,6 +4365,8 @@ double OpenCLCalcCustomGBForceKernel::execute(ContextImpl& context, bool include
for (auto& buffer : d->getBuffers())
gradientChainRuleKernel.setArg<cl::Memory>(index++, buffer.getMemory());
}
for (auto& function : tabulatedFunctions)
gradientChainRuleKernel.setArg<cl::Buffer>(index++, function.getDeviceBuffer());
}
}
if (globals.isInitialized()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment