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
845050d4
"platforms/hip/tests/TestHipCustomNonbondedForce.cpp" did not exist on "48d93893d112cc49889714a476e70196bfc2ea9b"
Commit
845050d4
authored
Mar 26, 2010
by
Peter Eastman
Browse files
Optimization (consolidated two SHAKE related kernels into one)
parent
08f52358
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
platforms/cuda/src/kernels/kShakeH.cu
platforms/cuda/src/kernels/kShakeH.cu
+18
-5
No files found.
platforms/cuda/src/kernels/kShakeH.cu
View file @
845050d4
...
...
@@ -420,6 +420,22 @@ void kApplySecondShake_kernel()
pos
+=
blockDim
.
x
*
gridDim
.
x
;
}
// Update any atoms that SHAKE is not applied to.
pos
=
threadIdx
.
x
+
blockIdx
.
x
*
blockDim
.
x
;
while
(
pos
<
cSim
.
NonShakeConstraints
)
{
int
atomID
=
cSim
.
pNonShakeID
[
pos
];
float4
apos
=
cSim
.
pOldPosq
[
atomID
];
float4
xpi
=
cSim
.
pPosq
[
atomID
];
xpi
.
x
+=
apos
.
x
;
xpi
.
y
+=
apos
.
y
;
xpi
.
z
+=
apos
.
z
;
cSim
.
pPosq
[
atomID
]
=
xpi
;
pos
+=
blockDim
.
x
*
gridDim
.
x
;
}
}
__global__
void
...
...
@@ -447,7 +463,6 @@ kApplyNoShake_kernel()
}
}
void
kApplySecondShake
(
gpuContext
gpu
)
{
// printf("kApplySecondShake\n");
...
...
@@ -456,11 +471,9 @@ void kApplySecondShake(gpuContext gpu)
kApplySecondShake_kernel
<<<
gpu
->
sim
.
blocks
,
gpu
->
sim
.
shake_threads_per_block
>>>
();
LAUNCHERROR
(
"kApplySecondShake"
);
}
// handle non-Shake atoms
if
(
gpu
->
sim
.
NonShakeConstraints
>
0
)
else
if
(
gpu
->
sim
.
NonShakeConstraints
>
0
)
{
// handle non-Shake atoms
kApplyNoShake_kernel
<<<
gpu
->
sim
.
blocks
,
gpu
->
sim
.
nonshake_threads_per_block
>>>
();
LAUNCHERROR
(
"kApplyNoShake"
);
}
...
...
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