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
Various modernizations and simplifications.
Also remove a workaround for a LAPACK bug in DGGES (the VSL argument was
apparently referenced even though JOBVSL="N"). Hopefully the bug has been fixed
everywhere now.
The criterium was previously incorrectly applied to the square absolute value of
eigenvalues. Rather apply it to the absolute value itself (as done in
mjdgges.m and the AIM solver).
Closes#1632
The option is passed in the fourth input argument of mjdgges. If the
mex is called with less than four arguments, then the threshold level
takes its previous (hardcoded) default value: 1e-6.
* 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
in Matlab version 7.3, Matlab Lapack library only uses it from version 7.8
(needs to be merged in 4.0)
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2565 ac1d8469-bf42-47a9-8791-bf33cf982152
- build_matlab.m: mwSignedIndex actually appeared in Matlab 7.3 (like mwSize and mwIndex)
- mjdgges.c: use a typedef instead of a #define for mwSignedIndex
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2540 ac1d8469-bf42-47a9-8791-bf33cf982152