Commit Graph

11210 Commits (0ecc9791161a4ba1286a6b8538ff6da0af749021)

Author SHA1 Message Date
Sébastien Villemot 0ecc979116
Run dynare++ testsuite in Gitlab CI 2019-01-24 18:55:41 +01:00
Sébastien Villemot 1ef1dedc65
Refactor GeneralMatrix and ConstGeneralMatrix classes
- Remove the GeneralMatrix(const ConstVector &) constructor, since it is hides
  a memory allocation (copying the ConstVector into a fresh Vector). This
  helped detecting and fixing several unneeded memory allocations. Some other
  memory allocations are now more visible (with an explicit Vector{}
  constructor).

- Add checks in GeneralMatrix(Vector, …) and ConstGeneralMatrix(ConstVector, …)
  constructors for verifying that the {Const,}Vector has unit-stride (this was
  an implicit assumption so far) and is large enough for storing rows*cols
  elements.

- Add GeneralMatrix::operator=(const ConstGeneralMatrix &).

- Delete ConstGeneralMatrix::operator=().
2019-01-24 15:27:23 +01:00
Sébastien Villemot a2f2814cb2
Dynare++: ensure that all calls to BLAS/LAPACK use the correct LD values
Many BLAS/LAPACK calls were making the assumption that LD==rows when passing
matrices. In some cases this was correct (because of implementation details,
in particular because how the copy constructor of GeneralMatrix is implemented).
But in other cases it was a bug.

With this commit, the actual value for LD is systematically used (this fixes
existing bugs and prevent possible future ones if the implementation details
were changed).
2019-01-24 15:27:09 +01:00
Stéphane Adjemia (Scylla) 3690dc2e6f
Updated dseries submodule. 2019-01-23 17:26:08 +01:00
Stéphane Adjemia (Scylla) 2482eafdb7
Fixed dseries class initialization in Octave. 2019-01-23 15:49:55 +01:00
Sébastien Villemot fefccd4a1b
Reverts changes mistakenly added to commit f484942154. 2019-01-22 18:21:57 +01:00
Sébastien Villemot f484942154
Update dseries submodule 2019-01-22 18:10:16 +01:00
Sébastien Villemot c711d34d1d
Dynare++ / sylvester equation solver: refactor Vector and ConstVector classes
- these classes now encapsulate a std::shared_ptr<{const, }double>, so that
  they do not perform memory management, and several {Const,}Vector instances
  can transparently share the same underlying data

- make converting constructor from ConstVector to Vector explicit, since that
  entails memory allocation (but the reverse conversion is almost costless, so
  keep it implicit); do the same for GeneralMatrix/ConstGeneralMatrix,
  TwoDMatrix/ConstTwoDMatrix

- remove the constructors that were extracting a row/column from a matrix, and
  replace them by getRow() and getCol() methods on {Const,}GeneralMatrix

- rename and change the API of the complex version Vector::add(), so that it is
  explicit that it deals with complex numbers

- add constructors that take a MATLAB mxArray
2019-01-22 16:13:22 +01:00
Sébastien Villemot 49c06f5c7f
Dynare++ / sylvester equation solver: print solver method when debugging
By the way, simplify copy constructor/assignment.
2019-01-22 11:58:28 +01:00
Houtan Bastani 0c3f61f106
preprocessor: submodule update 2019-01-18 12:36:51 +01:00
Sébastien Villemot f655c170b6
Dynare++ / sylvester equation solver: second batch of modernizations 2019-01-17 10:20:49 +01:00
Houtan Bastani 026c0699aa
preprocessor: submodule update 2019-01-16 15:26:49 +01:00
Sébastien Villemot 74d22931fe
Enforce C++14 mode when compiling Dynare++ 2019-01-16 15:20:12 +01:00
Sébastien Villemot b0a7826cb9
Dynare++ / sylvester equation solver: first batch of modernizations 2019-01-15 19:04:13 +01:00
Sébastien Villemot 2666a4ce45
Dynare++: "make check" now fails if a numerical integration test fails
By the way, reactivate two tests that actually pass.
2019-01-15 19:04:13 +01:00
Sébastien Villemot 325b1a3bb5
Dynare++: remove quasi-Monte Carlo Normal quadrature
This quadrature is supposed to generate quadrature points that are
quasi-normally distributed. Basically it applies the inverse normal CDF to the
Halton low-discrepancy sequence.

The problem is that it gives poor numerical accuracy, and therefore fails the
tests.

Since it is actually used nowhere in Dynare++, remove that code.
2019-01-15 19:04:10 +01:00
Sébastien Villemot 8ebcd7cae6
Dynare++: fix check for QZ eigenvalue criterium
The criterium was previously incorrectly applied to the square absolute value
of eigenvalues. Rather apply it to the absolute value itself (as now done in
Dynare).

Ref #1632
2019-01-15 19:04:04 +01:00
Sébastien Villemot 2a82177304
Dynare++: enforce C++ Emacs mode for bison/flex files 2019-01-15 19:03:58 +01:00
Sébastien Villemot b8791e9f13
Dynare++: various modernizations of numerical integration library 2019-01-14 18:56:49 +01:00
Sébastien Villemot 4a72266d05
Dynare++: use std::unique_ptr for memory management of workers in thread groups 2019-01-14 12:35:46 +01:00
Sébastien Villemot 3c5afded8e
k-order DLL: fix build failure 2019-01-10 19:45:11 +01:00
Sébastien Villemot 8bc450f5ac
Various modernizations 2019-01-10 18:24:04 +01:00
Sébastien Villemot d5fcfb6566
Remove class MemoryFile, rather rely on C++ I/O streams 2019-01-10 17:52:02 +01:00
Sébastien Villemot a8f12c5b76
A few more modernizations with clang-tidy 2019-01-10 14:50:49 +01:00
Sébastien Villemot e45d230a3d
Rename .dat file to standard .hh extension 2019-01-10 14:29:58 +01:00
Sébastien Villemot 6076a4ff0c
Remove Emacs local mode variable
No longer needed now that files have C++-specific extensions.
2019-01-10 14:26:14 +01:00
Sébastien Villemot 38c24347ff
Use C++14 std::conditional_t (instead of custom IF template) 2019-01-09 17:26:28 +01:00
Sébastien Villemot 922014c2fa
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
2019-01-09 17:21:14 +01:00
Sébastien Villemot 60fd92ddce
Port to C++11 override keyword
Performed using modernize-use-override from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
2019-01-09 16:26:42 +01:00
Sébastien Villemot 9656904d41
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
2019-01-09 16:25:31 +01:00
Sébastien Villemot 7df31f68d9
Port to C++ delete keyword
Performed using modernize-use-equals-delete from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-delete.html
2019-01-09 16:23:04 +01:00
Sébastien Villemot 197cbea919
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
2019-01-09 16:16:29 +01:00
Sébastien Villemot 1052046954
Port to C++11 emplace() method on containers
Performed using modernize-use-emplace from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html
2019-01-09 16:00:05 +01:00
Sébastien Villemot cbcd0a6950
Port to C++11 default members initializers
Performed using modernize-use-default-member-init from clang-tidy.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-default-member-init.html
2019-01-09 15:58:45 +01:00
Sébastien Villemot 966a1c2ac0
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
2019-01-09 15:51:19 +01:00
Sébastien Villemot 7e003cc591
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
2019-01-09 15:46:04 +01:00
Sébastien Villemot 2024330568
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
2019-01-09 15:44:26 +01:00
Houtan Bastani 618e2c5400
preprocessor: submodule update. closes #1631 2019-01-09 14:56:14 +01:00
Sébastien Villemot 8b56ab6f11
Use C++11 erf/erfc instead of custom one 2019-01-08 17:49:15 +01:00
Sébastien Villemot ba609cce07
No need to redefine PI constant for MinGW 2019-01-08 17:46:36 +01:00
Sébastien Villemot f9df2bee2f
Use C++11 unordered_{map,set} instead of boost's 2019-01-08 17:38:21 +01:00
Sébastien Villemot 645404dcbe
Update license file following Dynare++ renamings 2019-01-08 17:13:03 +01:00
Sébastien Villemot 188d6296d7
Dynare++: finish to apply Dynare C++ coding style and extensions (.cc/.hh) 2019-01-08 17:12:05 +01:00
Sébastien Villemot b58e3d9f78
Dynare++ no longer depends on CWEB 2019-01-08 16:12:02 +01:00
Sébastien Villemot ce1ef47093
dynare++ / tensor library (TL): move away from CWEB
By the way apply Dynare C++ coding style and extensions (.cc/.hh).
2019-01-08 16:09:25 +01:00
Sébastien Villemot 84255f9e9a
dynare++/integ: move away from CWEB
By the way apply Dynare C++ coding style and extensions (.cc/.hh).
2019-01-04 17:28:20 +01:00
Sébastien Villemot df772325a2
dynare++/kord: move away from CWEB
By the way apply Dynare C++ coding style and extensions (.cc/.hh).
2019-01-04 16:32:05 +01:00
Sébastien Villemot 54335242c9
Update uncrustify configuration for version 0.64 2019-01-04 16:32:05 +01:00
Houtan Bastani c94401ea66
remove spurious semicolon 2019-01-02 18:00:21 +01:00
Houtan Bastani 42ad1a85ba
remove unnecessary find in statement 2019-01-02 17:56:45 +01:00