Commit 1e5b258c authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #1692 from peastman/mergedsteps

Fixed bug merging steps in CustomIntegrator
parents 88b0a3e9 74dba059
...@@ -7098,7 +7098,7 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context, ...@@ -7098,7 +7098,7 @@ void CudaIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context,
// Identify steps that can be merged into a single kernel. // Identify steps that can be merged into a single kernel.
for (int step = 1; step < numSteps; step++) { for (int step = 1; step < numSteps; step++) {
if ((needsForces[step] || needsEnergy[step]) && (invalidatesForces[step-1] || forceGroupFlags[step] != forceGroupFlags[step-1])) if (invalidatesForces[step-1] || forceGroupFlags[step] != forceGroupFlags[step-1])
continue; continue;
if (stepType[step-1] == CustomIntegrator::ComputePerDof && stepType[step] == CustomIntegrator::ComputePerDof) if (stepType[step-1] == CustomIntegrator::ComputePerDof && stepType[step] == CustomIntegrator::ComputePerDof)
merged[step] = true; merged[step] = true;
......
...@@ -7387,7 +7387,7 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context ...@@ -7387,7 +7387,7 @@ void OpenCLIntegrateCustomStepKernel::prepareForComputation(ContextImpl& context
// Identify steps that can be merged into a single kernel. // Identify steps that can be merged into a single kernel.
for (int step = 1; step < numSteps; step++) { for (int step = 1; step < numSteps; step++) {
if ((needsForces[step] || needsEnergy[step]) && (invalidatesForces[step-1] || forceGroupFlags[step] != forceGroupFlags[step-1])) if (invalidatesForces[step-1] || forceGroupFlags[step] != forceGroupFlags[step-1])
continue; continue;
if (stepType[step-1] == CustomIntegrator::ComputePerDof && stepType[step] == CustomIntegrator::ComputePerDof) if (stepType[step-1] == CustomIntegrator::ComputePerDof && stepType[step] == CustomIntegrator::ComputePerDof)
merged[step] = true; merged[step] = true;
......
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