Mercurial > hg > peckfft
diff peck_fft.c @ 12:655dc5c14169
backup
author | Peter Meerwald <p.meerwald@bct-electronic.com> |
---|---|
date | Thu, 22 Sep 2011 16:58:25 +0200 |
parents | abdcde012978 |
children |
line wrap: on
line diff
--- a/peck_fft.c Thu Sep 22 15:19:18 2011 +0200 +++ b/peck_fft.c Thu Sep 22 16:58:25 2011 +0200 @@ -296,14 +296,15 @@ case 3: kf_bfly3(Fout, fstride, st, m); break; case 4: { -static unsigned counter = 0; - armv7_cycles_start(); - unsigned int t1 = armv7_cycles_read(); +//static unsigned counter = 0; +// armv7_cycles_start(); +// unsigned int t1 = armv7_cycles_read(); +//printf("%08x %d %d\n", Fout, fstride, m); kf_bfly4(Fout, fstride, st, m); - unsigned int t2 = armv7_cycles_read(); - armv7_cycles_stop(); - counter++; - if (counter > 150 && counter < 160) printf("XX %d\n", t2-t1); +// unsigned int t2 = armv7_cycles_read(); +// armv7_cycles_stop(); +// counter++; +// if (counter > 150 && counter < 160) printf("XX %d\n", t2-t1); } break; case 5: kf_bfly5(Fout, fstride, st, m); break; @@ -344,16 +345,16 @@ * The return value is a contiguous block of memory, allocated with malloc. As such, * it can be freed with free(), rather than a peck_fft-specific function. */ -peck_fft_cfg peck_fft_alloc(int nfft, int inverse_fft, void * mem, size_t * lenmem) { +peck_fft_cfg peck_fft_alloc(int nfft, int inverse_fft, void *mem, size_t *lenmem) { peck_fft_cfg st = NULL; size_t memneeded = sizeof(struct peck_fft_state) + sizeof(peck_fft_cpx)*(nfft-1); /* twiddle factors */ if (lenmem == NULL) { - st = ( peck_fft_cfg)PECK_FFT_MALLOC(memneeded); + st = (peck_fft_cfg) PECK_FFT_MALLOC(memneeded); } else { if (mem != NULL && *lenmem >= memneeded) - st = (peck_fft_cfg)mem; + st = (peck_fft_cfg) mem; *lenmem = memneeded; }