diff options
author | jofret | 2009-04-22 06:23:15 +0000 |
---|---|---|
committer | jofret | 2009-04-22 06:23:15 +0000 |
commit | 7e9e5cec0a0658322b7537665321e9488d53a3d7 (patch) | |
tree | 18b8521d37ee5ae91a5b767b38fcdb97c7d0cdbd | |
parent | 2424c9dba444d024f6353639bdc6fd2a8042c8aa (diff) | |
download | scilab2c-7e9e5cec0a0658322b7537665321e9488d53a3d7.tar.gz scilab2c-7e9e5cec0a0658322b7537665321e9488d53a3d7.tar.bz2 scilab2c-7e9e5cec0a0658322b7537665321e9488d53a3d7.zip |
Missing include
-rw-r--r-- | scilab2c/src/signalProcessing/fft/cfftma.c | 4 | ||||
-rw-r--r-- | scilab2c/src/signalProcessing/fft/dfftma.c | 13 | ||||
-rw-r--r-- | scilab2c/src/signalProcessing/fft/dfftmx.c | 19 | ||||
-rw-r--r-- | scilab2c/src/signalProcessing/fft/sfftma.c | 13 | ||||
-rw-r--r-- | scilab2c/src/signalProcessing/fft/zfftma.c | 13 |
5 files changed, 33 insertions, 29 deletions
diff --git a/scilab2c/src/signalProcessing/fft/cfftma.c b/scilab2c/src/signalProcessing/fft/cfftma.c index 53f65644..2a0eedda 100644 --- a/scilab2c/src/signalProcessing/fft/cfftma.c +++ b/scilab2c/src/signalProcessing/fft/cfftma.c @@ -11,9 +11,9 @@ */ - -#include "fft.h" #include <stdio.h> +#include <malloc.h> +#include "fft.h" void cfftma ( floatComplex* in , int rows, int cols, floatComplex* out) { diff --git a/scilab2c/src/signalProcessing/fft/dfftma.c b/scilab2c/src/signalProcessing/fft/dfftma.c index f855c1b7..bd8cc0be 100644 --- a/scilab2c/src/signalProcessing/fft/dfftma.c +++ b/scilab2c/src/signalProcessing/fft/dfftma.c @@ -1,7 +1,7 @@ /* * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab * Copyright (C) 2008 - INRIA - Arnaud Torset - * + * * This file must be used under the terms of the CeCILL. * This source file is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -10,6 +10,7 @@ * */ +#include <malloc.h> #include "fft.h" #include "zeros.h" @@ -19,13 +20,13 @@ void dfftma ( double* in , int rows, int cols, double* out){ doubleComplex* inCpx; doubleComplex* outCpx; - ZEROS = malloc((uint)(rows*cols)*sizeof(double)); - outCpx = malloc((uint)(rows*cols)*sizeof(doubleComplex)); - + ZEROS = (double*) malloc((unsigned int)(rows*cols)*sizeof(double)); + outCpx = (doubleComplex*) malloc((unsigned int)(rows*cols)*sizeof(doubleComplex)); + dzerosa(ZEROS,rows,cols); inCpx=DoubleComplexMatrix(in,ZEROS,rows*cols); - + zfftma(inCpx,rows,cols,outCpx); - + zreala(outCpx, rows*cols, out); } diff --git a/scilab2c/src/signalProcessing/fft/dfftmx.c b/scilab2c/src/signalProcessing/fft/dfftmx.c index e490ed22..27061b91 100644 --- a/scilab2c/src/signalProcessing/fft/dfftmx.c +++ b/scilab2c/src/signalProcessing/fft/dfftmx.c @@ -10,6 +10,7 @@ * */ +#include <stdlib.h> #include <math.h> #include "max.h" #include "min.h" @@ -110,7 +111,7 @@ static int mulByRotationFactor (void ); static int post_sqFactor2NormlOrder (void); static void single_sqFactor2NormlOrder (void); static int multi_sqFactor2NormlOrder (void); - + /* End Prototypes */ /*note on this code all numbers alone in comment is @@ -155,7 +156,7 @@ int dfftmx ( double* _pdblA , double* _pdblB , int _iNtot, int _iN, int _iNspan, np[0] = ks ; if ( kt != 0) permute_stage1 ( ) ; - + if ( 2*kt + 1 < m ) permute_stage2 ( ) ; @@ -173,7 +174,7 @@ Sous-Fonctions /* this function only set the value of variable */ static void preliminaryWork (void) -{ +{ s72 = -s72 ; s120= -s120; rad = -rad ; @@ -238,7 +239,7 @@ switch ( nfac[i-1] ) k = nfac[i-1] ; kspnn = kspan ; kspan = kspan / k ; - + factorOf3Transform ( ) ; break ; @@ -258,7 +259,7 @@ switch ( nfac[i-1] ) kspan = kspan / k ; if ( nfac[i-1] != jf) preFOtherTransform ( ) ; - + factorOfOtherTransform ( ) ; break ; } @@ -303,7 +304,7 @@ static void permute_stage2 (void) /*permutation for square-free facotrs of n */ nonSqFactor2NormOrder () ; - + /*determine the permutation cycles of length greater than 1*/ detPermutCycles (); @@ -383,7 +384,7 @@ static int factorOf2Transform (void) kk = k2 + kspan; }while ( kk < nt ); - + k2 = kk - nt; c1 = -c1; kk = k1 - k2; @@ -603,11 +604,11 @@ static void factorOf3Transform (void) a[k1-1] = ak - bj ; b[k1-1] = bk + aj ; a[k2-1] = ak + bj ; - b[k2-1] = bk - aj ; + b[k2-1] = bk - aj ; kk = k2 + kspan ; } while (kk < nn); - + kk -= nn ; }while (kk <= kspan); diff --git a/scilab2c/src/signalProcessing/fft/sfftma.c b/scilab2c/src/signalProcessing/fft/sfftma.c index c60c9427..925211e6 100644 --- a/scilab2c/src/signalProcessing/fft/sfftma.c +++ b/scilab2c/src/signalProcessing/fft/sfftma.c @@ -1,7 +1,7 @@ /* * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab * Copyright (C) 2008 - INRIA - Arnaud Torset - * + * * This file must be used under the terms of the CeCILL. * This source file is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -10,6 +10,7 @@ * */ +#include <malloc.h> #include "fft.h" #include "zeros.h" @@ -19,13 +20,13 @@ void sfftma ( float* in , int rows, int cols, float* out){ floatComplex* inCpx; floatComplex* outCpx; - ZEROS = malloc((uint)(rows*cols)*sizeof(float)); - outCpx = malloc((uint)(rows*cols)*sizeof(floatComplex)); - + ZEROS = (float*) malloc((unsigned int)(rows*cols)*sizeof(float)); + outCpx = (floatComplex*) malloc((unsigned int)(rows*cols)*sizeof(floatComplex)); + szerosa(ZEROS,rows,cols); inCpx=FloatComplexMatrix(in,ZEROS,rows*cols); - + cfftma(inCpx,rows,cols,outCpx); - + creala(outCpx, rows*cols, out); } diff --git a/scilab2c/src/signalProcessing/fft/zfftma.c b/scilab2c/src/signalProcessing/fft/zfftma.c index 24b0a7ad..56f13d2d 100644 --- a/scilab2c/src/signalProcessing/fft/zfftma.c +++ b/scilab2c/src/signalProcessing/fft/zfftma.c @@ -1,7 +1,7 @@ /* * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab * Copyright (C) 2008 - INRIA - Allan SIMON - * + * * This file must be used under the terms of the CeCILL. * This source file is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -12,6 +12,7 @@ #define FFT842 1 #define DFFT2 0 +#include <malloc.h> #include <math.h> #include "fft.h" #include "lapack.h" @@ -31,7 +32,7 @@ void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) int ierr = 0 ; int isn = -1; int i = 0; - + int increment=1; @@ -81,7 +82,7 @@ void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) if the second call don't call fft842 ex : matrix 2*3 */ zimaga ( inCopy , size , imagIn) ; - zreala ( inCopy , size , realIn) ; + zreala ( inCopy , size , realIn) ; } } else @@ -108,7 +109,7 @@ void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) { /*compute the fft on each line of the matrix */ for (i = 0 ; i < rows ; i++ ) - { + { C2F(zcopy) ( &cols, inCopy + i, &rows, inTemp , &increment ); fft842( inTemp , cols , 0); @@ -126,7 +127,7 @@ void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) { dfft2 ( realIn, imagIn, 1, cols, rows, isn, ierr); } - + } @@ -146,7 +147,7 @@ void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) } } - + free(realIn); free(imagIn); free(inCopy); |