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
393a4dbd
Unverified
Commit
393a4dbd
authored
May 20, 2021
by
Peter Eastman
Committed by
GitHub
May 20, 2021
Browse files
Fixed compilation error on low end GPUs (#3121)
parent
d8ef57fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
platforms/common/src/kernels/ewald.cc
platforms/common/src/kernels/ewald.cc
+4
-4
No files found.
platforms/common/src/kernels/ewald.cc
View file @
393a4dbd
...
...
@@ -59,7 +59,7 @@ KERNEL void calculateEwaldCosSinSums(GLOBAL mixed* RESTRICT energyBuffer, GLOBAL
* previous routine.
*/
KERNEL
void
calculateEwaldForces
(
GLOBAL
mm_
u
long
*
RESTRICT
forceBuffers
,
GLOBAL
const
real4
*
RESTRICT
posq
,
GLOBAL
const
real2
*
RESTRICT
cosSinSum
,
real4
periodicBoxSize
)
{
KERNEL
void
calculateEwaldForces
(
GLOBAL
mm_long
*
RESTRICT
forceBuffers
,
GLOBAL
const
real4
*
RESTRICT
posq
,
GLOBAL
const
real2
*
RESTRICT
cosSinSum
,
real4
periodicBoxSize
)
{
unsigned
int
atom
=
GLOBAL_ID
;
real3
reciprocalBoxSize
=
make_real3
(
2
*
M_PI
/
periodicBoxSize
.
x
,
2
*
M_PI
/
periodicBoxSize
.
y
,
2
*
M_PI
/
periodicBoxSize
.
z
);
real
reciprocalCoefficient
=
ONE_4PI_EPS0
*
4
*
M_PI
/
(
periodicBoxSize
.
x
*
periodicBoxSize
.
y
*
periodicBoxSize
.
z
);
...
...
@@ -102,9 +102,9 @@ KERNEL void calculateEwaldForces(GLOBAL mm_ulong* RESTRICT forceBuffers, GLOBAL
// Record the force on the atom.
ATOMIC_ADD
(
&
forceBuffers
[
atom
]
,
(
mm_ulong
)
(
(
mm_long
)
(
force
.
x
*
0x100000000
)
))
;
ATOMIC_ADD
(
&
forceBuffers
[
atom
+
PADDED_NUM_ATOMS
]
,
(
mm_ulong
)
(
(
mm_long
)
(
force
.
y
*
0x100000000
)
))
;
ATOMIC_ADD
(
&
forceBuffers
[
atom
+
2
*
PADDED_NUM_ATOMS
]
,
(
mm_ulong
)
(
(
mm_long
)
(
force
.
z
*
0x100000000
)
))
;
forceBuffers
[
atom
]
+=
(
mm_long
)
(
force
.
x
*
0x100000000
);
forceBuffers
[
atom
+
PADDED_NUM_ATOMS
]
+=
(
mm_long
)
(
force
.
y
*
0x100000000
);
forceBuffers
[
atom
+
2
*
PADDED_NUM_ATOMS
]
+=
(
mm_long
)
(
force
.
z
*
0x100000000
);
atom
+=
GLOBAL_SIZE
;
}
}
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