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
b0c2c4d8
Unverified
Commit
b0c2c4d8
authored
Dec 01, 2025
by
Peter Eastman
Committed by
GitHub
Dec 01, 2025
Browse files
Minor optimization to PME (#5151)
* Minor optimization to PME * Minor simplification
parent
a112fbfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
platforms/common/src/kernels/pme.cc
platforms/common/src/kernels/pme.cc
+8
-6
No files found.
platforms/common/src/kernels/pme.cc
View file @
b0c2c4d8
...
@@ -102,17 +102,19 @@ KERNEL void gridSpreadCharge(GLOBAL const real4* RESTRICT posq,
...
@@ -102,17 +102,19 @@ KERNEL void gridSpreadCharge(GLOBAL const real4* RESTRICT posq,
ybase
=
ybase
*
GRID_SIZE_Z
;
ybase
=
ybase
*
GRID_SIZE_Z
;
int
index
=
xbase
+
ybase
+
zindex
;
int
index
=
xbase
+
ybase
+
zindex
;
real
add
=
dzdx
*
data
[
iy
].
y
;
real
add
=
dzdx
*
data
[
iy
].
y
;
if
(
fabs
(
add
)
>
2.3e-10
f
)
{
// Smallest value representable in 64 bit fixed point
#ifdef USE_FIXED_POINT_CHARGE_SPREADING
#ifdef USE_FIXED_POINT_CHARGE_SPREADING
ATOMIC_ADD
(
&
pmeGrid
[
index
],
(
mm_ulong
)
realToFixedPoint
(
add
));
ATOMIC_ADD
(
&
pmeGrid
[
index
],
(
mm_ulong
)
realToFixedPoint
(
add
));
#if defined(__GFX12__)
#if defined(__GFX12__)
// Workaround for rare cases when few values of pmeGrid are very large and
// Workaround for rare cases when few values of pmeGrid are very large and
// incorrect. The cause is unknown. Why this workaround or other irrelevant
// incorrect. The cause is unknown. Why this workaround or other irrelevant
// changes like printf help is also unknown.
// changes like printf help is also unknown.
asm
volatile
(
"s_wait_storecnt 0x0"
);
asm
volatile
(
"s_wait_storecnt 0x0"
);
#endif
#endif
#else
#else
ATOMIC_ADD
(
&
pmeGrid
[
index
],
add
);
ATOMIC_ADD
(
&
pmeGrid
[
index
],
add
);
#endif
#endif
}
}
}
}
}
}
}
...
...
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