Sébastien Villemot
f5e2bfc30a
Ask GCC to warn about C-style casts (-Wold-style-cast)
...
Adapt the code accordingly.
2019-04-23 13:03:20 +02:00
Sébastien Villemot
c9bdc2c885
Dynare++: simplify methods for getting number of columns and rows of a matrix
...
Previously there were GeneralMatrix::numRows() and TwoDMatrix::nrows() for doing
the same thing (and same for columns and Const versions).
Merge these two into GeneralMatrix::nrows().
2019-04-16 12:44:02 +02:00
Sébastien Villemot
57848930c6
Use Unicode copyright symbol (in UTF-8 encoding)
...
Do not use it in MATLAB source files, since unfortunately the MATLAB editor
does not support UTF-8.
2019-04-16 11:42:16 +02:00
Sébastien Villemot
2169341639
Move source code of gensylv and dynare_simul_ MEX to the same place as other MEX
2019-04-15 17:34:01 +02:00
Sébastien Villemot
85f472c74b
Dynare++: new helpers for constructing {Const,}{TwoD,General}Matrix from mxArray*
2019-04-10 19:00:49 +02:00
Sébastien Villemot
860e1e1c75
Dynare++: improve comments
2019-03-29 18:46:52 +01:00
Sébastien Villemot
c41216819a
Dynare++: give more explicit names to some methods on quasi-triangular matrices
2019-03-29 15:28:26 +01:00
Sébastien Villemot
39896d8d0a
Dynare++: drop unused codepaths
2019-03-29 15:26:04 +01:00
Sébastien Villemot
44b40bbf09
Dynare++: improvements to comments
...
[skip ci]
2019-03-28 18:59:34 +01:00
Sébastien Villemot
5958848145
Dynare++: improve comments using Unicode (first batch)
...
[skip ci]
2019-03-27 19:22:51 +01:00
Sébastien Villemot
449553e7b6
Dynare++: various improvements
2019-03-08 15:32:30 +01:00
Sébastien Villemot
1639f75a3c
Dynare++: improve interface to not-in-place matrix multiplications
2019-02-26 18:59:45 +01:00
Sébastien Villemot
e3967bda9a
Dynare++: improve interface to matrix transpose
2019-02-26 18:59:45 +01:00
Sébastien Villemot
c44545bb18
Dynare++: add some comments
2019-02-26 12:43:04 +01:00
Sébastien Villemot
5fcf563c61
Dynare++: factorize and optimize code for integer exponentiation
...
There were two implementations of integer exponentiation. Merge them into a new
file under utils/cc/.
By the way, optimize it using exponentiation by squaring.
2019-02-19 15:50:07 +01:00
Sébastien Villemot
49f85ceaca
Dynare++: rollback the std::shared_ptr change in Vector and ConstVector
...
The performance cost is too high to warrant the change.
2019-02-14 11:29:18 +01:00
Sébastien Villemot
099a1de607
Dynare++: further simplification in Vector class
2019-02-06 19:00:46 +01:00
Sébastien Villemot
c15602c658
Dynare++: convert doc of Sylvester module to LaTeX
...
Previously it was plain TeX.
This allows us to remove the test for pdfetex.
2019-01-31 12:14:12 +01:00
Sébastien Villemot
a9e51ac4c0
Dynare++ sylvester equation solver: remove the SylvMemory class, not actually used
2019-01-25 18:43:21 +01:00
Sébastien Villemot
3ce051d819
Dynare++ sylvester equation solver: various simplifications and improvements
...
In particular, the test binary now errors out in case of test failure.
2019-01-25 18:43:21 +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
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
Sébastien Villemot
f655c170b6
Dynare++ / sylvester equation solver: second batch of modernizations
2019-01-17 10:20:49 +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
8bc450f5ac
Various modernizations
2019-01-10 18:24:04 +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
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
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
Sébastien Villemot
188d6296d7
Dynare++: finish to apply Dynare C++ coding style and extensions (.cc/.hh)
2019-01-08 17:12:05 +01:00
Stéphane Adjemian (Charybdis)
b4448937cc
Fixed indentation of c/h/cc/hh files.
2017-05-16 16:30:27 +02:00
Stéphane Adjemian (Sedna)
64346de401
Initial guess for Lagrange multipliers solved by SVD decomposition to improve conditioning.
2015-03-25 14:45:09 +01:00
Sébastien Villemot
d4b4060d69
Fix build failure with -Werror=format-security
...
See Debian bug #646258 (http://bugs.debian.org/646258 ) and
http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags for details.
2011-11-07 15:29:06 +01:00
Sébastien Villemot
a23f4b7ebc
Dynare++: compatibility fix for MATLAB 7.12 (R2011a)
2011-04-11 11:49:18 +02:00
Sébastien Villemot
2b8b32a2f0
Fixed warning in gensylv
2011-02-04 16:55:51 +01:00
Sébastien Villemot
6b1f84ac27
Dynare++: in printf statements with size_t, remove %zd modifier introduced in
...
757d8c36e9
and replace it by %lu as a workaround.
The %zd modifier was introduced in C99 standard, but is not implemented by
MinGW.
2011-01-15 19:07:26 +01:00
Sébastien Villemot
757d8c36e9
Dynare++: fixed warnings about printf format strings
2011-01-14 16:22:26 +01:00
Houtan Bastani
982b4d0491
gensylv: remove instances of mexErrMsgTxt
2010-09-23 10:45:27 +02:00
Sébastien Villemot
a3640239ab
Removed all MSVC workarounds, since we can now definitely drop this compiler on
...
Windows/64-bit platform
2010-09-21 15:06:14 +02:00
sebastien
295f998503
Dynare++ and k_order_perturbation DLL:
...
* support Microsoft Visual C++ 2008 compiler (necessary for 64-bit
platforms)
* use standard C++ headers for C Standard Library support
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3121 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-11-03 14:16:18 +00:00
sebastien
31ed196c44
Various minor changes for compatibility with MS Visual C++ and GCC 4.4
...
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3105 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-30 16:29:16 +00:00
sebastien
f9ccc49f14
Build system: use pdfetex instead of pdftex for sylvester.tex + other minor changes
...
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3010 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-02 10:29:54 +00:00