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
b26b74c0
Commit
b26b74c0
authored
Mar 19, 2019
by
Peter Eastman
Browse files
Improved performance of interaction groups on CPU
parent
0ee983bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
platforms/cpu/src/CpuCustomNonbondedForce.cpp
platforms/cpu/src/CpuCustomNonbondedForce.cpp
+3
-4
No files found.
platforms/cpu/src/CpuCustomNonbondedForce.cpp
View file @
b26b74c0
...
@@ -173,10 +173,9 @@ void CpuCustomNonbondedForce::threadComputeForce(ThreadPool& threads, int thread
...
@@ -173,10 +173,9 @@ void CpuCustomNonbondedForce::threadComputeForce(ThreadPool& threads, int thread
if
(
useInteractionGroups
)
{
if
(
useInteractionGroups
)
{
// The user has specified interaction groups, so compute only the requested interactions.
// The user has specified interaction groups, so compute only the requested interactions.
while
(
true
)
{
int
start
=
threadIndex
*
groupInteractions
.
size
()
/
numThreads
;
int
i
=
atomicCounter
++
;
int
end
=
(
threadIndex
+
1
)
*
groupInteractions
.
size
()
/
numThreads
;
if
(
i
>=
groupInteractions
.
size
())
for
(
int
i
=
start
;
i
<
end
;
i
++
)
{
break
;
int
atom1
=
groupInteractions
[
i
].
first
;
int
atom1
=
groupInteractions
[
i
].
first
;
int
atom2
=
groupInteractions
[
i
].
second
;
int
atom2
=
groupInteractions
[
i
].
second
;
for
(
int
j
=
0
;
j
<
(
int
)
paramNames
.
size
();
j
++
)
{
for
(
int
j
=
0
;
j
<
(
int
)
paramNames
.
size
();
j
++
)
{
...
...
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