changed alloc functions to allow for initialization of user-supplied buffer

This commit is contained in:
Mark Borgerding
2003-12-14 03:02:30 +00:00
parent ab32979a47
commit 559c14b49b
11 changed files with 135 additions and 112 deletions

View File

@ -56,9 +56,10 @@ mtime: all $(BENCHFFTW)
[ -x ./$(BENCHFFTW) ] && ./$(BENCHFFTW) -x $(NUMFFTS) -n $$n || true ; \
done
snr: all
snr: all $(TESTREAL)
@echo "testkiss( $(NFFT) , 1, '$(DATATYPE)' );" | octave -q
@echo "testkiss( $(NFFT) , $(NROWS), '$(DATATYPE)' );" | octave -q
./$(TESTREAL)
test: snr time fftw

View File

@ -37,9 +37,9 @@ void fft_file(FILE * fin,FILE * fout,int nfft,int nrows,int isinverse,int useasc
buf = (kiss_fft_cpx*)malloc(sizeof(kiss_fft_cpx) * nfft *nrows );
bufout = (kiss_fft_cpx*)malloc(sizeof(kiss_fft_cpx) * nfft *nrows);
if (nrows!=1)
st = kiss_fft2d_alloc( nrows,nfft ,isinverse );
st = kiss_fft2d_alloc( nrows,nfft ,isinverse ,0,0);
else
st = kiss_fft_alloc( nfft ,isinverse );
st = kiss_fft_alloc( nfft ,isinverse ,0,0);
while ( fread( buf , sizeof(kiss_fft_cpx) * nfft * nrows ,1, fin ) > 0 ) {
for (i=0;i<times;++i)