Commit Graph

27 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
NormannR c6d5c48ff7 Local state-space iteration at order 3: multi-thread 3rd-order version with and without pruning 2022-08-30 14:06:19 +02:00
Stéphane Adjemian (Ryûk) f7204e6ec8
Bug fix (pruning at second order in estimation).
Closes #1853.
2022-05-13 11:39:49 +02:00
Sébastien Villemot d5472d2338
Tighten input sanity checks of various MEX files
Note that the unitary test in lyapunov_solver.m that checks sparse matrix input
had to be removed. Previously, this test was passing by chance (because the
sparse test matrices had actually no zero element, hence the internal double
float storage was the same as in the dense case). Now it consistently fails
with the additional checks in disclyap_fast MEX.
2022-03-18 22:49:46 +01:00
Sébastien Villemot 39f47dc957
local_state_space_iteration_k MEX now uses the Fortran code (instead of the C++ code)
Closes: #1802
2022-02-04 11:49:46 +01:00
Sébastien Villemot ebec02c6e4
local_state_space_iteration_2 MEX: yet more fixes to comments
In particular, use ε instead of u in mathematical expressions for consistency
with the C++ variable name.
2021-10-22 17:57:29 +02:00
Sébastien Villemot 0be7e0a0d7
local_state_space_iteration_2 MEX: more fixes to comments 2021-10-21 16:34:57 +02:00
Sébastien Villemot 05ea09eee9
local_state_space_iteration_2 MEX: error out properly when trying to use with BLAS+MATLAB+parallelization
By the way, rename the C preprocessor symbol so that it is undefined by
default.
2021-10-20 15:50:34 +02:00
Sébastien Villemot e3b1f9e79a
local_state_space_iteration_2 MEX: various fixes to comments 2021-10-20 15:39:58 +02:00
Sébastien Villemot ce282dc29c
local_state_space_iteration_2 MEX: fix bug when there are more shocks that states
The code that computes ghx·yhat+ghu·u (both with and without pruning) was
making the implicit assumption that q⩽n, i.e. that the number of shocks is less
than or equal to the number of states. If q>n, it would try to read invalid
memory references in ghx and yhat, and would thus either crash or return dummy
results.

Closes: #1820
2021-10-14 16:18:17 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Sébastien Villemot c9eb6920c9
local_state_space_iteration_k MEX: fix bug in output
In its output, the MEX was returning values for all endogenous variables, but
it was used in a context where only the variables from oo_.dr.restrict_var_list
were expected (as is done with local_state_space_iteration_2 MEX).

This commit fixes this discrepancy, and also fixes the test that was checking
that both MEX are returning the same output.

Closes: #1768
2021-03-10 13:45:29 +01:00
Sébastien Villemot b901b7af86
Global reindentation of MEX sources 2019-12-20 16:30:24 +01:00
Sébastien Villemot 996bdd6c64 New local_state_space_iteration_k MEX, for nonlinear filters at k-order
It applies the approximated policy function to a set of particles, using
Dynare++ routines.

There is support for parallelization, using Dynare++ multithreading
model (itself based on C++11 threads; we don’t use OpenMP because it is
incompatible with MKL). For the time being, default to a single thread. This
should be later refined through empirical testing.
2019-12-20 11:31:56 +01:00
Sébastien Villemot 6ff7d4c56c
C++17: use structured bindings instead of std::tie 2019-09-11 16:06:35 +02:00
Sébastien Villemot f45738c09e
local_state_space_iteration_2 MEX: fix error message 2019-06-28 17:49:02 +02:00
Sébastien Villemot ca1a1ae0f2
local_state_space_iterations_2 MEX: minor stylistic improvement 2019-06-27 17:34:10 +02:00
Sébastien Villemot 7c39b12b7b
Always compile MEX files with OpenMP (when they can take advantage of it)
As a consequence, remove the --enable-openmp option of the configure script.
2019-06-25 17:26:17 +02:00
Sébastien Villemot faa3185bdf
local state space iterations 2 DLL: various modernizations and simplifications 2019-04-30 15:54:49 +02:00
Sébastien Villemot f5e2bfc30a
Ask GCC to warn about C-style casts (-Wold-style-cast)
Adapt the code accordingly.
2019-04-23 13:03:20 +02:00
Sébastien Villemot 57848930c6
Use Unicode copyright symbol (in UTF-8 encoding)
Do not use it in MATLAB source files, since unfortunately the MATLAB editor
does not support UTF-8.
2019-04-16 11:42:16 +02:00
Stéphane Adjemian (Charybdis) 1bf81c9f5a Fixed copyright notices. 2017-05-18 18:36:38 +02:00
Stéphane Adjemian (Charybdis) b4448937cc Fixed indentation of c/h/cc/hh files. 2017-05-16 16:30:27 +02:00
Sébastien Villemot 61485ab809 Fix copyright notices 2013-06-12 17:04:46 +02:00
Sébastien Villemot f1c8ec60c7 Remove various compilation warnings 2013-06-12 16:05:35 +02:00
Sébastien Villemot c079ace8c3 Remove various compiler warnings 2012-06-08 19:06:03 +02:00
Stéphane Adjemian (Charybdis) a2f3a53634 Parallelization of local_state_space_iteration_2 (used in non linear filters). 2012-03-05 23:11:49 +01:00
Stéphane Adjemian (Charybdis) 40329e3e29 Added routine to compute one step ahead state space iteration (mex and m). The state space
equations are approximated at order two around the deterministic steady state.
2012-03-04 22:07:27 +01:00