Commit Graph

24 Commits (7e770f69e791e705ab535126e0157130dc9d40c6)

Author SHA1 Message Date
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Sébastien Villemot 7c39b12b7b
Always compile MEX files with OpenMP (when they can take advantage of it)
As a consequence, remove the --enable-openmp option of the configure script.
2019-06-25 17:26:17 +02:00
Sébastien Villemot c6a09a65e9
kronecker MEX: improve comments using UTF-8 2019-06-25 14:34:18 +02:00
Sébastien Villemot 1199d4abae
kronecker DLLs: various modernizations and simplifications 2019-04-30 15:54:48 +02:00
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 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
Stéphane Adjemian (Charybdis) 1bf81c9f5a Fixed copyright notices. 2017-05-18 18:36:38 +02: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 (Charybdis) 560800bcc5 Changed the order of the output arguments in kronecker product related mex routines. 2011-09-05 18:57:42 +02:00
Sébastien Villemot cc2a9d90ac Global reindentation of MEX source files 2011-02-04 16:53:12 +01:00
Sébastien Villemot ffc53ca910 Fix integer types in Kronecker DLLs 2011-01-13 19:34:49 +01:00
Stéphane Adjemian (Charybdis) 5c709e4733 Changed set_dynare_threads.m. The number of threads in parallelized mex files to be used if dynare is built with the openmp flag
(--with-openmp) is not passed by an environment variable anymore. The function set_dynare_threads changes the default value of the
number of threads (default is 1) in the options_.threads structure. Changed calls to sparse_hessian_times_B_kronecker_C and
A_times_B_kronecker_C dlls accordingly.
2010-11-15 13:06:39 +01:00
Houtan Bastani e57056ad14 sparse_hessian_times_B_kronecker_C: remove instances of mexErrMsgTxt 2010-09-23 10:45:18 +02:00
sebastien f3549b4c64 Beautified MEX source code
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3251 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:18:38 +00:00
sebastien dde3f3795f Build system:
* Simplified the way we deal with various Octave/MATLAB contexts from MEX files:
  - only three defines: MATLAB_MEX_FILE, MATLAB_VERSION (hex number) and OCTAVE_MEX_FILE
  - one header for MEX files: dynmex.h
  - headers for BLAS and LAPACK: dynblas.h and dynlapack.h (used from Dynare++ and the MEX files)
* Merged the two sources trees of sylvester library


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3006 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-10-01 14:17:02 +00:00
sebastien 2ac1194d39 Build system: change the flag used for OpenMP compilation
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2950 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-09-18 10:34:04 +00:00
stepan fe7c01675a Changes related to the multithreaded mex files (part I).
* Removed from build_matlab.m the compilation of mex files with openmp.
* Added build_matlab_multithread.m (where openmp is used if availabe).
* Cosmetic changes.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2549 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-04-03 11:01:55 +00:00
stepan acee5581a9 v4.1: Cosmetic changes and more (set USE_OMP equal to one iff _OPENMP exists).
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2472 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-14 22:51:50 +00:00
stepan fb022dd3d7 v4.1: Fixed unsigned int warning.
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2467 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-14 11:16:34 +00:00
stepan c8a86252c7 v4.1: Added the possibility of multithreading for some mex files
(OpenMp is used).


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2453 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-03-11 14:57:34 +00:00
sebastien c633f68b12 v4 mex/sources: added copyright+license header to all remaining files
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1973 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-07-31 09:10:29 +00:00
sebastien 66c5c66e2f v4 mex: cleanups related to Blas and Lapack function calls
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1894 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-23 21:58:45 +00:00
sebastien 5ae83c57b8 v4 mex:
* fixed type of mwIndex and mwSize: int instead of unsigned int
* removed extra line in build.m


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1883 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-19 13:12:41 +00:00
michel 80eb1faab2 moving mex directory
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1690 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-02-04 21:31:12 +00:00