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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Willi Mutschler
dynare
Commits
7347554d
Verified
Commit
7347554d
authored
5 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
perfect_foresight_problem MEX: fix compilation under Windows
parent
7e274d82
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mex/sources/perfect_foresight_problem/DynamicModelCaller.cc
+4
-9
4 additions, 9 deletions
mex/sources/perfect_foresight_problem/DynamicModelCaller.cc
mex/sources/perfect_foresight_problem/DynamicModelCaller.hh
+13
-0
13 additions, 0 deletions
mex/sources/perfect_foresight_problem/DynamicModelCaller.hh
with
17 additions
and
9 deletions
mex/sources/perfect_foresight_problem/DynamicModelCaller.cc
+
4
−
9
View file @
7347554d
...
...
@@ -17,15 +17,6 @@
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
*/
#if defined(_WIN32) || defined(__CYGWIN32__)
# ifndef NOMINMAX
# define NOMINMAX // Do not define "min" and "max" macros
# endif
# include <windows.h>
#else
# include <dlfcn.h> // unix/linux DLL (.so) handling routines
#endif
#include
<dynmex.h>
#include
"DynamicModelCaller.hh"
...
...
@@ -34,7 +25,11 @@
std
::
string
DynamicModelCaller
::
error_msg
;
#if defined(_WIN32) || defined(__CYGWIN32__)
HINSTANCE
DynamicModelDllCaller
::
dynamic_mex
{
nullptr
};
#else
void
*
DynamicModelDllCaller
::
dynamic_mex
{
nullptr
};
#endif
DynamicModelDllCaller
::
dynamic_tt_fct
DynamicModelDllCaller
::
residual_tt_fct
{
nullptr
},
DynamicModelDllCaller
::
g1_tt_fct
{
nullptr
};
DynamicModelDllCaller
::
dynamic_deriv_fct
DynamicModelDllCaller
::
residual_fct
{
nullptr
},
DynamicModelDllCaller
::
g1_fct
{
nullptr
};
...
...
This diff is collapsed.
Click to expand it.
mex/sources/perfect_foresight_problem/DynamicModelCaller.hh
+
13
−
0
View file @
7347554d
...
...
@@ -21,6 +21,15 @@
#include
<memory>
#include
<limits>
#if defined(_WIN32) || defined(__CYGWIN32__)
# ifndef NOMINMAX
# define NOMINMAX // Do not define "min" and "max" macros
# endif
# include <windows.h>
#else
# include <dlfcn.h> // unix/linux DLL (.so) handling routines
#endif
class
DynamicModelCaller
{
public:
...
...
@@ -39,7 +48,11 @@ public:
class
DynamicModelDllCaller
:
public
DynamicModelCaller
{
private:
#if defined(_WIN32) || defined(__CYGWIN32__)
static
HINSTANCE
dynamic_mex
;
#else
static
void
*
dynamic_mex
;
#endif
using
dynamic_tt_fct
=
void
(
*
)(
const
double
*
y
,
const
double
*
x
,
int
nb_row_x
,
const
double
*
params
,
const
double
*
steady_state
,
int
it_
,
double
*
T
);
using
dynamic_deriv_fct
=
void
(
*
)
(
const
double
*
y
,
const
double
*
x
,
int
nb_row_x
,
const
double
*
params
,
const
double
*
steady_state
,
int
it_
,
const
double
*
T
,
double
*
deriv
);
static
dynamic_tt_fct
residual_tt_fct
,
g1_tt_fct
;
...
...
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