Mercurial > octave-nkf
diff src/DLD-FUNCTIONS/fftw.cc @ 15741:f63a4f23bfe7 stable
Fix infinite loop when setting fftw planner method (bug #37873)
* liboctave/oct-fftw.h (octave_float_fftw_planner::method): Fix typo
method -> do_method.
* src/DLD-FUNCTIONS/fftw.cc: Add tests.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Thu, 06 Dec 2012 20:15:58 -0500 |
parents | 72c96de7a403 |
children |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/fftw.cc Wed Nov 28 09:13:56 2012 -0800 +++ b/src/DLD-FUNCTIONS/fftw.cc Thu Dec 06 20:15:58 2012 -0500 @@ -267,3 +267,32 @@ return retval; } + +/* + +%!testif HAVE_FFTW +%! def_method = fftw ("planner"); +%! unwind_protect +%! method = "estimate"; +%! fftw ("planner", method); +%! assert (fftw ("planner"), method); +%! method = "measure"; +%! fftw ("planner", method); +%! assert (fftw ("planner"), method); +%! method = "patient"; +%! fftw ("planner", method); +%! assert (fftw ("planner"), method); +%! method = "exhaustive"; +%! fftw ("planner", method); +%! assert (fftw ("planner"), method); +%! method = "hybrid"; +%! fftw ("planner", method); +%! assert (fftw ("planner"), method); +%! unwind_protect_cleanup +%! fftw ("planner", def_method); +%! end_unwind_protect + +%!error <Invalid call to fftw> fftw (); +%!error <Invalid call to fftw> fftw ("planner", "estimate", "measure"); + + */