Browse Source

Added EXPORTs to fix DLL issues on Windows.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@900 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 17 years ago
parent
commit
0c4648435b
  1. 4
      prism/include/dv.h
  2. 31
      prism/include/sparse.h
  3. 24
      prism/src/sparse/sparse.cc

4
prism/include/dv.h

@ -58,8 +58,8 @@ struct DistVector
int num_dist;
unsigned short *ptrs;
DistVector();
~DistVector();
EXPORT DistVector();
EXPORT ~DistVector();
};
// function prototypes

31
prism/include/sparse.h

@ -28,6 +28,13 @@
#include <cudd.h>
#include <odd.h>
// Flags for building Windows DLLs
#ifdef __MINGW32__
#define EXPORT __declspec(dllexport)
#else
#define EXPORT
#endif
// data structures
// "row major" sparse matrix
@ -45,8 +52,8 @@ struct RMSparseMatrix
unsigned int *cols;
unsigned char *row_counts;
RMSparseMatrix();
~RMSparseMatrix();
EXPORT RMSparseMatrix();
EXPORT ~RMSparseMatrix();
};
// "column major" sparse matrix
@ -64,8 +71,8 @@ struct CMSparseMatrix
unsigned int *rows;
unsigned char *col_counts;
CMSparseMatrix();
~CMSparseMatrix();
EXPORT CMSparseMatrix();
EXPORT ~CMSparseMatrix();
};
// "row/column" sparse matrix
@ -83,8 +90,8 @@ struct RCSparseMatrix
unsigned int *rows;
unsigned int *cols;
RCSparseMatrix();
~RCSparseMatrix();
EXPORT RCSparseMatrix();
EXPORT ~RCSparseMatrix();
};
// "compact modified sparse row" sparse matrix
@ -106,8 +113,8 @@ struct CMSRSparseMatrix
unsigned int *cols;
unsigned char *row_counts;
CMSRSparseMatrix();
~CMSRSparseMatrix();
EXPORT CMSRSparseMatrix();
EXPORT ~CMSRSparseMatrix();
};
// "compact modified sparse column" sparse matrix
@ -129,8 +136,8 @@ struct CMSCSparseMatrix
unsigned int *rows;
unsigned char *col_counts;
CMSCSparseMatrix();
~CMSCSparseMatrix();
EXPORT CMSCSparseMatrix();
EXPORT ~CMSCSparseMatrix();
};
// nondeterministic (mdp) sparse matrix
@ -152,8 +159,8 @@ struct NDSparseMatrix
unsigned char *row_counts;
unsigned char *choice_counts;
NDSparseMatrix();
~NDSparseMatrix();
EXPORT NDSparseMatrix();
EXPORT ~NDSparseMatrix();
};
// function prototypes

24
prism/src/sparse/sparse.cc

@ -54,7 +54,7 @@ static NDSparseMatrix *ndsm;
// Data structure constructors/deconstructors
//------------------------------------------------------------------------------
RMSparseMatrix::RMSparseMatrix()
EXPORT RMSparseMatrix::RMSparseMatrix()
{
n = 0;
nnz = 0;
@ -65,7 +65,7 @@ RMSparseMatrix::RMSparseMatrix()
row_counts = NULL;
}
RMSparseMatrix::~RMSparseMatrix()
EXPORT RMSparseMatrix::~RMSparseMatrix()
{
if (non_zeros) delete[] non_zeros;
if (cols) delete[] cols;
@ -74,7 +74,7 @@ RMSparseMatrix::~RMSparseMatrix()
//------------------------------------------------------------------------------
CMSparseMatrix::CMSparseMatrix()
EXPORT CMSparseMatrix::CMSparseMatrix()
{
n = 0;
nnz = 0;
@ -85,7 +85,7 @@ CMSparseMatrix::CMSparseMatrix()
col_counts = NULL;
}
CMSparseMatrix::~CMSparseMatrix()
EXPORT CMSparseMatrix::~CMSparseMatrix()
{
if (non_zeros) delete[] non_zeros;
if (rows) delete[] rows;
@ -94,7 +94,7 @@ CMSparseMatrix::~CMSparseMatrix()
//------------------------------------------------------------------------------
RCSparseMatrix::RCSparseMatrix()
EXPORT RCSparseMatrix::RCSparseMatrix()
{
n = 0;
nnz = 0;
@ -105,7 +105,7 @@ RCSparseMatrix::RCSparseMatrix()
cols = NULL;
}
RCSparseMatrix::~RCSparseMatrix()
EXPORT RCSparseMatrix::~RCSparseMatrix()
{
if (non_zeros) delete[] non_zeros;
if (rows) delete[] rows;
@ -114,7 +114,7 @@ RCSparseMatrix::~RCSparseMatrix()
//------------------------------------------------------------------------------
CMSRSparseMatrix::CMSRSparseMatrix()
EXPORT CMSRSparseMatrix::CMSRSparseMatrix()
{
n = 0;
nnz = 0;
@ -128,7 +128,7 @@ CMSRSparseMatrix::CMSRSparseMatrix()
row_counts = NULL;
}
CMSRSparseMatrix::~CMSRSparseMatrix()
EXPORT CMSRSparseMatrix::~CMSRSparseMatrix()
{
if (dist) delete[] dist;
if (cols) delete[] cols;
@ -137,7 +137,7 @@ CMSRSparseMatrix::~CMSRSparseMatrix()
//------------------------------------------------------------------------------
CMSCSparseMatrix::CMSCSparseMatrix()
EXPORT CMSCSparseMatrix::CMSCSparseMatrix()
{
n = 0;
nnz = 0;
@ -151,7 +151,7 @@ CMSCSparseMatrix::CMSCSparseMatrix()
col_counts = NULL;
}
CMSCSparseMatrix::~CMSCSparseMatrix()
EXPORT CMSCSparseMatrix::~CMSCSparseMatrix()
{
if (dist) delete[] dist;
if (rows) delete[] rows;
@ -160,7 +160,7 @@ CMSCSparseMatrix::~CMSCSparseMatrix()
//------------------------------------------------------------------------------
NDSparseMatrix::NDSparseMatrix()
EXPORT NDSparseMatrix::NDSparseMatrix()
{
n = 0;
nc = 0;
@ -174,7 +174,7 @@ NDSparseMatrix::NDSparseMatrix()
choice_counts = NULL;
}
NDSparseMatrix::~NDSparseMatrix()
EXPORT NDSparseMatrix::~NDSparseMatrix()
{
if (non_zeros) delete[] non_zeros;
if (cols) delete[] cols;

Loading…
Cancel
Save