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
ebfcfe24
Commit
ebfcfe24
authored
Jan 13, 2010
by
Peter Eastman
Browse files
Don't test for interaction flags on platforms where we don't use them.
parent
dec115db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
platforms/opencl/tests/TestOpenCLNonbondedForce.cpp
platforms/opencl/tests/TestOpenCLNonbondedForce.cpp
+17
-15
No files found.
platforms/opencl/tests/TestOpenCLNonbondedForce.cpp
View file @
ebfcfe24
...
@@ -553,24 +553,26 @@ void testBlockInteractions(bool periodic) {
...
@@ -553,24 +553,26 @@ void testBlockInteractions(bool periodic) {
// Check the interaction flags.
// Check the interaction flags.
unsigned
int
flags
=
interactionFlags
[
i
];
if
(
clcontext
.
getSIMDWidth
()
==
32
)
{
for
(
int
atom2
=
0
;
atom2
<
32
;
atom2
++
)
{
unsigned
int
flags
=
interactionFlags
[
i
];
if
((
flags
&
1
)
==
0
)
{
for
(
int
atom2
=
0
;
atom2
<
32
;
atom2
++
)
{
mm_float4
pos2
=
clcontext
.
getPosq
()[
y
*
blockSize
+
atom2
];
if
((
flags
&
1
)
==
0
)
{
for
(
int
atom1
=
0
;
atom1
<
blockSize
;
++
atom1
)
{
mm_float4
pos2
=
clcontext
.
getPosq
()[
y
*
blockSize
+
atom2
];
mm_float4
pos1
=
clcontext
.
getPosq
()[
x
*
blockSize
+
atom1
];
for
(
int
atom1
=
0
;
atom1
<
blockSize
;
++
atom1
)
{
float
dx
=
pos2
.
x
-
pos1
.
x
;
mm_float4
pos1
=
clcontext
.
getPosq
()[
x
*
blockSize
+
atom1
];
float
dy
=
pos2
.
y
-
pos1
.
y
;
float
dx
=
pos2
.
x
-
pos1
.
x
;
float
dz
=
pos2
.
z
-
pos1
.
z
;
float
dy
=
pos2
.
y
-
pos1
.
y
;
if
(
periodic
)
{
float
dz
=
pos2
.
z
-
pos1
.
z
;
dx
-=
(
float
)(
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
);
if
(
periodic
)
{
dy
-=
(
float
)(
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
);
dx
-=
(
float
)(
floor
(
0.5
+
dx
/
boxSize
)
*
boxSize
);
dz
-=
(
float
)(
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
);
dy
-=
(
float
)(
floor
(
0.5
+
dy
/
boxSize
)
*
boxSize
);
dz
-=
(
float
)(
floor
(
0.5
+
dz
/
boxSize
)
*
boxSize
);
}
ASSERT
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
>
cutoff
*
cutoff
);
}
}
ASSERT
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
>
cutoff
*
cutoff
);
}
}
flags
>>=
1
;
}
}
flags
>>=
1
;
}
}
}
}
...
...
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