diff options
author | cornet | 2009-04-22 05:54:43 +0000 |
---|---|---|
committer | cornet | 2009-04-22 05:54:43 +0000 |
commit | 879e2ac0a540fa1b199e20d47830aa5eea484a4c (patch) | |
tree | 69ef4242aa8ce27332dec2a27f4e7f10a6f9e8fb /src/matrixOperations/spec2/zspec2a.c | |
parent | 1811fe5588d0cfbb788ab8f477800af3f45dd710 (diff) | |
download | scilab2c-879e2ac0a540fa1b199e20d47830aa5eea484a4c.tar.gz scilab2c-879e2ac0a540fa1b199e20d47830aa5eea484a4c.tar.bz2 scilab2c-879e2ac0a540fa1b199e20d47830aa5eea484a4c.zip |
build with visual studio (dynamic libraries)
Diffstat (limited to 'src/matrixOperations/spec2/zspec2a.c')
-rw-r--r-- | src/matrixOperations/spec2/zspec2a.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/matrixOperations/spec2/zspec2a.c b/src/matrixOperations/spec2/zspec2a.c index ae867012..37d99990 100644 --- a/src/matrixOperations/spec2/zspec2a.c +++ b/src/matrixOperations/spec2/zspec2a.c @@ -10,7 +10,7 @@ * */ - +#include <malloc.h> #include "spec.h" #include "lapack.h" #include "zeros.h" @@ -32,14 +32,14 @@ void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues, doubleCompl double* outImag; doubleComplex* inCopy; - inCopy = malloc((uint)(rows*rows) * sizeof(doubleComplex)); - outReal = malloc((uint)rows * sizeof(double)); - outImag = malloc((uint)rows * sizeof(double)); + inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); pdblLeftvectors=NULL; pdblRightvectors=NULL; iWorkSize = 2*rows; - pdblWork = malloc((uint)iWorkSize * sizeof(doubleComplex)); + pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex)); pdblRWork = NULL; pdblRWork2 = NULL; @@ -67,13 +67,13 @@ void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues, doubleCompl /* apply lapack function according to symmetry */ if(hermitian){ - pdblRWork2 = malloc((uint)(3*rows) * sizeof(double)); + pdblRWork2 = (double*)malloc((unsigned int)(3*rows) * sizeof(double)); C2F(zheev)( "V", "U", &rows, eigenvectors, &rows, outReal, pdblWork, &iWorkSize, pdblRWork2, &INFO ); dzerosa(outImag,1,rows); for (i=0;i<rows;i++) eigenvalues[i+i*rows]=DoubleComplex(outReal[i],outImag[i]); } else { - pdblRWork = malloc((uint)(3*rows) * sizeof(doubleComplex)); + pdblRWork = (doubleComplex*)malloc((unsigned int)(3*rows) * sizeof(doubleComplex)); C2F(zgeev)( "N", "V", &rows, inCopy, &rows, eigenvalues, pdblLeftvectors, &rows, eigenvectors, &rows, pdblWork, &iWorkSize, pdblRWork, &INFO ); |