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
42c7781a
Commit
42c7781a
authored
Jul 01, 2015
by
Robert McGibbon
Browse files
Vec3 macro changes for CUDA
parent
f5058fe4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
platforms/cuda/tests/TestCudaVirtualSites.cpp
platforms/cuda/tests/TestCudaVirtualSites.cpp
+2
-2
plugins/rpmd/platforms/cuda/tests/TestCudaRpmd.cpp
plugins/rpmd/platforms/cuda/tests/TestCudaRpmd.cpp
+1
-1
plugins/rpmd/platforms/opencl/tests/TestOpenCLRpmd.cpp
plugins/rpmd/platforms/opencl/tests/TestOpenCLRpmd.cpp
+1
-1
plugins/rpmd/platforms/reference/tests/TestReferenceRpmd.cpp
plugins/rpmd/platforms/reference/tests/TestReferenceRpmd.cpp
+1
-1
No files found.
platforms/cuda/tests/TestCudaVirtualSites.cpp
View file @
42c7781a
...
...
@@ -80,8 +80,8 @@ void testMasslessParticle() {
for
(
int
i
=
0
;
i
<
1000
;
++
i
)
{
State
state
=
context
.
getState
(
State
::
Positions
|
State
::
Velocities
|
State
::
Forces
);
double
time
=
state
.
getTime
();
ASSERT_EQUAL_VEC
(
Vec3
(),
state
.
getPositions
()[
0
],
0.0
);
ASSERT_EQUAL_VEC
(
Vec3
(),
state
.
getVelocities
()[
0
],
0.0
);
ASSERT_EQUAL_VEC
(
Vec3
(
0
,
0
,
0
),
state
.
getPositions
()[
0
],
0.0
);
ASSERT_EQUAL_VEC
(
Vec3
(
0
,
0
,
0
),
state
.
getVelocities
()[
0
],
0.0
);
ASSERT_EQUAL_VEC
(
Vec3
(
cos
(
time
),
sin
(
time
),
0
),
state
.
getPositions
()[
1
],
0.01
);
ASSERT_EQUAL_VEC
(
Vec3
(
-
sin
(
time
),
cos
(
time
),
0
),
state
.
getVelocities
()[
1
],
0.01
);
integrator
.
step
(
1
);
...
...
plugins/rpmd/platforms/cuda/tests/TestCudaRpmd.cpp
View file @
42c7781a
...
...
@@ -271,7 +271,7 @@ void testCMMotionRemoval() {
pos
+=
calcCM
(
state
.
getPositions
(),
system
);
}
pos
*=
1.0
/
numCopies
;
ASSERT_EQUAL_VEC
(
Vec3
(),
pos
,
0.5
);
ASSERT_EQUAL_VEC
(
Vec3
(
0
,
0
,
0
),
pos
,
0.5
);
}
}
...
...
plugins/rpmd/platforms/opencl/tests/TestOpenCLRpmd.cpp
View file @
42c7781a
...
...
@@ -194,7 +194,7 @@ void testParaHydrogen() {
// Calculate the quantum contribution to the kinetic energy.
vector
<
Vec3
>
centroids
(
numParticles
,
Vec3
(
0
,
0
,
0
));
vector
<
Vec3
>
centroids
(
numParticles
,
Vec3
());
for
(
int
i
=
0
;
i
<
numCopies
;
i
++
)
{
const
vector
<
Vec3
>&
pos
=
states
[
i
].
getPositions
();
for
(
int
j
=
0
;
j
<
numParticles
;
j
++
)
...
...
plugins/rpmd/platforms/reference/tests/TestReferenceRpmd.cpp
View file @
42c7781a
...
...
@@ -206,7 +206,7 @@ void testVirtualSites() {
int
index
=
k
+
gridSize
*
(
j
+
gridSize
*
i
);
positions
[
3
*
index
]
=
pos
;
positions
[
3
*
index
+
1
]
=
Vec3
(
pos
[
0
]
+
1.0
,
pos
[
1
],
pos
[
2
]);
positions
[
3
*
index
+
2
]
=
Vec3
(
0
,
0
,
0
);
positions
[
3
*
index
+
2
]
=
Vec3
();
}
integ
.
setPositions
(
copy
,
positions
);
}
...
...
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