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
832794f5
"wrappers/python/src/vscode:/vscode.git/clone" did not exist on "a7bc22fbee98568499f4da23d73f68f035df8994"
Commit
832794f5
authored
Jan 25, 2012
by
Peter Eastman
Browse files
Tony's changes to fix errors on Windows
parent
94ecc958
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
10 deletions
+16
-10
olla/src/Platform.cpp
olla/src/Platform.cpp
+3
-3
platforms/opencl/EncodeCLFiles.cmake
platforms/opencl/EncodeCLFiles.cmake
+8
-3
platforms/opencl/src/OpenCLKernelSources.h.in
platforms/opencl/src/OpenCLKernelSources.h.in
+2
-1
platforms/opencl/src/OpenCLSort.h
platforms/opencl/src/OpenCLSort.h
+1
-1
platforms/reference/src/SimTKReference/ReferenceCCMAAlgorithm.cpp
...s/reference/src/SimTKReference/ReferenceCCMAAlgorithm.cpp
+2
-2
No files found.
olla/src/Platform.cpp
View file @
832794f5
...
...
@@ -159,9 +159,9 @@ static HMODULE loadOneLibrary(const string& file) {
HMODULE
handle
=
LoadLibrary
(
file
.
c_str
());
SetErrorMode
(
oldErrorMode
);
// Restore previous error mode.
if
(
handle
==
NULL
)
{
string
message
;
stringstream
(
message
)
<<
"Error loading library "
<<
file
<<
": "
<<
GetLastError
();
throw
OpenMMException
(
message
);
string
stream
message
;
message
<<
"Error loading library "
<<
file
<<
": "
<<
GetLastError
();
throw
OpenMMException
(
message
.
str
()
);
}
return
handle
;
}
...
...
platforms/opencl/EncodeCLFiles.cmake
View file @
832794f5
...
...
@@ -5,9 +5,14 @@ CONFIGURE_FILE(${CL_SOURCE_DIR}/${CL_SOURCE_CLASS}.cpp.in ${CL_KERNELS_CPP})
FOREACH
(
file
${
OPENCL_KERNELS
}
)
# Load the file contents and process it.
FILE
(
STRINGS
${
file
}
file_content NEWLINE_CONSUME
)
STRING
(
REPLACE \\\n \\\\\n file_content
"
${
file_content
}
"
)
STRING
(
REPLACE \" \\\" file_content
"
${
file_content
}
"
)
STRING
(
REPLACE \n \\n\"\n\" file_content
"
${
file_content
}
"
)
# Replace all backslashes by double backslashes as they are being put in a C string.
# Be careful not to replace the backslash before a semicolon as that is the CMAKE
# internal escaping of a semicolon to prevent it from acting as a list seperator.
STRING
(
REGEX REPLACE
"
\\\\
([^;])"
"
\\\\\\\\\\
1"
file_content
"
${
file_content
}
"
)
# Escape double quotes as being put in a C string.
STRING
(
REPLACE
"
\"
"
"
\\\"
"
file_content
"
${
file_content
}
"
)
# Split in separate C strings for each line.
STRING
(
REPLACE
"
\n
"
"
\\
n
\"\n\"
"
file_content
"
${
file_content
}
"
)
# Determine a name for the variable that will contain this file's contents
FILE
(
RELATIVE_PATH filename
${
CL_SOURCE_DIR
}
/kernels
${
file
}
)
...
...
platforms/opencl/src/OpenCLKernelSources.h.in
View file @
832794f5
...
...
@@ -27,6 +27,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* -------------------------------------------------------------------------- */
#include "openmm/internal/windowsExport.h"
#include <string>
namespace OpenMM {
...
...
@@ -37,7 +38,7 @@ namespace OpenMM {
* kernels subfolder.
*/
class OpenCLKernelSources {
class
OPENMM_EXPORT
OpenCLKernelSources {
public:
@CL_FILE_DECLARATIONS@
};
...
...
platforms/opencl/src/OpenCLSort.h
View file @
832794f5
...
...
@@ -75,7 +75,7 @@ namespace OpenMM {
*/
template
<
class
TRAIT
>
class
OPENMM_EXPORT
OpenCLSort
{
class
OpenCLSort
{
public:
/**
* Create an OpenCLSort object for sorting data of a particular type.
...
...
platforms/reference/src/SimTKReference/ReferenceCCMAAlgorithm.cpp
View file @
832794f5
...
...
@@ -344,7 +344,7 @@ void ReferenceCCMAAlgorithm::setTolerance( RealOpenMM tolerance ){
int
ReferenceCCMAAlgorithm
::
apply
(
int
numberOfAtoms
,
vector
<
RealVec
>&
atomCoordinates
,
vector
<
RealVec
>&
atomCoordinatesP
,
vector
<
RealOpenMM
>&
inverseMasses
){
applyConstraints
(
numberOfAtoms
,
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
false
);
return
applyConstraints
(
numberOfAtoms
,
atomCoordinates
,
atomCoordinatesP
,
inverseMasses
,
false
);
}
/**---------------------------------------------------------------------------------------
...
...
@@ -363,7 +363,7 @@ int ReferenceCCMAAlgorithm::apply( int numberOfAtoms, vector<RealVec>& atomCoord
int
ReferenceCCMAAlgorithm
::
applyToVelocities
(
int
numberOfAtoms
,
std
::
vector
<
OpenMM
::
RealVec
>&
atomCoordinates
,
std
::
vector
<
OpenMM
::
RealVec
>&
velocities
,
std
::
vector
<
RealOpenMM
>&
inverseMasses
)
{
applyConstraints
(
numberOfAtoms
,
atomCoordinates
,
velocities
,
inverseMasses
,
true
);
return
applyConstraints
(
numberOfAtoms
,
atomCoordinates
,
velocities
,
inverseMasses
,
true
);
}
int
ReferenceCCMAAlgorithm
::
applyConstraints
(
int
numberOfAtoms
,
vector
<
RealVec
>&
atomCoordinates
,
...
...
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