Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
24552e48
Unverified
Commit
24552e48
authored
Aug 10, 2018
by
peastman
Committed by
GitHub
Aug 10, 2018
Browse files
Merge pull request #2144 from peastman/globals
Avoid unnecessary uploads of global parameters
parents
24add559
595059ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+1
-0
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+1
-0
No files found.
platforms/cuda/src/CudaKernels.cpp
View file @
24552e48
...
@@ -7913,6 +7913,7 @@ void CudaIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegrat
...
@@ -7913,6 +7913,7 @@ void CudaIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegrat
// Upload the global values to the device.
// Upload the global values to the device.
globalValues
.
upload
(
localGlobalValues
,
true
);
globalValues
.
upload
(
localGlobalValues
,
true
);
deviceGlobalsAreCurrent
=
true
;
}
}
bool
stepInvalidatesForces
=
invalidatesForces
[
step
];
bool
stepInvalidatesForces
=
invalidatesForces
[
step
];
if
(
stepType
[
step
]
==
CustomIntegrator
::
ComputePerDof
&&
!
merged
[
step
])
{
if
(
stepType
[
step
]
==
CustomIntegrator
::
ComputePerDof
&&
!
merged
[
step
])
{
...
...
platforms/opencl/src/OpenCLKernels.cpp
View file @
24552e48
...
@@ -8300,6 +8300,7 @@ void OpenCLIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegr
...
@@ -8300,6 +8300,7 @@ void OpenCLIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegr
// Upload the global values to the device.
// Upload the global values to the device.
globalValues.upload(localGlobalValues, true, true);
globalValues.upload(localGlobalValues, true, true);
deviceGlobalsAreCurrent = true;
}
}
bool stepInvalidatesForces = invalidatesForces[step];
bool stepInvalidatesForces = invalidatesForces[step];
if (stepType[step] == CustomIntegrator::ComputePerDof && !merged[step]) {
if (stepType[step] == CustomIntegrator::ComputePerDof && !merged[step]) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment