Commit Graph

274 Commits (62f608eb805822dbc166d579a54dda9ec2e2288a)

Author SHA1 Message Date
Sébastien Villemot a8f5bdd525
Build system: no longer need to pass -pthread or -mthreads for C++11 threads as of GCC 10 2023-01-05 17:58:42 +01:00
Sébastien Villemot 8a0eb76b1b
Use operator""s to replace some calls to std::string constructor
By the way, remove other unnecessary calls to that constructor.
2022-06-22 12:51:08 +02:00
Sébastien Villemot b7c70fd99e
Dynare++: add a few parentheses to make GCC happy with -Wparentheses
I’m not sure that the intent for the hash function was actually what is
currently in the code, but it’s not worth improving this given that we want to
get rid of Dynare++ and the performance impact is probably negligible.
2022-06-07 18:01:05 +02:00
Sébastien Villemot 6ae86024ea
Dynare++: remove useless const qualifier 2022-06-07 17:25:25 +02:00
Sébastien Villemot 253d1385b4
Dynare++: mark IntSequence move constructor as noexcept
For better performance where used within containers (e.g. in Smolyak
integration).
2022-05-19 13:50:37 +02:00
Sébastien Villemot a95531f357
Dynare++: drop redundant move-assignment operator in Vector class 2022-05-16 17:59:50 +02:00
Sébastien Villemot ce2c1e0d30
No longer use C++ UTF-8 string literals
They don’t bring any added value, and break compilation in C++20 mode (because
they are then of type “const char8_t *” which is distinct from “const char *”).
2022-05-04 18:32:52 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
It is now supported by the MATLAB editor (as of R2022a).

The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).

The particles submodule is not updated at this point, because it is in an
inconsistent state.

[skip ci]
2022-04-13 14:54:25 +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 5a55e29561
Dynare++: minor fix to check for oversized problem
The maximum value of a signed integer is 2³¹−1, so the inequality test must not
be strict.
2022-01-21 14:55:37 +01:00
Johannes Pfeifer 4461544efd Expand cryptic error message if a value is assigned a second time 2021-11-04 09:04:26 +01:00
Sébastien Villemot 5eb769008b
Dynare++: fix bug in the --steps option
This option could crash or give wrong results.

Bug introduced in 6d99b6d120.
The Vector(Vector &) and Vector(const Vector &) constructors are not
equivalent.

Closes: #1804
2021-08-31 12:34:44 +02:00
Normann Rion 3d27672c58
kth-order approximation of conditional welfare
Partially addresses issue #1680:
- unconditional welfare resorts to dynare++ simulation tools, which shall be updated very soon
TO DO:
- implement a function computing kth-order approximation of simulated moments of y
2021-06-15 15:04:31 +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 233b242a29
Dynare++: (really) avoid locale-specific strings in the journal under Windows
Closes: #1751
2020-11-20 15:36:07 +01:00
Sébastien Villemot 3dc9087f55
Dynare++: update copyright years 2020-11-18 17:31:17 +01:00
Sébastien Villemot b1b8dc90a3
Dynare++: avoid locale-specific strings when printing date/time in the journal
Closes: #1751
2020-11-18 17:30:38 +01:00
Sébastien Villemot ce5aa33a33
k-order DLL: no longer write journal file on-disk, unless options_.debug = true
Closes: #1735
2020-10-15 17:19:30 +02:00
Sébastien Villemot 9a726e6138
Dynare++ tutorial: add a note about the computation of IRFs when shocks are correlated
The treatment is different that that of Dynare. For more background, see
https://forum.dynare.org/t/difference-between-high-order-approx-in-dynare-and-dynare/16570/4

By the way, make a few minor modernizations.

[skip ci]
2020-09-09 17:04:16 +02:00
Sébastien Villemot 2ae88722fb
Build system + Windows/macOS package: provisions for Dynare++’s dynare_simul.m 2020-02-25 16:33:32 +01:00
Johannes Pfeifer 47a3a1ed2e Restore dynare_simul.m for Dynare++
Got lost in 2169341639 and 9ab832de01
Also adapted it to new 4.6 mex-calling syntax
2020-02-25 14:39:15 +01:00
Sébastien Villemot 22ab507c6c
Global reindentation of Dynare++ 2019-12-20 15:43:17 +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 8065e9d439
Build system: by default, error out if some dependency is missing
In particular, if either MATLAB or Octave is missing, one needs to pass either
--disable-matlab or --disable-octave.

Moreover, several new configure flags have been introduced for disabling some
components:
--disable-doc
--disable-dynare++
--disable-mex-dynare++
--disable-mex-ms-sbvar
--disable-mex-kalman-steady-state
2019-11-26 13:53:42 +01:00
Sébastien Villemot 9d99dafdd7
Dynare++: ensure that exception gives meaningful message if BK conditions not satisfied
Previously, if Blanchard-Kahn conditions were not satisfied, there was the
possibility an exception about NaN/Inf values in gy/gu was raised *before* the
exception about BK itself, leading to a confusing message. This commits moves
the test for BK before the test for NaN/Inf in gy/gu.

Closes: #674
2019-11-19 15:19:34 +01:00
Houtan Bastani afcdf46e80
capitalize Cepremap and Matlab, uncapitalize DYNARE 2019-10-02 14:09:21 +02: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 984c60acb9
Various improvements related to the MEX R2018a API
— Use MX_HAS_INTERLEAVED_COMPLEX for testing for the new API

— Use the typed access functions under the new API, with one exception: we do
  not use mxGetDoubles() instead of mxGetPr(), because it would just complexif
  the code without any value added

For more details, see:
https://fr.mathworks.com/help/matlab/matlab_external/upgrade-mex-files-to-use-interleaved-complex.html
2019-07-09 11:54:12 +02:00
Sébastien Villemot 7e274d8234
Dynare++: remove useless call to std::move() that prevents copy elision 2019-06-25 11:14:01 +02:00
Sébastien Villemot d69fadc362
Dynare++: improvements to comments 2019-06-19 17:35:01 +02:00
Sébastien Villemot b7e6ac58b3
Dynare++: move all documentation to the doc/ subdir 2019-06-19 17:35:01 +02:00
Sébastien Villemot 16e36e503a
Dynare++: unpack tarball where Sylvester test cases are stored 2019-06-19 17:34:30 +02:00
Sébastien Villemot 7cc4aad8b6
Dynare++: update copyright information
— Ondra Kamenik has agreed to the relicensing of utils and parser modules to
  GPL
— add DynareTeam’s copyright, since we have made a lot of modifications
— add proper copyright notices in all files
2019-06-19 15:02:41 +02:00
Sébastien Villemot f00526cfe4
Dynare++: rename old changelog for Sylvester module 2019-06-19 15:02:39 +02:00
Sébastien Villemot 09b8397f44
Dynare++: improvements to comments (last batch!)
[skip ci]
2019-06-11 16:58:32 +02:00
Sébastien Villemot 7599bc1069
Dynare++: improve comments
[skip ci]
2019-06-05 18:17:43 +02:00
Sébastien Villemot 72ad793d85
Dynare++: improvements to comments
[skip ci]
2019-05-22 17:25:58 +02:00
Sébastien Villemot 4ae409574d
Dynare++: use std::exchange() in move constructors 2019-05-20 18:35:29 +02:00
Sébastien Villemot c7cd325e4e
Dynare++: improvements to comments 2019-05-10 18:41:38 +02:00
Houtan Bastani a29896a6d5
Undo change in cb5b756927, preferring const to constexpr 2019-05-08 15:26:17 +02:00
Houtan Bastani cb5b756927
sqrt is not a constexpr
see: http://open-std.org/JTC1/SC22/WG21/docs/papers/2017/p0533r0.pdf
2019-05-08 13:01:34 +02:00
Sébastien Villemot 0375dbe29b
Dynare++: improvements to comments 2019-05-06 18:44:49 +02:00
Sébastien Villemot 4d17c8b10d
Dynare++: move multithreading abstraction to the "utils" module 2019-05-02 12:38:56 +02:00
Sébastien Villemot b9f92b69be
Dynare++: replace some uses of std::vector by a lighter std::unique_ptr 2019-04-30 12:58:21 +02:00
Sébastien Villemot 64b568001c
Dynare++: fix bug introduced in 0b9b69f638 2019-04-29 18:31:57 +02:00
Sébastien Villemot 1ebd1d63fa
Dynare++: add test mod files to testsuite 2019-04-29 18:31:54 +02:00
Sébastien Villemot d3c4d0ae0f
Dynare++: use .mod extension for all test files (instead of .dyn) 2019-04-29 15:57:47 +02:00
Sébastien Villemot 36ab8d0093
Dynare++: rename old changelog 2019-04-26 14:44:36 +02:00
Sébastien Villemot 26778ea666
Dynare++: drop unmaintained R stuff 2019-04-26 14:44:36 +02:00
Sébastien Villemot 0b9b69f638
Dynare++: various simplifications 2019-04-24 17:47:15 +02:00