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
b98859ec
Commit
b98859ec
authored
Feb 27, 2009
by
Peter Eastman
Browse files
Minor speed optimization to neighbor list building
parent
66255407
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
platforms/cuda/src/kernels/kFindInteractingBlocks.h
platforms/cuda/src/kernels/kFindInteractingBlocks.h
+4
-4
No files found.
platforms/cuda/src/kernels/kFindInteractingBlocks.h
View file @
b98859ec
...
@@ -61,9 +61,9 @@ __global__ void METHOD_NAME(kFindBlockBounds, _kernel)()
...
@@ -61,9 +61,9 @@ __global__ void METHOD_NAME(kFindBlockBounds, _kernel)()
{
{
apos
=
cSim
.
pPosq
[
base
+
i
];
apos
=
cSim
.
pPosq
[
base
+
i
];
#ifdef USE_PERIODIC
#ifdef USE_PERIODIC
apos
.
x
-=
floor
((
apos
.
x
-
firstPoint
.
x
)
/
cSim
.
periodicBoxSizeX
+
0
.
5
)
*
cSim
.
periodicBoxSizeX
;
apos
.
x
-=
floor
((
apos
.
x
-
firstPoint
.
x
)
/
cSim
.
periodicBoxSizeX
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeX
;
apos
.
y
-=
floor
((
apos
.
y
-
firstPoint
.
y
)
/
cSim
.
periodicBoxSizeY
+
0
.
5
)
*
cSim
.
periodicBoxSizeY
;
apos
.
y
-=
floor
((
apos
.
y
-
firstPoint
.
y
)
/
cSim
.
periodicBoxSizeY
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeY
;
apos
.
z
-=
floor
((
apos
.
z
-
firstPoint
.
z
)
/
cSim
.
periodicBoxSizeZ
+
0
.
5
)
*
cSim
.
periodicBoxSizeZ
;
apos
.
z
-=
floor
((
apos
.
z
-
firstPoint
.
z
)
/
cSim
.
periodicBoxSizeZ
+
0
.
5
f
)
*
cSim
.
periodicBoxSizeZ
;
#endif
#endif
minx
=
min
(
minx
,
apos
.
x
);
minx
=
min
(
minx
,
apos
.
x
);
maxx
=
max
(
maxx
,
apos
.
x
);
maxx
=
max
(
maxx
,
apos
.
x
);
...
@@ -87,7 +87,7 @@ __global__ void METHOD_NAME(kFindBlocksWithInteractions, _kernel)()
...
@@ -87,7 +87,7 @@ __global__ void METHOD_NAME(kFindBlocksWithInteractions, _kernel)()
if
(
pos
<
cSim
.
workUnits
)
if
(
pos
<
cSim
.
workUnits
)
{
{
// Extract cell coordinates from appropriate work unit
// Extract cell coordinates from appropriate work unit
unsigned
int
x
=
cSim
.
pWorkUnit
[
pos
];
unsigned
int
x
=
cSim
.
pWorkUnit
[
pos
];
unsigned
int
y
=
((
x
>>
2
)
&
0x7fff
);
unsigned
int
y
=
((
x
>>
2
)
&
0x7fff
);
x
=
(
x
>>
17
);
x
=
(
x
>>
17
);
...
...
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