Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sébastien Villemot
dynare
Commits
8789151c
Commit
8789151c
authored
Sep 11, 2012
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Dynare++: compatibility fixes with MatIO 1.5
parent
cecb375b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dynare++/kord/dynamic_model.cweb
+7
-1
7 additions, 1 deletion
dynare++/kord/dynamic_model.cweb
dynare++/tl/cc/twod_matrix.cweb
+7
-1
7 additions, 1 deletion
dynare++/tl/cc/twod_matrix.cweb
with
14 additions
and
2 deletions
dynare++/kord/dynamic_model.cweb
+
7
−
1
View file @
8789151c
...
@@ -39,13 +39,19 @@ void NameList::writeMat(mat_t* fd, const char* vname) const
...
@@ -39,13 +39,19 @@ void NameList::writeMat(mat_t* fd, const char* vname) const
else
else
m[j*getNum()+i] = ' ';
m[j*getNum()+i] = ' ';
# if MATIO_MAJOR_VERSION > 1 || (MATIO_MAJOR_VERSION == 1 && MATIO_MINOR_VERSION >= 5)
size_t dims[2];
const matio_compression compression = MAT_COMPRESSION_NONE;
# else
int dims[2];
int dims[2];
const int compression = COMPRESSION_NONE;
# endif
dims[0] = getNum();
dims[0] = getNum();
dims[1] = maxlen;
dims[1] = maxlen;
matvar_t *v = Mat_VarCreate(vname, MAT_C_CHAR, MAT_T_UINT8, 2, dims, m, 0);
matvar_t *v = Mat_VarCreate(vname, MAT_C_CHAR, MAT_T_UINT8, 2, dims, m, 0);
Mat_VarWrite(fd, v,
COMPRESSION_NONE
);
Mat_VarWrite(fd, v,
compression
);
Mat_VarFree(v);
Mat_VarFree(v);
delete[] m;
delete[] m;
...
...
This diff is collapsed.
Click to expand it.
dynare++/tl/cc/twod_matrix.cweb
+
7
−
1
View file @
8789151c
...
@@ -34,7 +34,13 @@ ConstTwoDMatrix::ConstTwoDMatrix(int first_row, int num, const ConstTwoDMatrix&
...
@@ -34,7 +34,13 @@ ConstTwoDMatrix::ConstTwoDMatrix(int first_row, int num, const ConstTwoDMatrix&
@<|ConstTwoDMatrix::writeMat| code@>=
@<|ConstTwoDMatrix::writeMat| code@>=
void ConstTwoDMatrix::writeMat(mat_t* fd, const char* vname) const
void ConstTwoDMatrix::writeMat(mat_t* fd, const char* vname) const
{
{
#if MATIO_MAJOR_VERSION > 1 || (MATIO_MAJOR_VERSION == 1 && MATIO_MINOR_VERSION >= 5)
size_t dims[2];
const matio_compression compression = MAT_COMPRESSION_NONE;
#else
int dims[2];
int dims[2];
const int compression = COMPRESSION_NONE;
#endif
dims[0] = nrows();
dims[0] = nrows();
dims[1] = ncols();
dims[1] = ncols();
double *data = new double[nrows()*ncols()];
double *data = new double[nrows()*ncols()];
...
@@ -45,7 +51,7 @@ void ConstTwoDMatrix::writeMat(mat_t* fd, const char* vname) const
...
@@ -45,7 +51,7 @@ void ConstTwoDMatrix::writeMat(mat_t* fd, const char* vname) const
matvar_t *v = Mat_VarCreate(vname, MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, data, 0);
matvar_t *v = Mat_VarCreate(vname, MAT_C_DOUBLE, MAT_T_DOUBLE, 2, dims, data, 0);
Mat_VarWrite(fd, v,
COMPRESSION_NONE
);
Mat_VarWrite(fd, v,
compression
);
Mat_VarFree(v);
Mat_VarFree(v);
delete[] data;
delete[] data;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment