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
b256555e
Commit
b256555e
authored
Dec 12, 2012
by
Peter Eastman
Browse files
Fixed compilation errors on Windows
parent
59b69776
Changes
72
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
146 additions
and
65 deletions
+146
-65
plugins/amoeba/serialization/include/openmm/serialization/AmoebaStretchBendForceProxy.h
...nclude/openmm/serialization/AmoebaStretchBendForceProxy.h
+2
-2
plugins/amoeba/serialization/include/openmm/serialization/AmoebaTorsionTorsionForceProxy.h
...ude/openmm/serialization/AmoebaTorsionTorsionForceProxy.h
+2
-2
plugins/amoeba/serialization/include/openmm/serialization/AmoebaVdwForceProxy.h
...zation/include/openmm/serialization/AmoebaVdwForceProxy.h
+2
-2
plugins/amoeba/serialization/include/openmm/serialization/AmoebaWcaDispersionForceProxy.h
...lude/openmm/serialization/AmoebaWcaDispersionForceProxy.h
+2
-2
plugins/amoeba/serialization/include/openmm/serialization/internal/windowsExportAmoebaSerialization.h
...serialization/internal/windowsExportAmoebaSerialization.h
+41
-0
plugins/amoeba/wrappers/CWrapper_Header.xslt
plugins/amoeba/wrappers/CWrapper_Header.xslt
+15
-15
plugins/amoeba/wrappers/CWrapper_Source.xslt
plugins/amoeba/wrappers/CWrapper_Source.xslt
+20
-20
plugins/amoeba/wrappers/FortranWrapper_Source.xslt
plugins/amoeba/wrappers/FortranWrapper_Source.xslt
+17
-17
plugins/rpmd/CMakeLists.txt
plugins/rpmd/CMakeLists.txt
+2
-2
plugins/rpmd/openmmapi/include/openmm/RPMDIntegrator.h
plugins/rpmd/openmmapi/include/openmm/RPMDIntegrator.h
+2
-2
plugins/rpmd/openmmapi/include/openmm/internal/windowsExportRpmd.h
...pmd/openmmapi/include/openmm/internal/windowsExportRpmd.h
+41
-0
plugins/rpmd/platforms/reference/src/ReferenceRpmdKernelFactory.cpp
...md/platforms/reference/src/ReferenceRpmdKernelFactory.cpp
+0
-1
No files found.
plugins/amoeba/serialization/include/openmm/serialization/AmoebaStretchBendForceProxy.h
View file @
b256555e
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/windowsExport.h"
#include "openmm/
serialization/
internal/windowsExport
AmoebaSerialization
.h"
#include "openmm/serialization/SerializationProxy.h"
#include "openmm/serialization/SerializationProxy.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -41,7 +41,7 @@ namespace OpenMM {
...
@@ -41,7 +41,7 @@ namespace OpenMM {
* This is a proxy for serializing AmoebaStretchBendForce objects.
* This is a proxy for serializing AmoebaStretchBendForce objects.
*/
*/
class
OPENMM_EXPORT
AmoebaStretchBendForceProxy
:
public
SerializationProxy
{
class
OPENMM_EXPORT
_AMOEBA_SERIALIZATION
AmoebaStretchBendForceProxy
:
public
SerializationProxy
{
public:
public:
AmoebaStretchBendForceProxy
();
AmoebaStretchBendForceProxy
();
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
...
...
plugins/amoeba/serialization/include/openmm/serialization/AmoebaTorsionTorsionForceProxy.h
View file @
b256555e
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/windowsExport.h"
#include "openmm/
serialization/
internal/windowsExport
AmoebaSerialization
.h"
#include "openmm/serialization/SerializationProxy.h"
#include "openmm/serialization/SerializationProxy.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -41,7 +41,7 @@ namespace OpenMM {
...
@@ -41,7 +41,7 @@ namespace OpenMM {
* This is a proxy for serializing AmoebaTorsionTorsionForce objects.
* This is a proxy for serializing AmoebaTorsionTorsionForce objects.
*/
*/
class
OPENMM_EXPORT
AmoebaTorsionTorsionForceProxy
:
public
SerializationProxy
{
class
OPENMM_EXPORT
_AMOEBA_SERIALIZATION
AmoebaTorsionTorsionForceProxy
:
public
SerializationProxy
{
public:
public:
AmoebaTorsionTorsionForceProxy
();
AmoebaTorsionTorsionForceProxy
();
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
...
...
plugins/amoeba/serialization/include/openmm/serialization/AmoebaVdwForceProxy.h
View file @
b256555e
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/windowsExport.h"
#include "openmm/
serialization/
internal/windowsExport
AmoebaSerialization
.h"
#include "openmm/serialization/SerializationProxy.h"
#include "openmm/serialization/SerializationProxy.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -41,7 +41,7 @@ namespace OpenMM {
...
@@ -41,7 +41,7 @@ namespace OpenMM {
* This is a proxy for serializing AmoebaVdwForce objects.
* This is a proxy for serializing AmoebaVdwForce objects.
*/
*/
class
OPENMM_EXPORT
AmoebaVdwForceProxy
:
public
SerializationProxy
{
class
OPENMM_EXPORT
_AMOEBA_SERIALIZATION
AmoebaVdwForceProxy
:
public
SerializationProxy
{
public:
public:
AmoebaVdwForceProxy
();
AmoebaVdwForceProxy
();
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
...
...
plugins/amoeba/serialization/include/openmm/serialization/AmoebaWcaDispersionForceProxy.h
View file @
b256555e
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
* -------------------------------------------------------------------------- */
#include "openmm/internal/windowsExport.h"
#include "openmm/
serialization/
internal/windowsExport
AmoebaSerialization
.h"
#include "openmm/serialization/SerializationProxy.h"
#include "openmm/serialization/SerializationProxy.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -41,7 +41,7 @@ namespace OpenMM {
...
@@ -41,7 +41,7 @@ namespace OpenMM {
* This is a proxy for serializing AmoebaWcaDispersionForce objects.
* This is a proxy for serializing AmoebaWcaDispersionForce objects.
*/
*/
class
OPENMM_EXPORT
AmoebaWcaDispersionForceProxy
:
public
SerializationProxy
{
class
OPENMM_EXPORT
_AMOEBA_SERIALIZATION
AmoebaWcaDispersionForceProxy
:
public
SerializationProxy
{
public:
public:
AmoebaWcaDispersionForceProxy
();
AmoebaWcaDispersionForceProxy
();
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
void
serialize
(
const
void
*
object
,
SerializationNode
&
node
)
const
;
...
...
plugins/amoeba/serialization/include/openmm/serialization/internal/windowsExportAmoebaSerialization.h
0 → 100644
View file @
b256555e
#ifndef OPENMM_WINDOWSEXPORTAMOEBASERIALIZATION_H_
#define OPENMM_WINDOWSEXPORTAMOEBASERIALIZATION_H_
/*
* Shared libraries are messy in Visual Studio. We have to distinguish three
* cases:
* (1) this header is being used to build the OpenMM shared library
* (dllexport)
* (2) this header is being used by a *client* of the OpenMM shared
* library (dllimport)
* (3) we are building the OpenMM static library, or the client is
* being compiled with the expectation of linking with the
* OpenMM static library (nothing special needed)
* In the CMake script for building this library, we define one of the symbols
* OPENMM_AMOEBA_SERIALIZATION_BUILDING_{SHARED|STATIC}_LIBRARY
* Client code normally has no special symbol defined, in which case we'll
* assume it wants to use the shared library. However, if the client defines
* the symbol OPENMM_USE_STATIC_LIBRARIES we'll suppress the dllimport so
* that the client code can be linked with static libraries. Note that
* the client symbol is not library dependent, while the library symbols
* affect only the OpenMM library, meaning that other libraries can
* be clients of this one. However, we are assuming all-static or all-shared.
*/
#ifdef _MSC_VER
// We don't want to hear about how sprintf is "unsafe".
#pragma warning(disable:4996)
// Keep MS VC++ quiet about lack of dll export of private members.
#pragma warning(disable:4251)
#if defined(OPENMM_AMOEBA_SERIALIZATION_BUILDING_SHARED_LIBRARY)
#define OPENMM_EXPORT_AMOEBA_SERIALIZATION __declspec(dllexport)
#elif defined(OPENMM_AMOEBA_SERIALIZATION_BUILDING_STATIC_LIBRARY) || defined(OPENMM_AMOEBA_SERIALIZATION_USE_STATIC_LIBRARIES)
#define OPENMM_EXPORT_AMOEBA_SERIALIZATION
#else
#define OPENMM_EXPORT_AMOEBA_SERIALIZATION __declspec(dllimport) // i.e., a client of a shared library
#endif
#else
#define OPENMM_EXPORT_AMOEBA_SERIALIZATION // Linux, Mac
#endif
#endif // OPENMM_WINDOWSEXPORTAMOEBASERIALIZATION_H_
plugins/amoeba/wrappers/CWrapper_Header.xslt
View file @
b256555e
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
#ifndef AMOEBA_OPENMM_CWRAPPER_H_
#ifndef AMOEBA_OPENMM_CWRAPPER_H_
#define AMOEBA_OPENMM_CWRAPPER_H_
#define AMOEBA_OPENMM_CWRAPPER_H_
#ifndef OPENMM_EXPORT
#ifndef OPENMM_EXPORT
_AMOEBA
#define OPENMM_EXPORT
#define OPENMM_EXPORT
_AMOEBA
#endif
#endif
/* Global Constants */
/* Global Constants */
...
@@ -54,9 +54,9 @@ extern "C" {
...
@@ -54,9 +54,9 @@ extern "C" {
#endif
#endif
/* OpenMM_3D_DoubleArray */
/* OpenMM_3D_DoubleArray */
OPENMM_EXPORT OpenMM_3D_DoubleArray* OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);
OPENMM_EXPORT
_AMOEBA
OpenMM_3D_DoubleArray* OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);
OPENMM_EXPORT void OpenMM_3D_DoubleArray_set(OpenMM_3D_DoubleArray* array, int index1, int index2, OpenMM_DoubleArray* values);
OPENMM_EXPORT
_AMOEBA
void OpenMM_3D_DoubleArray_set(OpenMM_3D_DoubleArray* array, int index1, int index2, OpenMM_DoubleArray* values);
OPENMM_EXPORT void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array);
OPENMM_EXPORT
_AMOEBA
void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array);
<xsl:call-template
name=
"primitive_array"
>
<xsl:call-template
name=
"primitive_array"
>
<xsl:with-param
name=
"element_type"
select=
"'int'"
/>
<xsl:with-param
name=
"element_type"
select=
"'int'"
/>
...
@@ -80,13 +80,13 @@ OPENMM_EXPORT void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array);
...
@@ -80,13 +80,13 @@ OPENMM_EXPORT void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array);
<xsl:param
name=
"element_type"
/>
<xsl:param
name=
"element_type"
/>
<xsl:param
name=
"name"
/>
<xsl:param
name=
"name"
/>
/*
<xsl:value-of
select=
"$name"
/>
*/
/*
<xsl:value-of
select=
"$name"
/>
*/
extern OPENMM_EXPORT
<xsl:value-of
select=
"$name"
/>
*
<xsl:value-of
select=
"$name"
/>
_create(int size);
extern OPENMM_EXPORT
_AMOEBA
<xsl:value-of
select=
"$name"
/>
*
<xsl:value-of
select=
"$name"
/>
_create(int size);
extern OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_destroy(
<xsl:value-of
select=
"$name"
/>
* array);
extern OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_destroy(
<xsl:value-of
select=
"$name"
/>
* array);
extern OPENMM_EXPORT int
<xsl:value-of
select=
"$name"
/>
_getSize(const
<xsl:value-of
select=
"$name"
/>
* array);
extern OPENMM_EXPORT
_AMOEBA
int
<xsl:value-of
select=
"$name"
/>
_getSize(const
<xsl:value-of
select=
"$name"
/>
* array);
extern OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_resize(
<xsl:value-of
select=
"$name"
/>
* array, int size);
extern OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_resize(
<xsl:value-of
select=
"$name"
/>
* array, int size);
extern OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_append(
<xsl:value-of
select=
"$name"
/>
* array,
<xsl:value-of
select=
"$element_type"
/>
value);
extern OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_append(
<xsl:value-of
select=
"$name"
/>
* array,
<xsl:value-of
select=
"$element_type"
/>
value);
extern OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_set(
<xsl:value-of
select=
"$name"
/>
* array, int index,
<xsl:value-of
select=
"$element_type"
/>
value);
extern OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_set(
<xsl:value-of
select=
"$name"
/>
* array, int index,
<xsl:value-of
select=
"$element_type"
/>
value);
extern OPENMM_EXPORT
<xsl:value-of
select=
"concat($element_type, ' ', $name)"
/>
_get(const
<xsl:value-of
select=
"$name"
/>
* array, int index);
extern OPENMM_EXPORT
_AMOEBA
<xsl:value-of
select=
"concat($element_type, ' ', $name)"
/>
_get(const
<xsl:value-of
select=
"$name"
/>
* array, int index);
</xsl:template>
</xsl:template>
<!-- Print out information for a class -->
<!-- Print out information for a class -->
...
@@ -110,7 +110,7 @@ extern OPENMM_EXPORT <xsl:value-of select="concat($element_type, ' ', $name)"/>_
...
@@ -110,7 +110,7 @@ extern OPENMM_EXPORT <xsl:value-of select="concat($element_type, ' ', $name)"/>_
</xsl:call-template>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:if>
</xsl:if>
extern OPENMM_EXPORT void OpenMM_
<xsl:value-of
select=
"concat(@name, '_destroy(OpenMM_', @name, '* target);')"
/>
extern OPENMM_EXPORT
_AMOEBA
void OpenMM_
<xsl:value-of
select=
"concat(@name, '_destroy(OpenMM_', @name, '* target);')"
/>
<!-- Methods -->
<!-- Methods -->
<xsl:variable
name=
"methods"
select=
"/GCC_XML/Method[@context=$class_id and @access='public']"
/>
<xsl:variable
name=
"methods"
select=
"/GCC_XML/Method[@context=$class_id and @access='public']"
/>
<xsl:for-each
select=
"$methods"
>
<xsl:for-each
select=
"$methods"
>
...
@@ -143,7 +143,7 @@ typedef enum {
...
@@ -143,7 +143,7 @@ typedef enum {
<!-- Print out the declaration for a constructor -->
<!-- Print out the declaration for a constructor -->
<xsl:template
name=
"constructor"
>
<xsl:template
name=
"constructor"
>
<xsl:param
name=
"suffix"
/>
<xsl:param
name=
"suffix"
/>
extern OPENMM_EXPORT OpenMM_
<xsl:value-of
select=
"concat(@name, '* OpenMM_', @name, '_create', $suffix, '(')"
/>
extern OPENMM_EXPORT
_AMOEBA
OpenMM_
<xsl:value-of
select=
"concat(@name, '* OpenMM_', @name, '_create', $suffix, '(')"
/>
<xsl:for-each
select=
"Argument"
>
<xsl:for-each
select=
"Argument"
>
<xsl:if
test=
"position() > 1"
>
,
</xsl:if>
<xsl:if
test=
"position() > 1"
>
,
</xsl:if>
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@type"
/></xsl:call-template>
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@type"
/></xsl:call-template>
...
@@ -155,7 +155,7 @@ extern OPENMM_EXPORT OpenMM_<xsl:value-of select="concat(@name, '* OpenMM_', @na
...
@@ -155,7 +155,7 @@ extern OPENMM_EXPORT OpenMM_<xsl:value-of select="concat(@name, '* OpenMM_', @na
<!-- Print out the declaration for a method -->
<!-- Print out the declaration for a method -->
<xsl:template
name=
"method"
>
<xsl:template
name=
"method"
>
<xsl:param
name=
"class_name"
/>
<xsl:param
name=
"class_name"
/>
extern OPENMM_EXPORT
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@returns"
/></xsl:call-template><xsl:value-of
select=
"concat(' OpenMM_', $class_name, '_', @name, '(')"
/>
extern OPENMM_EXPORT
_AMOEBA
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@returns"
/></xsl:call-template><xsl:value-of
select=
"concat(' OpenMM_', $class_name, '_', @name, '(')"
/>
<xsl:if
test=
"not(@static='1')"
>
<xsl:if
test=
"not(@static='1')"
>
<xsl:if
test=
"@const='1'"
>
<xsl:if
test=
"@const='1'"
>
<xsl:value-of
select=
"'const '"
/>
<xsl:value-of
select=
"'const '"
/>
...
...
plugins/amoeba/wrappers/CWrapper_Source.xslt
View file @
b256555e
...
@@ -49,26 +49,26 @@ using namespace std;
...
@@ -49,26 +49,26 @@ using namespace std;
extern "C" {
extern "C" {
/* OpenMM_2D_IntArray */
/* OpenMM_2D_IntArray */
OPENMM_EXPORT OpenMM_2D_IntArray* OpenMM_2D_IntArray_create(int size) {
OPENMM_EXPORT
_AMOEBA
OpenMM_2D_IntArray* OpenMM_2D_IntArray_create(int size) {
return reinterpret_cast
<
OpenMM_2D_IntArray*
>
(new vector
<
vector
<
int
>
>
(size));
return reinterpret_cast
<
OpenMM_2D_IntArray*
>
(new vector
<
vector
<
int
>
>
(size));
}
}
OPENMM_EXPORT void OpenMM_2D_IntArray_destroy(OpenMM_2D_IntArray* array) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_2D_IntArray_destroy(OpenMM_2D_IntArray* array) {
delete reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array);
delete reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array);
}
}
OPENMM_EXPORT int OpenMM_2D_IntArray_getSize(const OpenMM_2D_IntArray* array) {
OPENMM_EXPORT
_AMOEBA
int OpenMM_2D_IntArray_getSize(const OpenMM_2D_IntArray* array) {
return reinterpret_cast
<
const vector
<
vector
<
int
>
>
*
>
(array)->size();
return reinterpret_cast
<
const vector
<
vector
<
int
>
>
*
>
(array)->size();
}
}
OPENMM_EXPORT void OpenMM_2D_IntArray_resize(OpenMM_2D_IntArray* array, int size) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_2D_IntArray_resize(OpenMM_2D_IntArray* array, int size) {
reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array)->resize(size);
reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array)->resize(size);
}
}
OPENMM_EXPORT void OpenMM_2D_IntArray_append(OpenMM_2D_IntArray* array, int index1, int value ) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_2D_IntArray_append(OpenMM_2D_IntArray* array, int index1, int value ) {
vector
<
vector
<
int
>
>
* array2DInt = reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array);
vector
<
vector
<
int
>
>
* array2DInt = reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array);
if( array2DInt->size()
<
= index1 ){
if( array2DInt->size()
<
= index1 ){
array2DInt->resize( index1+1 );
array2DInt->resize( index1+1 );
}
}
(*array2DInt)[index1].push_back( value );
(*array2DInt)[index1].push_back( value );
}
}
OPENMM_EXPORT void OpenMM_2D_IntArray_set(OpenMM_2D_IntArray* array, int index1, int index2, int value) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_2D_IntArray_set(OpenMM_2D_IntArray* array, int index1, int index2, int value) {
vector
<
vector
<
int
>
>
* array2DInt = reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array);
vector
<
vector
<
int
>
>
* array2DInt = reinterpret_cast
<
vector
<
vector
<
int
>
>
*
>
(array);
if( array2DInt->size()
<
= index1 ){
if( array2DInt->size()
<
= index1 ){
array2DInt->resize( index1+1 );
array2DInt->resize( index1+1 );
...
@@ -78,7 +78,7 @@ OPENMM_EXPORT void OpenMM_2D_IntArray_set(OpenMM_2D_IntArray* array, int index1,
...
@@ -78,7 +78,7 @@ OPENMM_EXPORT void OpenMM_2D_IntArray_set(OpenMM_2D_IntArray* array, int index1,
}
}
(*array2DInt)[index1][index2] = value;
(*array2DInt)[index1][index2] = value;
}
}
OPENMM_EXPORT void OpenMM_2D_IntArray_get(const OpenMM_2D_IntArray* array, int index1, int index2, int* value) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_2D_IntArray_get(const OpenMM_2D_IntArray* array, int index1, int index2, int* value) {
const vector
<
vector
<
int
>
>
* array2DInt = reinterpret_cast
<
const vector
<
vector
<
int
>
>
*
>
(array);
const vector
<
vector
<
int
>
>
* array2DInt = reinterpret_cast
<
const vector
<
vector
<
int
>
>
*
>
(array);
if ( array2DInt->size()
<
= index1 )
if ( array2DInt->size()
<
= index1 )
throw OpenMMException("OpenMM_2D_IntArray_get: first index out of range.");
throw OpenMMException("OpenMM_2D_IntArray_get: first index out of range.");
...
@@ -89,7 +89,7 @@ OPENMM_EXPORT void OpenMM_2D_IntArray_get(const OpenMM_2D_IntArray* array, int i
...
@@ -89,7 +89,7 @@ OPENMM_EXPORT void OpenMM_2D_IntArray_get(const OpenMM_2D_IntArray* array, int i
}
}
/* OpenMM_3D_DoubleArray */
/* OpenMM_3D_DoubleArray */
OPENMM_EXPORT OpenMM_3D_DoubleArray* OpenMM_3D_DoubleArray_create(int size1, int size2, int size3) {
OPENMM_EXPORT
_AMOEBA
OpenMM_3D_DoubleArray* OpenMM_3D_DoubleArray_create(int size1, int size2, int size3) {
int ii, jj;
int ii, jj;
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
* v3D_Array = new std::vector
<
std::vector
<
std::vector
<
double
>
>
>
(size1);
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
* v3D_Array = new std::vector
<
std::vector
<
std::vector
<
double
>
>
>
(size1);
...
@@ -102,7 +102,7 @@ OPENMM_EXPORT OpenMM_3D_DoubleArray* OpenMM_3D_DoubleArray_create(int size1, int
...
@@ -102,7 +102,7 @@ OPENMM_EXPORT OpenMM_3D_DoubleArray* OpenMM_3D_DoubleArray_create(int size1, int
return reinterpret_cast
<
OpenMM_3D_DoubleArray*
>
(v3D_Array);
return reinterpret_cast
<
OpenMM_3D_DoubleArray*
>
(v3D_Array);
}
}
OPENMM_EXPORT void OpenMM_3D_DoubleArray_set(OpenMM_3D_DoubleArray* array, int index1, int index2, OpenMM_DoubleArray* values) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_3D_DoubleArray_set(OpenMM_3D_DoubleArray* array, int index1, int index2, OpenMM_DoubleArray* values) {
unsigned int ii;
unsigned int ii;
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
* v3D_Array = reinterpret_cast
<
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
*
>
(array);
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
* v3D_Array = reinterpret_cast
<
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
*
>
(array);
std::vector
<
double
>
* value_array = reinterpret_cast
<
std::vector
<
double
>
*
>
(values);
std::vector
<
double
>
* value_array = reinterpret_cast
<
std::vector
<
double
>
*
>
(values);
...
@@ -111,7 +111,7 @@ OPENMM_EXPORT void OpenMM_3D_DoubleArray_set(OpenMM_3D_DoubleArray* array, int i
...
@@ -111,7 +111,7 @@ OPENMM_EXPORT void OpenMM_3D_DoubleArray_set(OpenMM_3D_DoubleArray* array, int i
}
}
}
}
OPENMM_EXPORT void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array) {
OPENMM_EXPORT
_AMOEBA
void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array) {
delete reinterpret_cast
<
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
*
>
(array);
delete reinterpret_cast
<
std::vector
<
std::vector
<
std::vector
<
double
>
>
>
*
>
(array);
}
}
...
@@ -134,25 +134,25 @@ OPENMM_EXPORT void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array)
...
@@ -134,25 +134,25 @@ OPENMM_EXPORT void OpenMM_3D_DoubleArray_destroy( OpenMM_3D_DoubleArray* array)
<xsl:param
name=
"element_type"
/>
<xsl:param
name=
"element_type"
/>
<xsl:param
name=
"name"
/>
<xsl:param
name=
"name"
/>
/*
<xsl:value-of
select=
"$name"
/>
*/
/*
<xsl:value-of
select=
"$name"
/>
*/
OPENMM_EXPORT
<xsl:value-of
select=
"$name"
/>
*
<xsl:value-of
select=
"$name"
/>
_create(int size) {
OPENMM_EXPORT
_AMOEBA
<xsl:value-of
select=
"$name"
/>
*
<xsl:value-of
select=
"$name"
/>
_create(int size) {
return reinterpret_cast
<
<xsl:value-of
select=
"$name"
/>
*
>
(new vector
<
<xsl:value-of
select=
"$element_type"
/>
>
(size));
return reinterpret_cast
<
<xsl:value-of
select=
"$name"
/>
*
>
(new vector
<
<xsl:value-of
select=
"$element_type"
/>
>
(size));
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_destroy(
<xsl:value-of
select=
"$name"
/>
* array) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_destroy(
<xsl:value-of
select=
"$name"
/>
* array) {
delete reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array);
delete reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array);
}
}
OPENMM_EXPORT int
<xsl:value-of
select=
"$name"
/>
_getSize(const
<xsl:value-of
select=
"$name"
/>
* array) {
OPENMM_EXPORT
_AMOEBA
int
<xsl:value-of
select=
"$name"
/>
_getSize(const
<xsl:value-of
select=
"$name"
/>
* array) {
return reinterpret_cast
<
const vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array)->size();
return reinterpret_cast
<
const vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array)->size();
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_resize(
<xsl:value-of
select=
"$name"
/>
* array, int size) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_resize(
<xsl:value-of
select=
"$name"
/>
* array, int size) {
reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array)->resize(size);
reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array)->resize(size);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_append(
<xsl:value-of
select=
"$name"
/>
* array,
<xsl:value-of
select=
"$element_type"
/>
value) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_append(
<xsl:value-of
select=
"$name"
/>
* array,
<xsl:value-of
select=
"$element_type"
/>
value) {
reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array)->push_back(value);
reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array)->push_back(value);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name"
/>
_set(
<xsl:value-of
select=
"$name"
/>
* array, int index,
<xsl:value-of
select=
"$element_type"
/>
value) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name"
/>
_set(
<xsl:value-of
select=
"$name"
/>
* array, int index,
<xsl:value-of
select=
"$element_type"
/>
value) {
(*reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array))[index] = value;
(*reinterpret_cast
<
vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array))[index] = value;
}
}
OPENMM_EXPORT
<info
xml:space=
"preserve"
>
<xsl:value-of
select=
"$element_type"
/>
<xsl:value-of
select=
"$name"
/>
_get(const
<xsl:value-of
select=
"$name"
/>
* array, int index) {
OPENMM_EXPORT
_AMOEBA
<info
xml:space=
"preserve"
>
<xsl:value-of
select=
"$element_type"
/>
<xsl:value-of
select=
"$name"
/>
_get(const
<xsl:value-of
select=
"$name"
/>
* array, int index) {
return (*reinterpret_cast
<
const vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array))[index];
return (*reinterpret_cast
<
const vector
<
<xsl:value-of
select=
"$element_type"
/>
>
*
>
(array))[index];
}
}
</info>
</info>
...
@@ -173,7 +173,7 @@ OPENMM_EXPORT <info xml:space="preserve"> <xsl:value-of select="$element_type"/>
...
@@ -173,7 +173,7 @@ OPENMM_EXPORT <info xml:space="preserve"> <xsl:value-of select="$element_type"/>
</xsl:call-template>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:if>
</xsl:if>
OPENMM_EXPORT void OpenMM_
<xsl:value-of
select=
"concat(@name, '_destroy(OpenMM_', @name, '* target) {')"
/>
OPENMM_EXPORT
_AMOEBA
void OpenMM_
<xsl:value-of
select=
"concat(@name, '_destroy(OpenMM_', @name, '* target) {')"
/>
delete reinterpret_cast
<
<xsl:value-of
select=
"@name"
/>
*
>
(target);
delete reinterpret_cast
<
<xsl:value-of
select=
"@name"
/>
*
>
(target);
}
}
<!-- Methods -->
<!-- Methods -->
...
@@ -198,7 +198,7 @@ OPENMM_EXPORT void OpenMM_<xsl:value-of select="concat(@name, '_destroy(OpenMM_'
...
@@ -198,7 +198,7 @@ OPENMM_EXPORT void OpenMM_<xsl:value-of select="concat(@name, '_destroy(OpenMM_'
<!-- Print out the definition of a constructor -->
<!-- Print out the definition of a constructor -->
<xsl:template
name=
"constructor"
>
<xsl:template
name=
"constructor"
>
<xsl:param
name=
"suffix"
/>
<xsl:param
name=
"suffix"
/>
OPENMM_EXPORT OpenMM_
<xsl:value-of
select=
"concat(@name, '* OpenMM_', @name, '_create', $suffix, '(')"
/>
OPENMM_EXPORT
_AMOEBA
OpenMM_
<xsl:value-of
select=
"concat(@name, '* OpenMM_', @name, '_create', $suffix, '(')"
/>
<xsl:for-each
select=
"Argument"
>
<xsl:for-each
select=
"Argument"
>
<xsl:if
test=
"position() > 1"
>
,
</xsl:if>
<xsl:if
test=
"position() > 1"
>
,
</xsl:if>
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@type"
/></xsl:call-template>
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@type"
/></xsl:call-template>
...
@@ -223,7 +223,7 @@ OPENMM_EXPORT OpenMM_<xsl:value-of select="concat(@name, '* OpenMM_', @name, '_c
...
@@ -223,7 +223,7 @@ OPENMM_EXPORT OpenMM_<xsl:value-of select="concat(@name, '* OpenMM_', @name, '_c
<xsl:param
name=
"class_id"
/>
<xsl:param
name=
"class_id"
/>
<!-- First the method signature -->
<!-- First the method signature -->
<xsl:value-of
select=
"$newline"
/>
<xsl:value-of
select=
"$newline"
/>
OPENMM_EXPORT
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@returns"
/></xsl:call-template><xsl:value-of
select=
"concat(' OpenMM_', $class_name, '_', @name, '(')"
/>
OPENMM_EXPORT
_AMOEBA
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@returns"
/></xsl:call-template><xsl:value-of
select=
"concat(' OpenMM_', $class_name, '_', @name, '(')"
/>
<xsl:if
test=
"not(@static='1')"
>
<xsl:if
test=
"not(@static='1')"
>
<xsl:if
test=
"@const='1'"
>
<xsl:if
test=
"@const='1'"
>
<xsl:value-of
select=
"'const '"
/>
<xsl:value-of
select=
"'const '"
/>
...
...
plugins/amoeba/wrappers/FortranWrapper_Source.xslt
View file @
b256555e
...
@@ -83,48 +83,48 @@ extern "C" {
...
@@ -83,48 +83,48 @@ extern "C" {
<xsl:variable
name=
"name_lower"
select=
"lower-case($name)"
/>
<xsl:variable
name=
"name_lower"
select=
"lower-case($name)"
/>
<xsl:variable
name=
"name_upper"
select=
"upper-case($name)"
/>
<xsl:variable
name=
"name_upper"
select=
"upper-case($name)"
/>
/*
<xsl:value-of
select=
"$name"
/>
*/
/*
<xsl:value-of
select=
"$name"
/>
*/
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_lower"
/>
_create_(
<xsl:value-of
select=
"$name"
/>
*
&
result, const int
&
size) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_lower"
/>
_create_(
<xsl:value-of
select=
"$name"
/>
*
&
result, const int
&
size) {
result =
<xsl:value-of
select=
"$name"
/>
_create(size);
result =
<xsl:value-of
select=
"$name"
/>
_create(size);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_upper"
/>
_CREATE(
<xsl:value-of
select=
"$name"
/>
*
&
result, const int
&
size) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_upper"
/>
_CREATE(
<xsl:value-of
select=
"$name"
/>
*
&
result, const int
&
size) {
result =
<xsl:value-of
select=
"$name"
/>
_create(size);
result =
<xsl:value-of
select=
"$name"
/>
_create(size);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_lower"
/>
_destroy_(
<xsl:value-of
select=
"$name"
/>
*
&
array) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_lower"
/>
_destroy_(
<xsl:value-of
select=
"$name"
/>
*
&
array) {
<xsl:value-of
select=
"$name"
/>
_destroy(array);
<xsl:value-of
select=
"$name"
/>
_destroy(array);
array = 0;
array = 0;
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_upper"
/>
_DESTROY(
<xsl:value-of
select=
"$name"
/>
*
&
array) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_upper"
/>
_DESTROY(
<xsl:value-of
select=
"$name"
/>
*
&
array) {
<xsl:value-of
select=
"$name"
/>
_destroy(array);
<xsl:value-of
select=
"$name"
/>
_destroy(array);
array = 0;
array = 0;
}
}
OPENMM_EXPORT int
<xsl:value-of
select=
"$name_lower"
/>
_getsize_(const
<xsl:value-of
select=
"$name"
/>
* const
&
array) {
OPENMM_EXPORT
_AMOEBA
int
<xsl:value-of
select=
"$name_lower"
/>
_getsize_(const
<xsl:value-of
select=
"$name"
/>
* const
&
array) {
return
<xsl:value-of
select=
"$name"
/>
_getSize(array);
return
<xsl:value-of
select=
"$name"
/>
_getSize(array);
}
}
OPENMM_EXPORT int
<xsl:value-of
select=
"$name_upper"
/>
_GETSIZE(const
<xsl:value-of
select=
"$name"
/>
* const
&
array) {
OPENMM_EXPORT
_AMOEBA
int
<xsl:value-of
select=
"$name_upper"
/>
_GETSIZE(const
<xsl:value-of
select=
"$name"
/>
* const
&
array) {
return
<xsl:value-of
select=
"$name"
/>
_getSize(array);
return
<xsl:value-of
select=
"$name"
/>
_getSize(array);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_lower"
/>
_resize_(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
size) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_lower"
/>
_resize_(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
size) {
<xsl:value-of
select=
"$name"
/>
_resize(array, size);
<xsl:value-of
select=
"$name"
/>
_resize(array, size);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_upper"
/>
_RESIZE(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
size) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_upper"
/>
_RESIZE(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
size) {
<xsl:value-of
select=
"$name"
/>
_resize(array, size);
<xsl:value-of
select=
"$name"
/>
_resize(array, size);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_lower"
/>
_append_(
<xsl:value-of
select=
"$name"
/>
* const
&
array,
<xsl:value-of
select=
"$element_type"
/>
value) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_lower"
/>
_append_(
<xsl:value-of
select=
"$name"
/>
* const
&
array,
<xsl:value-of
select=
"$element_type"
/>
value) {
<xsl:value-of
select=
"$name"
/>
_append(array, value);
<xsl:value-of
select=
"$name"
/>
_append(array, value);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_upper"
/>
_APPEND(
<xsl:value-of
select=
"$name"
/>
* const
&
array,
<xsl:value-of
select=
"$element_type"
/>
value) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_upper"
/>
_APPEND(
<xsl:value-of
select=
"$name"
/>
* const
&
array,
<xsl:value-of
select=
"$element_type"
/>
value) {
<xsl:value-of
select=
"$name"
/>
_append(array, value);
<xsl:value-of
select=
"$name"
/>
_append(array, value);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_lower"
/>
_set_(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
value) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_lower"
/>
_set_(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
value) {
<xsl:value-of
select=
"$name"
/>
_set(array, index-1, value);
<xsl:value-of
select=
"$name"
/>
_set(array, index-1, value);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_upper"
/>
_SET(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
value) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_upper"
/>
_SET(
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
value) {
<xsl:value-of
select=
"$name"
/>
_set(array, index-1, value);
<xsl:value-of
select=
"$name"
/>
_set(array, index-1, value);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_lower"
/>
_get_(const
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
&
result) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_lower"
/>
_get_(const
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
&
result) {
result =
<xsl:value-of
select=
"$name"
/>
_get(array, index-1);
result =
<xsl:value-of
select=
"$name"
/>
_get(array, index-1);
}
}
OPENMM_EXPORT void
<xsl:value-of
select=
"$name_upper"
/>
_GET(const
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
&
result) {
OPENMM_EXPORT
_AMOEBA
void
<xsl:value-of
select=
"$name_upper"
/>
_GET(const
<xsl:value-of
select=
"$name"
/>
* const
&
array, const int
&
index,
<xsl:value-of
select=
"$element_type"
/>
&
result) {
result =
<xsl:value-of
select=
"$name"
/>
_get(array, index-1);
result =
<xsl:value-of
select=
"$name"
/>
_get(array, index-1);
}
}
</xsl:template>
</xsl:template>
...
@@ -188,7 +188,7 @@ OPENMM_EXPORT void <xsl:value-of select="$name_upper"/>_GET(const <xsl:value-of
...
@@ -188,7 +188,7 @@ OPENMM_EXPORT void <xsl:value-of select="$name_upper"/>_GET(const <xsl:value-of
<xsl:template
name=
"constructor"
>
<xsl:template
name=
"constructor"
>
<xsl:param
name=
"function_name"
/>
<xsl:param
name=
"function_name"
/>
<xsl:param
name=
"suffix"
/>
<xsl:param
name=
"suffix"
/>
OPENMM_EXPORT
<xsl:value-of
select=
"concat('void ', $function_name, '(OpenMM_', @name, '*& result')"
/>
OPENMM_EXPORT
_AMOEBA
<xsl:value-of
select=
"concat('void ', $function_name, '(OpenMM_', @name, '*& result')"
/>
<!-- Generate the list of arguments -->
<!-- Generate the list of arguments -->
<xsl:for-each
select=
"Argument"
>
<xsl:for-each
select=
"Argument"
>
<xsl:value-of
select=
"', '"
/>
<xsl:value-of
select=
"', '"
/>
...
@@ -231,7 +231,7 @@ OPENMM_EXPORT <xsl:value-of select="concat('void ', $function_name, '(OpenMM_',
...
@@ -231,7 +231,7 @@ OPENMM_EXPORT <xsl:value-of select="concat('void ', $function_name, '(OpenMM_',
<!-- Print out the definition of a destructor -->
<!-- Print out the definition of a destructor -->
<xsl:template
name=
"destructor"
>
<xsl:template
name=
"destructor"
>
<xsl:param
name=
"function_name"
/>
<xsl:param
name=
"function_name"
/>
OPENMM_EXPORT
<xsl:value-of
select=
"concat('void ', $function_name, '(OpenMM_', @name, '*& destroy) {')"
/>
OPENMM_EXPORT
_AMOEBA
<xsl:value-of
select=
"concat('void ', $function_name, '(OpenMM_', @name, '*& destroy) {')"
/>
OpenMM_
<xsl:value-of
select=
"concat(@name, '_destroy(destroy);')"
/>
OpenMM_
<xsl:value-of
select=
"concat(@name, '_destroy(destroy);')"
/>
destroy = 0;
destroy = 0;
}
}
...
@@ -245,7 +245,7 @@ OPENMM_EXPORT <xsl:value-of select="concat('void ', $function_name, '(OpenMM_',
...
@@ -245,7 +245,7 @@ OPENMM_EXPORT <xsl:value-of select="concat('void ', $function_name, '(OpenMM_',
<!-- First the method signature -->
<!-- First the method signature -->
<xsl:variable
name=
"has_return"
select=
"@returns=$int_type_id or @returns=$double_type_id"
/>
<xsl:variable
name=
"has_return"
select=
"@returns=$int_type_id or @returns=$double_type_id"
/>
<xsl:variable
name=
"has_return_arg"
select=
"not($has_return or @returns=$void_type_id)"
/>
<xsl:variable
name=
"has_return_arg"
select=
"not($has_return or @returns=$void_type_id)"
/>
OPENMM_EXPORT
<xsl:if
test=
"$has_return"
>
OPENMM_EXPORT
_AMOEBA
<xsl:if
test=
"$has_return"
>
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@returns"
/></xsl:call-template>
<xsl:call-template
name=
"wrap_type"
><xsl:with-param
name=
"type_id"
select=
"@returns"
/></xsl:call-template>
</xsl:if>
</xsl:if>
<xsl:if
test=
"not($has_return)"
>
<xsl:if
test=
"not($has_return)"
>
...
...
plugins/rpmd/CMakeLists.txt
View file @
b256555e
...
@@ -97,11 +97,11 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/reference/src/S
...
@@ -97,11 +97,11 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/platforms/reference/src/S
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
INCLUDE_DIRECTORIES
(
BEFORE
${
CMAKE_CURRENT_SOURCE_DIR
}
/src
)
ADD_LIBRARY
(
${
SHARED_RPMD_TARGET
}
SHARED
${
SOURCE_RPMD_FILES
}
${
SOURCE_RPMD_INCLUDE_FILES
}
${
API_RPMD_ABS_INCLUDE_FILES
}
)
ADD_LIBRARY
(
${
SHARED_RPMD_TARGET
}
SHARED
${
SOURCE_RPMD_FILES
}
${
SOURCE_RPMD_INCLUDE_FILES
}
${
API_RPMD_ABS_INCLUDE_FILES
}
)
SET_TARGET_PROPERTIES
(
${
SHARED_RPMD_TARGET
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
SET_TARGET_PROPERTIES
(
${
SHARED_RPMD_TARGET
}
PROPERTIES COMPILE_FLAGS
"-DOPENMM_
RPMD_
BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY"
)
#IF( CREATE_SERIALIZABLE_OPENMM_RPMD )
#IF( CREATE_SERIALIZABLE_OPENMM_RPMD )
# ADD_LIBRARY(${SHARED_RPMD_SERIALIZABLE_TARGET} SHARED ${SOURCE_RPMD_FILES} ${SOURCE_RPMD_INCLUDE_FILES} ${API_RPMD_ABS_INCLUDE_FILES})
# ADD_LIBRARY(${SHARED_RPMD_SERIALIZABLE_TARGET} SHARED ${SOURCE_RPMD_FILES} ${SOURCE_RPMD_INCLUDE_FILES} ${API_RPMD_ABS_INCLUDE_FILES})
# SET_TARGET_PROPERTIES(${SHARED_RPMD_SERIALIZABLE_TARGET} PROPERTIES COMPILE_FLAGS "-DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DOPENMM_SERIALIZE")
# SET_TARGET_PROPERTIES(${SHARED_RPMD_SERIALIZABLE_TARGET} PROPERTIES COMPILE_FLAGS "-DOPENMM_
RPMD_
BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DOPENMM_SERIALIZE")
# INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../serialization/include)
# INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../serialization/include)
#ENDIF( CREATE_SERIALIZABLE_OPENMM_RPMD )
#ENDIF( CREATE_SERIALIZABLE_OPENMM_RPMD )
...
...
plugins/rpmd/openmmapi/include/openmm/RPMDIntegrator.h
View file @
b256555e
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#include "openmm/Kernel.h"
#include "openmm/Kernel.h"
#include "openmm/State.h"
#include "openmm/State.h"
#include "openmm/Vec3.h"
#include "openmm/Vec3.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/windowsExport
Rpmd
.h"
namespace
OpenMM
{
namespace
OpenMM
{
...
@@ -54,7 +54,7 @@ namespace OpenMM {
...
@@ -54,7 +54,7 @@ namespace OpenMM {
* state information.
* state information.
*/
*/
class
OPENMM_EXPORT
RPMDIntegrator
:
public
Integrator
{
class
OPENMM_EXPORT
_RPMD
RPMDIntegrator
:
public
Integrator
{
public:
public:
/**
/**
* Create a RPMDIntegrator.
* Create a RPMDIntegrator.
...
...
plugins/rpmd/openmmapi/include/openmm/internal/windowsExportRpmd.h
0 → 100644
View file @
b256555e
#ifndef OPENMM_WINDOWSEXPORTRPMD_H_
#define OPENMM_WINDOWSEXPORTRPMD_H_
/*
* Shared libraries are messy in Visual Studio. We have to distinguish three
* cases:
* (1) this header is being used to build the OpenMM shared library
* (dllexport)
* (2) this header is being used by a *client* of the OpenMM shared
* library (dllimport)
* (3) we are building the OpenMM static library, or the client is
* being compiled with the expectation of linking with the
* OpenMM static library (nothing special needed)
* In the CMake script for building this library, we define one of the symbols
* OPENMM_RPMD_BUILDING_{SHARED|STATIC}_LIBRARY
* Client code normally has no special symbol defined, in which case we'll
* assume it wants to use the shared library. However, if the client defines
* the symbol OPENMM_USE_STATIC_LIBRARIES we'll suppress the dllimport so
* that the client code can be linked with static libraries. Note that
* the client symbol is not library dependent, while the library symbols
* affect only the OpenMM library, meaning that other libraries can
* be clients of this one. However, we are assuming all-static or all-shared.
*/
#ifdef _MSC_VER
// We don't want to hear about how sprintf is "unsafe".
#pragma warning(disable:4996)
// Keep MS VC++ quiet about lack of dll export of private members.
#pragma warning(disable:4251)
#if defined(OPENMM_RPMD_BUILDING_SHARED_LIBRARY)
#define OPENMM_EXPORT_RPMD __declspec(dllexport)
#elif defined(OPENMM_RPMD_BUILDING_STATIC_LIBRARY) || defined(OPENMM_RPMD_USE_STATIC_LIBRARIES)
#define OPENMM_EXPORT_RPMD
#else
#define OPENMM_EXPORT_RPMD __declspec(dllimport) // i.e., a client of a shared library
#endif
#else
#define OPENMM_EXPORT_RPMD // Linux, Mac
#endif
#endif // OPENMM_WINDOWSEXPORTRPMD_H_
plugins/rpmd/platforms/reference/src/ReferenceRpmdKernelFactory.cpp
View file @
b256555e
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "ReferenceRpmdKernelFactory.h"
#include "ReferenceRpmdKernelFactory.h"
#include "ReferenceRpmdKernels.h"
#include "ReferenceRpmdKernels.h"
#include "ReferencePlatform.h"
#include "ReferencePlatform.h"
#include "openmm/internal/windowsExport.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/internal/ContextImpl.h"
#include "openmm/OpenMMException.h"
#include "openmm/OpenMMException.h"
...
...
Prev
1
2
3
4
Next
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