Sébastien Villemot
2a68f5a3af
Use “follower” instead of “slave” in internal class and variable names
2022-06-15 15:39:20 +02:00
Sébastien Villemot
248dac4bc7
Rename “parallel_slave_open_mode” option to “parallel_follower_open_mode”
...
But still accept the old name for backward compatibility.
Closes : #86
2022-06-15 15:35:54 +02:00
Sébastien Villemot
9b04c5436e
Block decomposition: fix crash when a variable appears in an equation but has zero symbolic derivative
2022-06-13 16:32:58 +02:00
Sébastien Villemot
5d1264e2b9
Optimization: use a move_iterator
2022-06-13 15:06:58 +02:00
Sébastien Villemot
ee8ee7c27f
Optimization: use move semantics in a few more places
2022-06-13 14:27:19 +02:00
Sébastien Villemot
8541179a56
Correctly clean up options list after a “pac_model” statement
2022-06-13 14:27:19 +02:00
Sébastien Villemot
fe5f3d983b
CI: bump version of Boost dependency
2022-06-09 11:51:09 +02:00
Sébastien Villemot
a5feb52f2f
Merge branch 'AppleSiliconPkg' of git.dynare.org:wmutschl/preprocessor
...
Ref. !61
2022-06-08 15:27:28 +02:00
Willi Mutschler
fe8aaf44fd
🍎 provisions for Apple Silicon package
2022-06-08 15:11:02 +02:00
Sébastien Villemot
49277dbbf2
StaticModel::getDerivID() now throws an exception when arg is not endo or parameter
...
Previously it would return -1, which is bad practice.
2022-06-08 14:54:09 +02:00
Sébastien Villemot
e3bc2d1b9b
Minor simplification
2022-06-08 14:37:59 +02:00
Sébastien Villemot
46b2c73565
C++17 modernization: more uses of std::optional
2022-06-08 12:34:25 +02:00
Sébastien Villemot
c94dfb848c
C++20 modernization: use initialization within range-based for loop
...
In particular, use this feature in many loops which feature a special treatment
for the first iteration, using a boolean variable (replacing iterator
manipulation). By the way, also use std::exchange() to simultaneously test the
value of this variable and update it.
2022-06-07 14:35:59 +02:00
Sébastien Villemot
9ace2dc413
C++17 modernization: take advantage of class template argument deduction
2022-06-07 14:35:26 +02:00
Sébastien Villemot
0b5c88109f
Various simplifications
2022-06-07 14:34:30 +02:00
Sébastien Villemot
8b5e33b87a
Avoid name clash between function parameter and class member
2022-06-03 20:38:07 +02:00
Sébastien Villemot
cecf14f29d
Improve comment
2022-06-03 20:30:40 +02:00
Sébastien Villemot
4da901d05f
Fix comment
2022-06-03 20:30:40 +02:00
Sébastien Villemot
d859f59a10
Epilogue: improve error message
2022-06-03 20:30:40 +02:00
Sébastien Villemot
d2ef844696
Macro processor slides: minor improvements
2022-05-24 12:20:29 +02:00
Sébastien Villemot
edf75e48a3
Merge branch 'tolx_steady' into 'master'
...
Add tolx-option for steady
See merge request Dynare/preprocessor!60
2022-05-23 10:07:09 +00:00
Sébastien Villemot
cec47cc78c
Implement bytecode compilation of 2nd deriv of external functions
2022-05-20 12:35:38 +02:00
Sébastien Villemot
d1a3b227fd
Fix bug in bytecode compilation of 1st deriv of external functions
2022-05-20 12:35:23 +02:00
Sébastien Villemot
03dc9837d0
Comment improvement
2022-05-20 12:27:22 +02:00
Sébastien Villemot
171cd65566
Fix bytecode compilation of external function nodes
2022-05-20 11:43:02 +02:00
Johannes Pfeifer
1dbf9c8041
Add tolx-option for steady
2022-05-19 22:43:41 +02:00
Sébastien Villemot
591b5e5f9e
Always create bytecode output
...
And, symmetrically, when the “bytecode” option is requested by the user, always
create the .m static/dynamic files.
The “bytecode” option therefore no longer modifies the preprocessor output.
2022-05-19 14:49:46 +02:00
Sébastien Villemot
af88f50d44
Forbid multiple identical clauses in “occbin_constraints” block
...
Closes : #97
2022-05-19 14:36:15 +02:00
Sébastien Villemot
0284b249f5
Remove unused “bytecode” argument in {Static,Dynamic}Model::computingPass()
2022-05-19 14:10:22 +02:00
Sébastien Villemot
25a32b1a32
Cosmetics
2022-05-19 12:27:44 +02:00
Sébastien Villemot
17ba60e587
Mark copy constructor and assignment of ModelTree as protected
...
This limits the risk of slicing.
The same is not possible for DataTree, since that base class is directly used
in some places.
2022-05-19 12:27:39 +02:00
Sébastien Villemot
2483639f4d
Fix bug introduced in 3516894a71
related to new estimation syntax
2022-05-18 19:27:00 +02:00
Sébastien Villemot
3516894a71
JSON output: fix handling of vector value options
...
The vectors were previously stored as strings internally, which would not
necessarily contain the commas which are required in JSON (but not in
MATLAB/Octave). The fix consists in internally storing those options as
std::vector.
Closes : #96
2022-05-18 17:44:36 +02:00
Sébastien Villemot
5b50c10229
Simplify OptionsList::writeJsonOutput()
2022-05-18 16:33:49 +02:00
Sébastien Villemot
29c683c6ad
JSON output: add missing comma for paired numerical options
2022-05-18 16:33:49 +02:00
Sébastien Villemot
d64682f346
JSON output: fix possible spurious commas in vector of int or string options
2022-05-18 16:33:49 +02:00
Sébastien Villemot
2c92057d75
Activate more compiler warnings with -Wextra
...
However, disable -Wunused-parameter which creates too many false positives in
polymorphic methods.
Also, only disable -Wdangling-else instead of the whole of -Wparentheses.
2022-05-18 16:33:49 +02:00
Sébastien Villemot
2795207802
No longer delete move constructor/assignment operator
...
We follow the advice given by Josuttis in his book about move semantics.
Deleting those member fuctions can be a bug if we want to allow copy semantics,
because overload resolution will no longer fallback to the copy
constructor/assignment operator when given an rvalue.
In particular, this explain why it was not possible to delete the move
assignment operator of the StaticModel class.
2022-05-18 16:33:48 +02:00
Sébastien Villemot
c6007aa780
C++17 modernization: use [[fallthrough]] attribute
...
This disables warnings when -Wimplicit-fallthrough is used (enabled by -Wextra).
2022-05-18 16:33:48 +02:00
Sébastien Villemot
701db61e09
JSON output: fix several bugs related to switch/case fallthrough
2022-05-18 16:33:42 +02:00
Sébastien Villemot
ae97c4eb29
Factorization in OptionsList class
2022-05-17 18:08:10 +02:00
Sébastien Villemot
3e94250582
C++17 modernization: use std::optional in ExprNode::getPacOptimizingShareAndExprNodes()
2022-05-16 19:10:16 +02:00
Sébastien Villemot
0eb11d3323
C++17 modernization: use std::optional in expression matching functions
2022-05-16 19:10:16 +02:00
Sébastien Villemot
3496d77eb4
C++17 modernization: use std::optional to store orig diff vars in VAR and TCM
...
By the way, remove the unused TrendComponentModelTable::getOrigDiffVar() method.
2022-05-16 19:10:16 +02:00
Sébastien Villemot
34aa1d3bb4
Fix comment
2022-05-16 19:10:16 +02:00
Sébastien Villemot
06d05e9a8d
C++17 modernization: use std::optional for SymbolTable::getEquationNumberForMultiplier()
2022-05-16 19:10:16 +02:00
Sébastien Villemot
fa7a926143
C++17 modernization: use std::optional for the storage of orig_symb_id and orig_lead_lag in SymbolTable
...
For the diff and unaryOp auxvar types, these value may be set or unset
depending on the complexity of the expression represented by the auxvar.
2022-05-16 19:10:15 +02:00
Sébastien Villemot
8fd1505ca2
C++17 modernization: use std::optional for “periods” option of “plot_conditional_forecast”
...
Incidentally, in the JSON output, no longer assign a value to the “periods”
field if not passed by the user (previously the value -1 was output in the JSON
file).
2022-05-16 19:10:15 +02:00
Sébastien Villemot
fc037a4352
Simplify printing of booleans using std::boolalpha
2022-05-16 19:10:15 +02:00
Sébastien Villemot
92d3b8166a
C++17 modernization: use std::optional for equation line numbers
2022-05-16 19:10:15 +02:00