Mercurial > hg > octave-terminal
changeset 4785:d3018a33c584
[project @ 2004-02-17 21:58:17 by jwe]
author | jwe |
---|---|
date | Tue, 17 Feb 2004 21:58:17 +0000 |
parents | 743ef6154f8a |
children | fc316bde0053 |
files | liboctave/ChangeLog liboctave/oct-fftw.cc |
diffstat | 2 files changed, 26 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2004-02-17 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-fftw.cc (convert_packcomplex_1d, convert_packcomplex_Nd): + Sprinkle with OCTAVE_QUIT. + 2004-02-16 David Bateman <dbateman@free.fr> * oct-fftw.cc (octave_fftw_planner::create_plan, octave_fftw::fftNd):
--- a/liboctave/oct-fftw.cc +++ b/liboctave/oct-fftw.cc @@ -215,10 +215,15 @@ convert_packcomplex_1d (Complex *out, size_t nr, size_t nc, int stride, int dist) { - // Fill in the missing data + OCTAVE_QUIT; + + // Fill in the missing data. + for (size_t i = 0; i < nr; i++) for (size_t j = nc/2+1; j < nc; j++) out[j*stride + i*dist] = conj(out[(nc - j)*stride + i*dist]); + + OCTAVE_QUIT; } static inline void @@ -230,7 +235,10 @@ size_t nrp = nr * np; Complex *ptr1, *ptr2; - // Create space for the missing elements + OCTAVE_QUIT; + + // Create space for the missing elements. + for (size_t i = 0; i < nrp; i++) { ptr1 = out + i * (nc/2 + 1) + nrp*((nc-1)/2); @@ -239,7 +247,10 @@ *ptr2++ = *ptr1++; } - // Fill in the missing data for the rank = 2 case directly for speed + OCTAVE_QUIT; + + // Fill in the missing data for the rank = 2 case directly for speed. + for (size_t i = 0; i < np; i++) { for (size_t j = 1; j < nr; j++) @@ -250,10 +261,14 @@ out[j + i*nr*nc] = conj(out[(i*nr+1)*nc - j]); } - // Now do the permutations needed for rank > 2 cases + OCTAVE_QUIT; + + // Now do the permutations needed for rank > 2 cases. + size_t jstart = dv(0) * dv(1); size_t kstep = dv(0); size_t nel = dv.numel (); + for (int inner = 2; inner < dv.length(); inner++) { size_t jmax = jstart * dv(inner); @@ -269,6 +284,8 @@ } jstart = jmax; } + + OCTAVE_QUIT; } int