Commit Graph

1907 Commits (130004ef47618d0ea6917dc54494fe2c266db246)

Author SHA1 Message Date
Sébastien Villemot 130004ef47 Simplify types for storing derivatives using std::tuple 2018-06-05 15:34:34 +02:00
Sébastien Villemot 52d8bd0b17 Stop using namespace boost globally in ModelTree
Otherwise boost::tuple overrides std::tuple.
2018-06-05 15:33:46 +02:00
Houtan Bastani 4d92baaf29 Clean up writing of equation tags in latex file 2018-06-05 14:47:36 +02:00
Houtan Bastani fc2460c384 update Travis-CI to use newer version of gcc 2018-06-05 12:35:30 +02:00
Houtan Bastani f2390623b2 update travis CI distribution 2018-06-05 11:39:39 +02:00
Sébastien Villemot ae81a6fcad Fix compilation error with bytecode DLL 2018-06-05 11:25:23 +02:00
Houtan Bastani d453e81594 pac_model: write as more output to M_ instead of options_; use rmfield instead of clear 2018-06-05 11:14:03 +02:00
Houtan Bastani 16a049f0d8 Make changes to pac code for C++11 2018-06-05 11:14:03 +02:00
Sébastien Villemot db3f625e80 Fix compilation for Windows hosts 2018-06-05 09:31:19 +02:00
Sébastien Villemot 7e16307382 Simplify DataTree maps using std::tuple 2018-06-04 17:35:02 +02:00
Sébastien Villemot abe44fb063 Replace the use of boost::bind by a lambda 2018-06-04 16:51:36 +02:00
Sébastien Villemot 272d36a37c Remove useless casts of nullptr 2018-06-04 16:39:01 +02:00
Sébastien Villemot 608c43450c Replace most calls to make_pair by braced-initializer lists or emplace()/emplace_back() 2018-06-04 16:36:46 +02:00
Sébastien Villemot 7d9cd718fc Replace more typedefs by using
Those were not automatically replaced by clang-tidy, I don’t know why…
2018-06-04 15:03:31 +02:00
Sébastien Villemot 182c53273e Remove useless spaces in type qualifiers
In C++11, it is no longer necessary to put a space between two consecutive ">".
2018-06-04 15:03:31 +02:00
Sébastien Villemot f8cc3ae355 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
2018-06-04 15:03:31 +02:00
Sébastien Villemot bf891b7d72 Port towards C++11 override
Performed using modernize-use-override from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot 1e56c73377 Port to C++11 nullptr keyword
Performed using modernize-use-nullptr from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot e73ebc7033 Port to C++11 noexcept keyword
Performed using modernize-use-noexcept from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-noexcept.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot 64eb494298 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
2018-06-04 15:03:31 +02:00
Sébastien Villemot 33b1359905 Port to C++11 emplace_back() method on containers
Performed using modernize-use-emplace from clang-tidy.

Manual intervention was needed to transform a NULL into nullptr in SymbolTable.cc.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot a185ecf752 Port to C++11 default members initializers
Performed using modernize-use-default-member-init from clang-tidy.

Manual intervention was needed to remove spurious remaining commas.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-default-member-init.html
2018-06-04 15:03:31 +02:00
Sébastien Villemot c0ed97d247 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
2018-06-04 15:03:26 +02:00
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