Sébastien Villemot
41ccfd4068
Bytecode: use braces (instead of $ and £) to highlight floating-point errors in expressions
2022-05-05 17:10:27 +02:00
Sébastien Villemot
b4ce69db3a
Remove options_.slowc field
...
There was no user interface, and the feature that it provides has lost
relevance over time.
Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f
).
2022-03-31 17:39:43 +02:00
Sébastien Villemot
2d73ae2971
Bytecode: fix typo
2022-03-16 15:00:09 +01:00
Sébastien Villemot
96fb676be7
Bytecode: fix stack_solve_algo=4 when a “solve backward/forward” block follows a “solve two boundaries” block
...
When solving a “Solve two boundarise” block with stack_solve_algo=4, the
“slowc” variable is modified. This would affect the resolution of further
“solve backward/forward” blocks, which would yield results.
The fix consists in saving and restoring “slowc”.
2022-03-15 17:42:03 +01:00
Sébastien Villemot
65e18fe883
Bytecode: fix stack_solve_algo=4 on linear blocks
...
Only one iteration is performed on linear blocks. But in the case of
stack_solve_algo=4 it is not enough, since it will not find the right optimal
path lenght at the first iteration (even though that optimal path length is
ufnitary).
2022-03-01 11:29:29 +01:00
Sébastien Villemot
dbbbb75874
Bytecode: fix typo, replace “substract” by “subtract”
2022-02-28 18:47:20 +01:00
Sébastien Villemot
67a003aa73
Bytecode: fix stack_solve_algo=1 (relaxation method)
...
There were various issues with the construction of sparse submatrices.
By the way, refactor and document the code to make it more readable.
2022-02-28 18:47:20 +01:00
Sébastien Villemot
811e53f9ad
Bytecode: document matrix computation routines
2022-02-28 18:47:20 +01:00
Sébastien Villemot
59b8ee9c33
Bytecode: remove unused matrix subtraction routine
2022-02-28 18:47:20 +01:00
Sébastien Villemot
a7cc466285
Bytecode: fix bug in sparse matrix multiplication routines
...
Since those routines compute Aᵀ·B, the number of rows of the output is equal to
the number of columns of A.
2022-02-28 12:18:58 +01:00
Sébastien Villemot
8536b63827
Bytecode: remove superfluous debug information
2022-02-18 14:17:37 +01:00
Sébastien Villemot
972461c326
Bytecode: add debugging information about input arguments
2022-02-17 17:41:10 +01:00
Sébastien Villemot
a376d8c9fe
Fix steady state computation with bytecode+block and solve_algo ⩽ 4 or ⩾ 9
...
– Temporary terms were not correctly passed between blocks
– solve_algo ⩾ 9 was incorrectly passed through bytecode own’s solver instead
of through dynare_solve
2022-02-17 17:28:37 +01:00
Sébastien Villemot
ceb3ec2487
Bytecode: remove unused constructors
2022-02-15 16:54:41 +01:00
Sébastien Villemot
863fa2de1c
Bytecode: perfect foresight simulation of *linear* “Solve forward simple/complete” blocks was giving was results
2022-02-15 16:54:41 +01:00
Sébastien Villemot
803e3721ec
Bytecode: correctly handle M_.{endo_names,exo_names,param_names}, which are now cell arrays
2022-02-14 15:06:07 +01:00
Sébastien Villemot
92e82cfa0a
Bytecode: remove unused function prototype
2022-02-14 14:40:34 +01:00
Sébastien Villemot
188df7711d
Bytecode: fix simulation of blocks “Solve forward/backward complete” with stack_solve_algo={0,1,4}
...
The problem would also manifest at steady state computation with solve_algo=6.
It could crash or give incorrect results.
2022-02-11 12:00:25 +01:00
Sébastien Villemot
d74cb031d2
Bytecode: fix error message about convergence failure that can happen in Solve Backward Complete as well
2022-02-10 17:27:07 +01:00
Sébastien Villemot
cdb4f872b2
Bytecode: fix crash with stack_solve_algo=1 on “Solve forward/backward” blocks
2022-02-10 17:15:24 +01:00
Sébastien Villemot
ef6e4c7745
Bytecode: remove unused code
2022-02-10 16:58:39 +01:00
Sébastien Villemot
0caefa1593
Bytecode: exit gracefully when M_ does not exist
2022-02-09 14:32:25 +01:00
Sébastien Villemot
5f675eee18
Add erfc() primitive
2021-12-07 17:00:59 +01:00
Sébastien Villemot
271d80abee
Bytecode: release the lock on dynamic.bin when an exception occurs
...
Closes : #1815
2021-09-20 17:28:43 +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
1a0ee5f055
Bytecode / sparse transpose: bug fix
...
The Jc vector has n+1 elements, where n is the number of columns. Moreover, the
size passed to memset() was wrong.
2021-02-09 16:05:11 +01:00
Sébastien Villemot
c9f6d3a626
Bytecode: more simplifications and modernizations
2021-02-09 16:00:53 +01:00
Sébastien Villemot
4a1dbc5ca4
Bytecode: fix bug introduced in previous commit
...
map::at() does bound checking, and throws an exception if out-of-range,
contrary to [] operator which returns a new element.
2021-02-03 19:52:25 +01:00
Sébastien Villemot
4893f0e82c
Bytecode: various simplifications and modernizations
2021-02-03 18:10:31 +01:00
Sébastien Villemot
30cfb0b03c
Bytecode: bugfix in conditional forecast
2021-02-01 17:54:36 +01:00
Sébastien Villemot
967966876f
Bytecode: remove obsolete LINBCG stuff
2021-02-01 15:26:33 +01:00
Sébastien Villemot
743469bfd7
Bytecode: remove stuff for creating a standalone debugging executable
...
This code no longer compiles. And it’s possible to debug the MEX directly.
2021-02-01 15:26:33 +01:00
Sébastien Villemot
bb5f58f55f
Bytecode: remove useless constant redefinition
2021-02-01 15:26:33 +01:00
Sébastien Villemot
eb29dc003a
Bytecode: remove CUDA-specific stuff
2021-02-01 15:26:31 +01:00
Sébastien Villemot
5ef440ad9b
Bytecode: remove MSVC++ specific portions
2021-02-01 14:50:46 +01:00
Sébastien Villemot
f9f50ff19a
Bytecode: port to C++11 using keyword
...
Performed using modernize-use-using from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-using.html
2021-02-01 14:50:46 +01:00
Sébastien Villemot
47357bb432
Bytecode: port to C++11 nullptr keyword
...
Performed using modernize-use-nullptr from clang-tidy.
Manual intervention to remove old-style C casts to nullptr.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot
a2186b06b8
Bytecode: port to C++11 syntax for default constructors
...
Performed using modernize-use-equals-default from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot
1aa0286f6d
Bytecode: port to C++11 emplace_back() method on containers
...
Performed using modernize-use-emplace from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot
93c6cb1c3c
Bytecode: use bool literals
...
Performed using modernize-use-bool-literals from clang-tidy
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2021-02-01 14:50:42 +01:00
Sébastien Villemot
1a4340cb80
Bytecode: port to C++11 auto keyword
...
Performed using modernize-use-auto from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2021-02-01 14:50:39 +01:00
Sébastien Villemot
63e922f637
Bytecode: port some constructors to pass-by-value using C++11 move semantics
...
Performed using modernize-pass-by-value from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
2021-02-01 14:50:10 +01:00
Sébastien Villemot
7840d1396e
Bytecode: port to C++11 range-based for loops
...
Performed using modernize-loop-convert from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2021-02-01 14:50:07 +01:00
Sébastien Villemot
2f587cf5c3
Bytecode: use C++ headers
...
Performed using modernize-deprecated-headers from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-deprecated-headers.html
2021-02-01 12:28:50 +01:00
Sébastien Villemot
c050325e3d
Bytecode: C++17 modernization / convert the remaining enums to enum classes
2021-02-01 12:10:47 +01:00
Sébastien Villemot
73253a0620
Bytecode + Block decomposition: fix crash with purely forward variables
...
After simulating a block containing purely forward variables (thus of type
“evaluate backward”), the it_ variable of the evaluator would be left in an
inconsistent state (typically 0, which means that taking the value of a lagged
variable would lead to an invalid read).
By the way, fix a symmetric problem for backward blocks (which could
potentially create a invalid read for purely backward models).
Ref. #1727
2020-09-22 16:45:44 +02:00
Sébastien Villemot
8803bc1479
Bytecode: minor improvement to debugging information
2020-09-22 16:42:33 +02:00
Sébastien Villemot
31a9a5e9ab
Bytecode MEX: various fixes to debug mode
2020-05-13 12:22:20 +02:00
Sébastien Villemot
f4f296edd6
Preprocessor update
...
— various refactoring and bugfixes in block decomposition
— small bugfix for PAC models
2020-05-06 18:17:25 +02:00
Sébastien Villemot
fbfff18378
Preprocessor: various refactorings of block decomposition
...
Adapt bytecode MEX accordingly.
2020-03-20 18:51:37 +01:00