Sébastien Villemot
dcfc598196
Remove redundant void arguments
...
Performed using modernize-redundant-void-arg from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html
2018-06-04 15:02:57 +02:00
Sébastien Villemot
20bbbd46c3
Port some constructors to pass-by-value using C++11 move semantics
...
Performed using modernize-pass-by-value from clang-tidy.
Manual intervention was needed to fix an issue in MacroValue.hh.
Also replace std::move by move, since we import the std namespace.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
2018-06-04 12:35:28 +02:00
Sébastien Villemot
6cf4e6dc0c
Port to C++11 range-based for loops
...
Performed using modernize-loop-convert from clang-tidy.
Manual intervention was needed in MacroValue.cc because of a variable name
capture issue.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2018-06-04 12:26:16 +02:00
Sébastien Villemot
80d1e1e1fd
Use C++ header
...
Performed using modernize-deprecated-headers from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-deprecated-headers.html
2018-06-04 11:59:02 +02:00
Sébastien Villemot
28582c4a4b
Merge branch 'temporary_terms_array'
2018-06-04 11:40:49 +02:00
Houtan Bastani
f338e87692
Revert "remove unnecessary code for calculation of max lag when equation have been undiffed"
...
This reverts commit d7c979a4e6
.
2018-06-02 12:17:05 +02:00
Houtan Bastani
d7c979a4e6
remove unnecessary code for calculation of max lag when equation have been undiffed
2018-06-01 15:52:40 +02:00
Houtan Bastani
90cf5bfbb1
fix bug in creation of auxiliary variables for unary ops
2018-06-01 15:52:39 +02:00
Houtan Bastani
cc65f82fd8
fix typo in a648dc9e50
2018-06-01 15:06:31 +02:00
Houtan Bastani
a648dc9e50
clarify error message
2018-05-31 19:23:44 +02:00
Houtan Bastani
9166cda225
remove code that is no longer used in creation of auxiliary variables for diff operator
2018-05-31 18:44:06 +02:00
Houtan Bastani
1b952a12e6
fix bug in var max lag and simplify code
2018-05-31 15:36:03 +02:00
Sébastien Villemot
59e427cf66
Merge branch 'master' into temporary_terms_array
2018-05-30 17:20:48 +02:00
Houtan Bastani
e532ed9bab
fix typo
2018-05-30 16:53:16 +02:00
Houtan Bastani
0aea4f0cc4
introduce dynare command transform_unary_ops to create auxiliary variables for certain unary ops. This will be used for VARs and VECMs but can also be used for OLS, for example
2018-05-30 16:48:08 +02:00
Houtan Bastani
856f6f508a
Revert "create aux vars for certain unary ops contained in diff operator"
...
This reverts commit f600a65c0e
.
2018-05-30 15:50:42 +02:00
Houtan Bastani
922d0551a8
Revert "fixes to auxiliary variable creation for unary ops in diff operators"
...
This reverts commit 48031b99f6
.
2018-05-30 15:50:26 +02:00
Houtan Bastani
48031b99f6
fixes to auxiliary variable creation for unary ops in diff operators
2018-05-30 14:42:00 +02:00
Sébastien Villemot
0b617ceb4b
Merge branch 'master' into temporary_terms_array
2018-05-29 17:25:11 +02:00
Sébastien Villemot
e1f65b3390
Fix bug in external functions with temporary terms array
...
Given that temporary terms are separated in several functions (residuals,
jacobian, …), we must make sure that all temporary terms derived from a given
external function call are assigned just after that call, and not in an other
function.
2018-05-29 17:07:18 +02:00
Houtan Bastani
f600a65c0e
create aux vars for certain unary ops contained in diff operator
2018-05-29 17:00:56 +02:00
Sébastien Villemot
2adb81c867
Add autoconf check for C++14
2018-05-29 14:22:04 +02:00
Sébastien Villemot
08eedcb448
Add const qualifier for tef_terms in writeOutput method and siblings
...
Consequently, change various function calls where tef_terms was empty, passing
an (empty) rvalue instead of an lvalue.
2018-05-29 14:22:01 +02:00
Sébastien Villemot
33b280b3d5
Remove some ExprNode::writeOutput variants
...
More precisely, remove those variants where temporary_terms can be specified
without temporary_terms_idxs, in order to make clear that the latter is
expected. For situations where the tt_idxs are not needed (C, block MATLAB), an
empty map has to be explicitly given.
2018-05-29 11:13:55 +02:00
Sébastien Villemot
3f874cfced
Remove obsolete function
2018-05-28 16:39:28 +02:00
Houtan Bastani
90c90ca85d
pac: undiff: fix bug in erroneous conditional
2018-05-28 15:55:01 +02:00
Houtan Bastani
ad19c535ef
clarify error messages
2018-05-28 15:54:20 +02:00
Sébastien Villemot
ea3573180a
Fix ordering of model local variables
2018-05-28 15:50:29 +02:00
Sébastien Villemot
dd6799187c
Fix derivs w.r.t. parameters with temporary terms array
2018-05-28 15:23:15 +02:00
Sébastien Villemot
61dc80bb64
Fix missing temporary terms indexes in hessian and 3rd derivatives of static model
2018-05-28 11:59:36 +02:00
Sébastien Villemot
8657d4dc98
Fix block decomposition with temporary terms array
2018-05-28 11:58:11 +02:00
Sébastien Villemot
38ed0f2ffc
Remove unused writeChainRuleDerivative methods
2018-05-25 17:10:16 +02:00
Sébastien Villemot
c7c26190d6
Reactivate use_dll mode
2018-05-25 15:48:55 +02:00
Sébastien Villemot
968e411c31
Make indexing in temporary terms array ready for a (hypothetical future) implementation in C
2018-05-25 15:19:50 +02:00
Sébastien Villemot
f4b633b199
Factorize code for writing temporary terms identifiers (Tnnn)
...
Incidentally fix bug when a trinary operator becomes a temporary term with
block decomposition (without bytecode).
Also add a safety check to ensure that, if a temporary term is detected, its
index is indeed present in temporary_terms_idxs.
2018-05-25 14:53:48 +02:00
Sébastien Villemot
467604d428
Simplify ExprNode::writeOutput methods
...
The version with no temporary_terms_idxs argument needs not be virtual, since
it is the same implementation in all derived classes. Rather move it at the
level of the base ExprNode class.
2018-05-25 12:20:25 +02:00
Sébastien Villemot
64323ef730
Add compatibility layer for Matlab/Octave code not using the new temporary terms array interface
2018-05-24 19:35:35 +02:00
Sébastien Villemot
143e0888b6
Clean generated files for temporary terms array interface
2018-05-24 19:35:35 +02:00
Sébastien Villemot
bb4b5993b0
Simplify code for model local variables
2018-05-24 19:35:35 +02:00
Sébastien Villemot
164a6f303b
Fix bug in temporary terms array in the presence of model local variables
...
In the presence of MLVs, the temporary terms indexing was corrupted. The code
was using the implicit assumption that the ExprNodeLess ordering was giving the
same ordering as the temporary terms indexes ordering. But MLVs can be higher
in ExprNodeLess ordering than some other temporary terms, while they have the
lowest temporary terms index, hence the bug.
Fix this by no longer relying on the ExprNodeLess ordering, and rather use a
full map<ExprNode *, int> for ModelTree::temporary_terms_idxs. By the way,
simplify the code by removing a few useless data structures (e.g.
ModelTree::temporary_terms_idxs_*).
2018-05-24 19:35:21 +02:00
Sébastien Villemot
a9bfd1223b
Fix assertions that check the length of temporary terms vectors
...
Model local variables had been omitted in the length computations.
2018-05-24 17:04:16 +02:00
Sébastien Villemot
41d7496b46
Fix bug in wrapper functions (*_{dynamic,static}_resid_g1{,_g2,_g2_g3}.m)
...
The last argument (T_flag) was missing in the function definitions (but it was
used in some function calls).
2018-05-23 17:34:00 +02:00
Sébastien Villemot
3fa14031a2
Fix bug in *_{dynamic,static}_resid_g1_g2_g3.m functions
2018-05-22 12:02:48 +02:00
Houtan Bastani
732a317030
Merge branch 'master' into temporary_terms_array
2018-05-18 16:40:12 +02:00
Houtan Bastani
dd8b05e2f0
add undiff info to pac output
2018-05-17 16:53:27 +02:00
Stéphane Adjemian(Charybdis)
1ba023e37d
Added option for tuning mh_jscale.
2018-05-16 15:48:39 +02:00
Houtan Bastani
3d946ec8b7
var: check for leaded/contemporaneous variables
2018-05-16 12:17:06 +02:00
Sébastien Villemot
7798d45eb9
Update my email
2018-05-16 10:23:09 +02:00
Houtan Bastani
32041cf81a
Revert "Enforce C++ 2003 standard (with GNU extensions), to silence deprecation warnings"
...
This reverts commit 4fce93eea9
.
2018-05-15 16:09:07 +02:00
Houtan Bastani
3a71215ae1
pac: change auxiliary variable creation, fix VAR max lag
2018-05-15 14:42:36 +02:00