v4 mex: fixed problem with A_times_B_kronecker_C on Linux/64 bits

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1892 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
michel 2008-06-23 09:38:46 +00:00
parent 69f3a0b28a
commit 7054fd2f87
7 changed files with 6 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -19,7 +19,7 @@ if strcmpi('GLNX86', computer) || strcmpi('GLNXA64', computer) ...
|| strcmpi('MACI', computer) || strcmpi('MAC', computer)
% GNU/Linux (x86-32 or x86-64) or MacOS (Intel or PPC)
if strcmpi('GLNXA64', computer) % 64 bits ?
COMPILE_OPTIONS = [ COMPILE_OPTIONS ' -largeArrayDims -DMX_COMPAT_32' ];
COMPILE_OPTIONS = [ COMPILE_OPTIONS ' -largeArrayDims'];
end
LAPACK_PATH = '-lmwlapack';
if VERSION <= 7.4

View File

@ -23,7 +23,7 @@ typedef int mwSize;
# define DGEMM dgemm
# endif
extern "C"{
int DGEMM(char*, char*, mwSize*, mwSize*, mwSize*, double*, double*, mwSize*, double*, mwSize*, double*, double*, mwSize*);
int DGEMM(char*, char*, int*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*);
}
#else
# include "blas.h"
@ -31,7 +31,7 @@ extern "C"{
#endif
void full_A_times_kronecker_B_C(double *A, double *B, double *C, double *D,
mwSize mA, mwSize nA, mwSize mB, mwSize nB, mwSize mC, mwSize nC)
int mA, int nA, int mB, int nB, int mC, int nC)
{
const unsigned long shiftA = mA*mC ;
const unsigned long shiftD = mA*nC ;
@ -51,7 +51,7 @@ void full_A_times_kronecker_B_C(double *A, double *B, double *C, double *D,
}
void full_A_times_kronecker_B_B(double *A, double *B, double *D, mwSize mA, mwSize nA, mwSize mB, mwSize nB)
void full_A_times_kronecker_B_B(double *A, double *B, double *D, int mA, int nA, int mB, int nB)
{
const unsigned long int shiftA = mA*mB ;
const unsigned long int shiftD = mA*nB ;
@ -128,10 +128,10 @@ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
// Computational part:
if (nrhs == 2)
{
full_A_times_kronecker_B_B(A, B, &D[0], mA, nA, mB, nB);
full_A_times_kronecker_B_B(A, B, &D[0], (int) mA, (int) nA, (int) mB, (int) nB);
}
else
{
full_A_times_kronecker_B_C(A, B, C, &D[0], mA, nA, mB, nB, mC, nC);
full_A_times_kronecker_B_C(A, B, C, &D[0], (int) mA, (int) nA, (int) mB, (int) nB, (int) mC, (int) nC);
}
}