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
65c389ff
Commit
65c389ff
authored
Oct 12, 2012
by
Peter Eastman
Browse files
Flush the queue after each time step on Windows to reduce UI lag.
parent
1107aa83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+36
-0
No files found.
platforms/opencl/src/OpenCLKernels.cpp
View file @
65c389ff
...
@@ -4033,6 +4033,12 @@ void OpenCLIntegrateVerletStepKernel::execute(ContextImpl& context, const Verlet
...
@@ -4033,6 +4033,12 @@ void OpenCLIntegrateVerletStepKernel::execute(ContextImpl& context, const Verlet
cl
.
setTime
(
cl
.
getTime
()
+
dt
);
cl
.
setTime
(
cl
.
getTime
()
+
dt
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
// Reduce UI lag.
#ifdef WIN32
cl
.
getQueue
().
flush
();
#endif
}
}
OpenCLIntegrateLangevinStepKernel
::~
OpenCLIntegrateLangevinStepKernel
()
{
OpenCLIntegrateLangevinStepKernel
::~
OpenCLIntegrateLangevinStepKernel
()
{
...
@@ -4110,6 +4116,12 @@ void OpenCLIntegrateLangevinStepKernel::execute(ContextImpl& context, const Lang
...
@@ -4110,6 +4116,12 @@ void OpenCLIntegrateLangevinStepKernel::execute(ContextImpl& context, const Lang
cl
.
setTime
(
cl
.
getTime
()
+
stepSize
);
cl
.
setTime
(
cl
.
getTime
()
+
stepSize
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
// Reduce UI lag.
#ifdef WIN32
cl
.
getQueue
().
flush
();
#endif
}
}
OpenCLIntegrateBrownianStepKernel
::~
OpenCLIntegrateBrownianStepKernel
()
{
OpenCLIntegrateBrownianStepKernel
::~
OpenCLIntegrateBrownianStepKernel
()
{
...
@@ -4170,6 +4182,12 @@ void OpenCLIntegrateBrownianStepKernel::execute(ContextImpl& context, const Brow
...
@@ -4170,6 +4182,12 @@ void OpenCLIntegrateBrownianStepKernel::execute(ContextImpl& context, const Brow
cl
.
setTime
(
cl
.
getTime
()
+
stepSize
);
cl
.
setTime
(
cl
.
getTime
()
+
stepSize
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
// Reduce UI lag.
#ifdef WIN32
cl
.
getQueue
().
flush
();
#endif
}
}
OpenCLIntegrateVariableVerletStepKernel
::~
OpenCLIntegrateVariableVerletStepKernel
()
{
OpenCLIntegrateVariableVerletStepKernel
::~
OpenCLIntegrateVariableVerletStepKernel
()
{
...
@@ -4226,6 +4244,12 @@ double OpenCLIntegrateVariableVerletStepKernel::execute(ContextImpl& context, co
...
@@ -4226,6 +4244,12 @@ double OpenCLIntegrateVariableVerletStepKernel::execute(ContextImpl& context, co
cl
.
executeKernel
(
kernel2
,
numAtoms
);
cl
.
executeKernel
(
kernel2
,
numAtoms
);
integration
.
computeVirtualSites
();
integration
.
computeVirtualSites
();
// Reduce UI lag.
#ifdef WIN32
cl
.
getQueue
().
flush
();
#endif
// Update the time and step count.
// Update the time and step count.
...
@@ -4306,6 +4330,12 @@ double OpenCLIntegrateVariableLangevinStepKernel::execute(ContextImpl& context,
...
@@ -4306,6 +4330,12 @@ double OpenCLIntegrateVariableLangevinStepKernel::execute(ContextImpl& context,
cl
.
executeKernel
(
kernel2
,
numAtoms
);
cl
.
executeKernel
(
kernel2
,
numAtoms
);
integration
.
computeVirtualSites
();
integration
.
computeVirtualSites
();
// Reduce UI lag.
#ifdef WIN32
cl
.
getQueue
().
flush
();
#endif
// Update the time and step count.
// Update the time and step count.
...
@@ -4834,6 +4864,12 @@ void OpenCLIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegr
...
@@ -4834,6 +4864,12 @@ void OpenCLIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegr
cl
.
setTime
(
cl
.
getTime
()
+
stepSize
);
cl
.
setTime
(
cl
.
getTime
()
+
stepSize
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
cl
.
setStepCount
(
cl
.
getStepCount
()
+
1
);
// Reduce UI lag.
#ifdef WIN32
cl
.
getQueue
().
flush
();
#endif
}
}
void
OpenCLIntegrateCustomStepKernel
::
recordChangedParameters
(
ContextImpl
&
context
)
{
void
OpenCLIntegrateCustomStepKernel
::
recordChangedParameters
(
ContextImpl
&
context
)
{
...
...
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