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
c3af8f4d
Commit
c3af8f4d
authored
Oct 28, 2009
by
Peter Eastman
Browse files
Fixed compilation errors and warnings under Windows
parent
986d88af
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
1305 deletions
+24
-1305
openmmapi/include/openmm/internal/MSVC_erfc.h
openmmapi/include/openmm/internal/MSVC_erfc.h
+0
-0
openmmapi/include/openmm/internal/NonbondedForceImpl.h
openmmapi/include/openmm/internal/NonbondedForceImpl.h
+1
-1
openmmapi/src/NonbondedForceImpl.cpp
openmmapi/src/NonbondedForceImpl.cpp
+1
-1
platforms/cuda/src/kernels/gpu.cpp
platforms/cuda/src/kernels/gpu.cpp
+21
-17
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp
...ms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp
+1
-1
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp.Ewald-optimized
.../SimTKReference/ReferenceLJCoulombIxn.cpp.Ewald-optimized
+0
-658
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp.Ewald-vanilla
...rc/SimTKReference/ReferenceLJCoulombIxn.cpp.Ewald-vanilla
+0
-627
No files found.
platforms/reference/src/SimTKReference
/MSVC_erfc.h
→
openmmapi/include/openmm/internal
/MSVC_erfc.h
View file @
c3af8f4d
File moved
openmmapi/include/openmm/internal/NonbondedForceImpl.h
View file @
c3af8f4d
...
...
@@ -77,7 +77,7 @@ public:
private:
class
ErrorFunction
;
class
EwaldErrorFunction
;
static
double
findZero
(
const
ErrorFunction
&
f
,
int
initialGuess
);
static
int
findZero
(
const
ErrorFunction
&
f
,
int
initialGuess
);
NonbondedForce
&
owner
;
Kernel
kernel
;
};
...
...
openmmapi/src/NonbondedForceImpl.cpp
View file @
c3af8f4d
...
...
@@ -145,7 +145,7 @@ void NonbondedForceImpl::calcPMEParameters(const System& system, const Nonbonded
zsize
=
(
int
)
ceil
(
alpha
*
boxVectors
[
2
][
2
]
/
pow
(
0.5
*
tol
,
0.2
));
}
double
NonbondedForceImpl
::
findZero
(
const
NonbondedForceImpl
::
ErrorFunction
&
f
,
int
initialGuess
)
{
int
NonbondedForceImpl
::
findZero
(
const
NonbondedForceImpl
::
ErrorFunction
&
f
,
int
initialGuess
)
{
int
arg
=
initialGuess
;
double
value
=
f
.
getValue
(
arg
);
if
(
value
>
0.0
)
{
...
...
platforms/cuda/src/kernels/gpu.cpp
View file @
c3af8f4d
...
...
@@ -53,6 +53,10 @@ using namespace std;
#include "quern.h"
#include "Lepton.h"
// In case we're using some primitive version of Visual Studio this will
// make sure that erf() and erfc() are defined.
#include "openmm/internal/MSVC_erfc.h"
using
OpenMM
::
OpenMMException
;
using
Lepton
::
Operation
;
...
...
@@ -657,17 +661,17 @@ void gpuSetCustomNonbondedParameters(gpuContext gpu, const vector<vector<double>
gpu
->
sim
.
pCustomExceptionID
=
gpu
->
psCustomExceptionID
->
_pDevData
;
gpu
->
psCustomExceptionParams
=
new
CUDAStream
<
float4
>
(
gpu
->
sim
.
customExceptions
,
1
,
"CustomExceptionParams"
);
gpu
->
sim
.
pCustomExceptionParams
=
gpu
->
psCustomExceptionParams
->
_pDevData
;
for
(
int
i
=
0
;
i
<
parameters
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
parameters
.
size
();
i
++
)
{
if
(
parameters
[
i
].
size
()
>
0
)
(
*
gpu
->
psCustomParams
)[
i
].
x
=
parameters
[
i
][
0
];
(
*
gpu
->
psCustomParams
)[
i
].
x
=
(
float
)
parameters
[
i
][
0
];
if
(
parameters
[
i
].
size
()
>
1
)
(
*
gpu
->
psCustomParams
)[
i
].
y
=
parameters
[
i
][
1
];
(
*
gpu
->
psCustomParams
)[
i
].
y
=
(
float
)
parameters
[
i
][
1
];
if
(
parameters
[
i
].
size
()
>
2
)
(
*
gpu
->
psCustomParams
)[
i
].
z
=
parameters
[
i
][
2
];
(
*
gpu
->
psCustomParams
)[
i
].
z
=
(
float
)
parameters
[
i
][
2
];
if
(
parameters
[
i
].
size
()
>
3
)
(
*
gpu
->
psCustomParams
)[
i
].
w
=
parameters
[
i
][
3
];
(
*
gpu
->
psCustomParams
)[
i
].
w
=
(
float
)
parameters
[
i
][
3
];
}
for
(
int
i
=
0
;
i
<
exceptionAtom1
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
(
int
)
exceptionAtom1
.
size
();
i
++
)
{
(
*
gpu
->
psCustomExceptionID
)[
i
].
x
=
exceptionAtom1
[
i
];
(
*
gpu
->
psCustomExceptionID
)[
i
].
y
=
exceptionAtom2
[
i
];
(
*
gpu
->
psCustomExceptionID
)[
i
].
z
=
gpu
->
pOutputBufferCounter
[
exceptionAtom1
[
i
]]
++
;
...
...
@@ -1783,17 +1787,17 @@ void gpuSetLangevinIntegrationParameters(gpuContext gpu, float tau, float deltaT
double
X
=
gpu
->
sim
.
tau
*
sqrt
(
gpu
->
sim
.
kT
*
C
);
double
Yv
=
sqrt
(
gpu
->
sim
.
kT
*
B
/
C
);
double
Yx
=
gpu
->
sim
.
tau
*
sqrt
(
gpu
->
sim
.
kT
*
B
/
(
1.0
-
EM
));
(
*
gpu
->
psLangevinParameters
)[
0
]
=
EM
;
(
*
gpu
->
psLangevinParameters
)[
1
]
=
EM
;
(
*
gpu
->
psLangevinParameters
)[
2
]
=
DOverTauC
;
(
*
gpu
->
psLangevinParameters
)[
3
]
=
TauOneMinusEM
;
(
*
gpu
->
psLangevinParameters
)[
4
]
=
TauDOverEMMinusOne
;
(
*
gpu
->
psLangevinParameters
)[
5
]
=
V
;
(
*
gpu
->
psLangevinParameters
)[
6
]
=
X
;
(
*
gpu
->
psLangevinParameters
)[
7
]
=
Yv
;
(
*
gpu
->
psLangevinParameters
)[
8
]
=
Yx
;
(
*
gpu
->
psLangevinParameters
)[
9
]
=
fix1
;
(
*
gpu
->
psLangevinParameters
)[
10
]
=
oneOverFix1
;
(
*
gpu
->
psLangevinParameters
)[
0
]
=
(
float
)
EM
;
(
*
gpu
->
psLangevinParameters
)[
1
]
=
(
float
)
EM
;
(
*
gpu
->
psLangevinParameters
)[
2
]
=
(
float
)
DOverTauC
;
(
*
gpu
->
psLangevinParameters
)[
3
]
=
(
float
)
TauOneMinusEM
;
(
*
gpu
->
psLangevinParameters
)[
4
]
=
(
float
)
TauDOverEMMinusOne
;
(
*
gpu
->
psLangevinParameters
)[
5
]
=
(
float
)
V
;
(
*
gpu
->
psLangevinParameters
)[
6
]
=
(
float
)
X
;
(
*
gpu
->
psLangevinParameters
)[
7
]
=
(
float
)
Yv
;
(
*
gpu
->
psLangevinParameters
)[
8
]
=
(
float
)
Yx
;
(
*
gpu
->
psLangevinParameters
)[
9
]
=
(
float
)
fix1
;
(
*
gpu
->
psLangevinParameters
)[
10
]
=
(
float
)
oneOverFix1
;
gpu
->
psLangevinParameters
->
Upload
();
gpu
->
psStepSize
->
Download
();
(
*
gpu
->
psStepSize
)[
0
].
y
=
deltaT
;
...
...
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp
View file @
c3af8f4d
...
...
@@ -35,7 +35,7 @@
// In case we're using some primitive version of Visual Studio this will
// make sure that erf() and erfc() are defined.
#include "MSVC_erfc.h"
#include "
openmm/internal/
MSVC_erfc.h"
using
std
::
vector
;
...
...
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp.Ewald-optimized
deleted
100644 → 0
View file @
986d88af
This diff is collapsed.
Click to expand it.
platforms/reference/src/SimTKReference/ReferenceLJCoulombIxn.cpp.Ewald-vanilla
deleted
100644 → 0
View file @
986d88af
This diff is collapsed.
Click to expand it.
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