changeset 15818:142de7308ebf

main: periodic merge of stable to default
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 19 Dec 2012 10:55:44 -0500
parents dbb7896f15c7 (current diff) f63a4f23bfe7 (diff)
children 1e9a6285acc4
files libinterp/dldfcn/fftw.cc liboctave/numeric/oct-fftw.h
diffstat 2 files changed, 31 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/dldfcn/fftw.cc	Wed Dec 19 10:47:11 2012 -0500
+++ b/libinterp/dldfcn/fftw.cc	Wed Dec 19 10:55:44 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");
+
+ */
--- a/liboctave/numeric/oct-fftw.h	Wed Dec 19 10:47:11 2012 -0500
+++ b/liboctave/numeric/oct-fftw.h	Wed Dec 19 10:55:44 2012 -0500
@@ -225,14 +225,14 @@
   {
     static FftwMethod dummy;
 
-    return instance_ok () ? instance->method () : dummy;
+    return instance_ok () ? instance->do_method () : dummy;
   }
 
   static FftwMethod method (FftwMethod _meth)
   {
     static FftwMethod dummy;
 
-    return instance_ok () ? instance->method (_meth) : dummy;
+    return instance_ok () ? instance->do_method (_meth) : dummy;
   }
 
 private: