"vscode:/vscode.git/clone" did not exist on "b3f4c0f8b7ca8ae2438520c08d3091d650162e06"
Unverified Commit a770038f authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2248 from peastman/customgbtable

Fixed error using tabulated functions with a CustomGBForce
parents 30592159 596be80f
...@@ -4100,6 +4100,8 @@ double CudaCalcCustomGBForceKernel::execute(ContextImpl& context, bool includeFo ...@@ -4100,6 +4100,8 @@ double CudaCalcCustomGBForceKernel::execute(ContextImpl& context, bool includeFo
for (auto& buffer : d->getBuffers()) for (auto& buffer : d->getBuffers())
gradientChainRuleArgs.push_back(&buffer.getMemory()); gradientChainRuleArgs.push_back(&buffer.getMemory());
} }
for (auto& function : tabulatedFunctions)
gradientChainRuleArgs.push_back(&function.getDevicePointer());
} }
} }
if (globals.isInitialized()) { if (globals.isInitialized()) {
......
...@@ -4365,6 +4365,8 @@ double OpenCLCalcCustomGBForceKernel::execute(ContextImpl& context, bool include ...@@ -4365,6 +4365,8 @@ double OpenCLCalcCustomGBForceKernel::execute(ContextImpl& context, bool include
for (auto& buffer : d->getBuffers()) for (auto& buffer : d->getBuffers())
gradientChainRuleKernel.setArg<cl::Memory>(index++, buffer.getMemory()); gradientChainRuleKernel.setArg<cl::Memory>(index++, buffer.getMemory());
} }
for (auto& function : tabulatedFunctions)
gradientChainRuleKernel.setArg<cl::Buffer>(index++, function.getDeviceBuffer());
} }
} }
if (globals.isInitialized()) { 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