Mercurial > octave-nkf
annotate libinterp/dldfcn/fftw.cc @ 17787:175b392e91fe
Use GNU style coding conventions for code in libinterp/
* libinterp/corefcn/Cell.h, libinterp/corefcn/__contourc__.cc,
libinterp/corefcn/__dispatch__.cc, libinterp/corefcn/__lin_interpn__.cc,
libinterp/corefcn/__pchip_deriv__.cc, libinterp/corefcn/__qp__.cc,
libinterp/corefcn/balance.cc, libinterp/corefcn/besselj.cc,
libinterp/corefcn/betainc.cc, libinterp/corefcn/bitfcns.cc,
libinterp/corefcn/bsxfun.cc, libinterp/corefcn/c-file-ptr-stream.cc,
libinterp/corefcn/c-file-ptr-stream.h, libinterp/corefcn/cellfun.cc,
libinterp/corefcn/colloc.cc, libinterp/corefcn/comment-list.h,
libinterp/corefcn/conv2.cc, libinterp/corefcn/daspk.cc,
libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc,
libinterp/corefcn/data.cc, libinterp/corefcn/debug.cc,
libinterp/corefcn/defaults.cc, libinterp/corefcn/defaults.in.h,
libinterp/corefcn/defun-int.h, libinterp/corefcn/defun.cc,
libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc,
libinterp/corefcn/display.cc, libinterp/corefcn/dlmread.cc,
libinterp/corefcn/dot.cc, libinterp/corefcn/dynamic-ld.cc,
libinterp/corefcn/dynamic-ld.h, libinterp/corefcn/eig.cc,
libinterp/corefcn/ellipj.cc, libinterp/corefcn/error.cc,
libinterp/corefcn/error.h, libinterp/corefcn/event-queue.h,
libinterp/corefcn/fft.cc, libinterp/corefcn/fft2.cc, libinterp/corefcn/fftn.cc,
libinterp/corefcn/file-io.cc, libinterp/corefcn/filter.cc,
libinterp/corefcn/find.cc, libinterp/corefcn/gammainc.cc,
libinterp/corefcn/gcd.cc, libinterp/corefcn/getgrent.cc,
libinterp/corefcn/getpwent.cc, libinterp/corefcn/getrusage.cc,
libinterp/corefcn/givens.cc, libinterp/corefcn/gl-render.cc,
libinterp/corefcn/gl2ps-renderer.cc, libinterp/corefcn/gl2ps-renderer.h,
libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h,
libinterp/corefcn/gripes.cc, libinterp/corefcn/gripes.h,
libinterp/corefcn/help.cc, libinterp/corefcn/hess.cc,
libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc,
libinterp/corefcn/input.h, libinterp/corefcn/inv.cc,
libinterp/corefcn/jit-ir.h, libinterp/corefcn/jit-typeinfo.cc,
libinterp/corefcn/jit-typeinfo.h, libinterp/corefcn/jit-util.h,
libinterp/corefcn/kron.cc, libinterp/corefcn/load-path.cc,
libinterp/corefcn/load-path.h, libinterp/corefcn/load-save.cc,
libinterp/corefcn/load-save.h, libinterp/corefcn/lookup.cc,
libinterp/corefcn/ls-ascii-helper.cc, libinterp/corefcn/ls-hdf5.cc,
libinterp/corefcn/ls-hdf5.h, libinterp/corefcn/ls-mat-ascii.cc,
libinterp/corefcn/ls-mat-ascii.h, libinterp/corefcn/ls-mat4.cc,
libinterp/corefcn/ls-mat5.cc, libinterp/corefcn/ls-mat5.h,
libinterp/corefcn/ls-oct-ascii.cc, libinterp/corefcn/lsode.cc,
libinterp/corefcn/lu.cc, libinterp/corefcn/luinc.cc,
libinterp/corefcn/mappers.cc, libinterp/corefcn/matrix_type.cc,
libinterp/corefcn/max.cc, libinterp/corefcn/md5sum.cc,
libinterp/corefcn/mex.cc, libinterp/corefcn/mexproto.h,
libinterp/corefcn/mgorth.cc, libinterp/corefcn/mxarray.in.h,
libinterp/corefcn/nproc.cc, libinterp/corefcn/oct-hist.cc,
libinterp/corefcn/oct-lvalue.h, libinterp/corefcn/oct-map.cc,
libinterp/corefcn/oct-map.h, libinterp/corefcn/oct-obj.h,
libinterp/corefcn/oct-prcstrm.h, libinterp/corefcn/oct-stdstrm.h,
libinterp/corefcn/oct-stream.cc, libinterp/corefcn/oct-stream.h,
libinterp/corefcn/octave-link.cc, libinterp/corefcn/octave-link.h,
libinterp/corefcn/pager.cc, libinterp/corefcn/pinv.cc,
libinterp/corefcn/pr-output.cc, libinterp/corefcn/procstream.h,
libinterp/corefcn/profiler.cc, libinterp/corefcn/pt-jit.cc,
libinterp/corefcn/pt-jit.h, libinterp/corefcn/quad.cc,
libinterp/corefcn/quadcc.cc, libinterp/corefcn/qz.cc,
libinterp/corefcn/rand.cc, libinterp/corefcn/rcond.cc,
libinterp/corefcn/regexp.cc, libinterp/corefcn/schur.cc,
libinterp/corefcn/sighandlers.cc, libinterp/corefcn/sighandlers.h,
libinterp/corefcn/sparse-xdiv.cc, libinterp/corefcn/sparse-xdiv.h,
libinterp/corefcn/sparse-xpow.cc, libinterp/corefcn/sparse.cc,
libinterp/corefcn/spparms.cc, libinterp/corefcn/sqrtm.cc,
libinterp/corefcn/str2double.cc, libinterp/corefcn/strfind.cc,
libinterp/corefcn/strfns.cc, libinterp/corefcn/sub2ind.cc,
libinterp/corefcn/svd.cc, libinterp/corefcn/syl.cc,
libinterp/corefcn/symtab.cc, libinterp/corefcn/symtab.h,
libinterp/corefcn/syscalls.cc, libinterp/corefcn/sysdep.cc,
libinterp/corefcn/sysdep.h, libinterp/corefcn/time.cc,
libinterp/corefcn/toplev.cc, libinterp/corefcn/toplev.h,
libinterp/corefcn/tril.cc, libinterp/corefcn/txt-eng-ft.cc,
libinterp/corefcn/txt-eng-ft.h, libinterp/corefcn/txt-eng.h,
libinterp/corefcn/typecast.cc, libinterp/corefcn/urlwrite.cc,
libinterp/corefcn/utils.cc, libinterp/corefcn/variables.cc,
libinterp/corefcn/variables.h, libinterp/corefcn/xdiv.cc,
libinterp/corefcn/xdiv.h, libinterp/corefcn/xnorm.h, libinterp/corefcn/xpow.cc,
libinterp/corefcn/xpow.h, libinterp/corefcn/zfstream.cc,
libinterp/corefcn/zfstream.h, libinterp/dldfcn/__delaunayn__.cc,
libinterp/dldfcn/__dsearchn__.cc, libinterp/dldfcn/__eigs__.cc,
libinterp/dldfcn/__fltk_uigetfile__.cc, libinterp/dldfcn/__glpk__.cc,
libinterp/dldfcn/__init_fltk__.cc, libinterp/dldfcn/__init_gnuplot__.cc,
libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/__voronoi__.cc,
libinterp/dldfcn/amd.cc, libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/chol.cc,
libinterp/dldfcn/colamd.cc, libinterp/dldfcn/convhulln.cc,
libinterp/dldfcn/dmperm.cc, libinterp/dldfcn/fftw.cc, libinterp/dldfcn/qr.cc,
libinterp/dldfcn/symbfact.cc, libinterp/dldfcn/symrcm.cc,
libinterp/dldfcn/tsearch.cc, libinterp/octave-value/ov-base-diag.cc,
libinterp/octave-value/ov-base-diag.h, libinterp/octave-value/ov-base-int.cc,
libinterp/octave-value/ov-base-int.h, libinterp/octave-value/ov-base-mat.h,
libinterp/octave-value/ov-base-scalar.cc,
libinterp/octave-value/ov-base-scalar.h,
libinterp/octave-value/ov-base-sparse.cc,
libinterp/octave-value/ov-base-sparse.h, libinterp/octave-value/ov-base.cc,
libinterp/octave-value/ov-base.h, libinterp/octave-value/ov-bool-mat.cc,
libinterp/octave-value/ov-bool-mat.h, libinterp/octave-value/ov-bool-sparse.cc,
libinterp/octave-value/ov-bool-sparse.h, libinterp/octave-value/ov-bool.cc,
libinterp/octave-value/ov-bool.h, libinterp/octave-value/ov-builtin.cc,
libinterp/octave-value/ov-builtin.h, libinterp/octave-value/ov-cell.cc,
libinterp/octave-value/ov-cell.h, libinterp/octave-value/ov-ch-mat.cc,
libinterp/octave-value/ov-ch-mat.h, libinterp/octave-value/ov-class.cc,
libinterp/octave-value/ov-class.h, libinterp/octave-value/ov-colon.h,
libinterp/octave-value/ov-complex.cc, libinterp/octave-value/ov-complex.h,
libinterp/octave-value/ov-cx-diag.cc, libinterp/octave-value/ov-cx-diag.h,
libinterp/octave-value/ov-cx-mat.cc, libinterp/octave-value/ov-cx-mat.h,
libinterp/octave-value/ov-cx-sparse.cc, libinterp/octave-value/ov-cx-sparse.h,
libinterp/octave-value/ov-dld-fcn.h, libinterp/octave-value/ov-fcn-handle.cc,
libinterp/octave-value/ov-fcn-handle.h,
libinterp/octave-value/ov-fcn-inline.cc,
libinterp/octave-value/ov-fcn-inline.h, libinterp/octave-value/ov-fcn.h,
libinterp/octave-value/ov-float.cc, libinterp/octave-value/ov-float.h,
libinterp/octave-value/ov-flt-complex.cc,
libinterp/octave-value/ov-flt-complex.h,
libinterp/octave-value/ov-flt-cx-diag.cc,
libinterp/octave-value/ov-flt-cx-diag.h,
libinterp/octave-value/ov-flt-cx-mat.cc,
libinterp/octave-value/ov-flt-cx-mat.h,
libinterp/octave-value/ov-flt-re-diag.cc,
libinterp/octave-value/ov-flt-re-diag.h,
libinterp/octave-value/ov-flt-re-mat.cc,
libinterp/octave-value/ov-flt-re-mat.h, libinterp/octave-value/ov-int16.cc,
libinterp/octave-value/ov-int32.cc, libinterp/octave-value/ov-int64.cc,
libinterp/octave-value/ov-int8.cc, libinterp/octave-value/ov-intx.h,
libinterp/octave-value/ov-java.cc, libinterp/octave-value/ov-lazy-idx.h,
libinterp/octave-value/ov-mex-fcn.cc, libinterp/octave-value/ov-mex-fcn.h,
libinterp/octave-value/ov-null-mat.cc, libinterp/octave-value/ov-null-mat.h,
libinterp/octave-value/ov-oncleanup.cc, libinterp/octave-value/ov-perm.cc,
libinterp/octave-value/ov-perm.h, libinterp/octave-value/ov-range.cc,
libinterp/octave-value/ov-range.h, libinterp/octave-value/ov-re-diag.cc,
libinterp/octave-value/ov-re-diag.h, libinterp/octave-value/ov-re-mat.cc,
libinterp/octave-value/ov-re-mat.h, libinterp/octave-value/ov-re-sparse.cc,
libinterp/octave-value/ov-re-sparse.h, libinterp/octave-value/ov-scalar.cc,
libinterp/octave-value/ov-scalar.h, libinterp/octave-value/ov-str-mat.cc,
libinterp/octave-value/ov-str-mat.h, libinterp/octave-value/ov-struct.cc,
libinterp/octave-value/ov-struct.h, libinterp/octave-value/ov-type-conv.h,
libinterp/octave-value/ov-typeinfo.cc, libinterp/octave-value/ov-typeinfo.h,
libinterp/octave-value/ov-uint16.cc, libinterp/octave-value/ov-uint32.cc,
libinterp/octave-value/ov-uint64.cc, libinterp/octave-value/ov-uint8.cc,
libinterp/octave-value/ov-usr-fcn.cc, libinterp/octave-value/ov-usr-fcn.h,
libinterp/octave-value/ov.cc, libinterp/octave-value/ov.h, libinterp/octave.cc,
libinterp/operators/op-b-bm.cc, libinterp/operators/op-b-sbm.cc,
libinterp/operators/op-bm-b.cc, libinterp/operators/op-bm-bm.cc,
libinterp/operators/op-cdm-cdm.cc, libinterp/operators/op-chm.cc,
libinterp/operators/op-class.cc, libinterp/operators/op-cm-cm.cc,
libinterp/operators/op-cm-cs.cc, libinterp/operators/op-cm-s.cc,
libinterp/operators/op-cm-scm.cc, libinterp/operators/op-cm-sm.cc,
libinterp/operators/op-cs-cm.cc, libinterp/operators/op-cs-cs.cc,
libinterp/operators/op-cs-scm.cc, libinterp/operators/op-cs-sm.cc,
libinterp/operators/op-dm-dm.cc, libinterp/operators/op-dm-scm.cc,
libinterp/operators/op-double-conv.cc, libinterp/operators/op-fcdm-fcdm.cc,
libinterp/operators/op-fcm-fcm.cc, libinterp/operators/op-fcm-fcs.cc,
libinterp/operators/op-fcm-fm.cc, libinterp/operators/op-fcm-fs.cc,
libinterp/operators/op-fcs-fcm.cc, libinterp/operators/op-fcs-fcs.cc,
libinterp/operators/op-fcs-fm.cc, libinterp/operators/op-fcs-fs.cc,
libinterp/operators/op-fdm-fdm.cc, libinterp/operators/op-float-conv.cc,
libinterp/operators/op-fm-fcm.cc, libinterp/operators/op-fm-fcs.cc,
libinterp/operators/op-fm-fm.cc, libinterp/operators/op-fm-fs.cc,
libinterp/operators/op-fs-fcm.cc, libinterp/operators/op-fs-fcs.cc,
libinterp/operators/op-fs-fm.cc, libinterp/operators/op-fs-fs.cc,
libinterp/operators/op-m-cm.cc, libinterp/operators/op-m-cs.cc,
libinterp/operators/op-m-m.cc, libinterp/operators/op-m-s.cc,
libinterp/operators/op-m-scm.cc, libinterp/operators/op-m-sm.cc,
libinterp/operators/op-pm-scm.cc, libinterp/operators/op-range.cc,
libinterp/operators/op-s-cm.cc, libinterp/operators/op-s-cs.cc,
libinterp/operators/op-s-scm.cc, libinterp/operators/op-sbm-b.cc,
libinterp/operators/op-sbm-bm.cc, libinterp/operators/op-sbm-sbm.cc,
libinterp/operators/op-scm-cm.cc, libinterp/operators/op-scm-cs.cc,
libinterp/operators/op-scm-m.cc, libinterp/operators/op-scm-s.cc,
libinterp/operators/op-scm-scm.cc, libinterp/operators/op-scm-sm.cc,
libinterp/operators/op-sm-cm.cc, libinterp/operators/op-sm-m.cc,
libinterp/operators/op-sm-s.cc, libinterp/operators/op-sm-scm.cc,
libinterp/operators/op-sm-sm.cc, libinterp/operators/op-str-m.cc,
libinterp/operators/op-str-s.cc, libinterp/operators/op-str-str.cc,
libinterp/operators/ops.h, libinterp/parse-tree/lex.h,
libinterp/parse-tree/parse.h, libinterp/parse-tree/pt-arg-list.cc,
libinterp/parse-tree/pt-arg-list.h, libinterp/parse-tree/pt-assign.cc,
libinterp/parse-tree/pt-assign.h, libinterp/parse-tree/pt-binop.cc,
libinterp/parse-tree/pt-binop.h, libinterp/parse-tree/pt-bp.h,
libinterp/parse-tree/pt-cbinop.cc, libinterp/parse-tree/pt-check.cc,
libinterp/parse-tree/pt-colon.cc, libinterp/parse-tree/pt-colon.h,
libinterp/parse-tree/pt-const.cc, libinterp/parse-tree/pt-decl.cc,
libinterp/parse-tree/pt-decl.h, libinterp/parse-tree/pt-eval.cc,
libinterp/parse-tree/pt-except.h, libinterp/parse-tree/pt-exp.h,
libinterp/parse-tree/pt-fcn-handle.cc, libinterp/parse-tree/pt-id.cc,
libinterp/parse-tree/pt-id.h, libinterp/parse-tree/pt-idx.cc,
libinterp/parse-tree/pt-idx.h, libinterp/parse-tree/pt-loop.h,
libinterp/parse-tree/pt-mat.cc, libinterp/parse-tree/pt-misc.cc,
libinterp/parse-tree/pt-misc.h, libinterp/parse-tree/pt-pr-code.cc,
libinterp/parse-tree/pt-select.h, libinterp/parse-tree/pt-stmt.h,
libinterp/parse-tree/token.h, libinterp/version.cc:
Use GNU style coding conventions for code in libinterp/
author | Rik <rik@octave.org> |
---|---|
date | Mon, 28 Oct 2013 19:51:46 -0700 |
parents | d63878346099 |
children | 6113e0c6920b |
rev | line source |
---|---|
6228 | 1 /* |
2 | |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
17281
diff
changeset
|
3 Copyright (C) 2006-2013 David Bateman |
6228 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
6228 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
6228 | 20 |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
27 #include <algorithm> | |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9516
diff
changeset
|
28 |
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9516
diff
changeset
|
29 #include "oct-fftw.h" |
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9516
diff
changeset
|
30 |
6228 | 31 #include "defun-dld.h" |
32 #include "error.h" | |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9516
diff
changeset
|
33 #include "ov.h" |
6228 | 34 |
35 DEFUN_DLD (fftw, args, , | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
36 "-*- texinfo -*-\n\ |
14361
8de863b7126b
doc: Use Octave preference for double quote in docstrings in all .cc files
Rik <octave@nomad.inbox5.com>
parents:
14360
diff
changeset
|
37 @deftypefn {Loadable Function} {@var{method} =} fftw (\"planner\")\n\ |
8de863b7126b
doc: Use Octave preference for double quote in docstrings in all .cc files
Rik <octave@nomad.inbox5.com>
parents:
14360
diff
changeset
|
38 @deftypefnx {Loadable Function} {} fftw (\"planner\", @var{method})\n\ |
8de863b7126b
doc: Use Octave preference for double quote in docstrings in all .cc files
Rik <octave@nomad.inbox5.com>
parents:
14360
diff
changeset
|
39 @deftypefnx {Loadable Function} {@var{wisdom} =} fftw (\"dwisdom\")\n\ |
8de863b7126b
doc: Use Octave preference for double quote in docstrings in all .cc files
Rik <octave@nomad.inbox5.com>
parents:
14360
diff
changeset
|
40 @deftypefnx {Loadable Function} {} fftw (\"dwisdom\", @var{wisdom})\n\ |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
41 @deftypefnx {Loadable Function} {} fftw (\"threads\", @var{nthreads})\n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
42 @deftypefnx {Loadable Function} {@var{nthreads} =} fftw (\"threads\")\n\ |
6228 | 43 \n\ |
9072
bd8e388043c4
Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents:
9064
diff
changeset
|
44 Manage @sc{fftw} wisdom data. Wisdom data can be used to significantly\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
45 accelerate the calculation of the FFTs, but implies an initial cost\n\ |
9072
bd8e388043c4
Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents:
9064
diff
changeset
|
46 in its calculation. When the @sc{fftw} libraries are initialized, they read\n\ |
10840 | 47 a system wide wisdom file (typically in @file{/etc/fftw/wisdom}), allowing\n\ |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10840
diff
changeset
|
48 wisdom to be shared between applications other than Octave. Alternatively,\n\ |
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10840
diff
changeset
|
49 the @code{fftw} function can be used to import wisdom. For example,\n\ |
6228 | 50 \n\ |
51 @example\n\ | |
14360
97883071e8e4
doc: Correct off-by-1 spacings in all .cc docstrings
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
52 @var{wisdom} = fftw (\"dwisdom\")\n\ |
6228 | 53 @end example\n\ |
54 \n\ | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10840
diff
changeset
|
55 @noindent\n\ |
6228 | 56 will save the existing wisdom used by Octave to the string @var{wisdom}.\n\ |
8115
37c1bdb9805c
Clarify fftw documentation
David Bateman <dbateman@free.fr>
parents:
7789
diff
changeset
|
57 This string can then be saved to a file and restored using the @code{save}\n\ |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10840
diff
changeset
|
58 and @code{load} commands respectively. This existing wisdom can be\n\ |
16826
a4969508008e
doc: Periodic spellcheck of the documentation.
Rik <rik@octave.org>
parents:
16816
diff
changeset
|
59 re-imported as follows\n\ |
6228 | 60 \n\ |
61 @example\n\ | |
14360
97883071e8e4
doc: Correct off-by-1 spacings in all .cc docstrings
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
62 fftw (\"dwisdom\", @var{wisdom})\n\ |
12642
f96b9b9f141b
doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents:
11586
diff
changeset
|
63 @end example\n\ |
6228 | 64 \n\ |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
65 If @var{wisdom} is an empty string, then the wisdom used is cleared.\n\ |
6228 | 66 \n\ |
9072
bd8e388043c4
Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents:
9064
diff
changeset
|
67 During the calculation of Fourier transforms further wisdom is generated.\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
68 The fashion in which this wisdom is generated is also controlled by\n\ |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
69 the @code{fftw} function. There are five different manners in which the\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
70 wisdom can be treated:\n\ |
6228 | 71 \n\ |
72 @table @asis\n\ | |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
73 @item @qcode{\"estimate\"}\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
74 Specifies that no run-time measurement of the optimal means of\n\ |
6228 | 75 calculating a particular is performed, and a simple heuristic is used\n\ |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
76 to pick a (probably sub-optimal) plan. The advantage of this method is\n\ |
6228 | 77 that there is little or no overhead in the generation of the plan, which\n\ |
9072
bd8e388043c4
Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents:
9064
diff
changeset
|
78 is appropriate for a Fourier transform that will be calculated once.\n\ |
6228 | 79 \n\ |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
80 @item @qcode{\"measure\"}\n\ |
6228 | 81 In this case a range of algorithms to perform the transform is considered\n\ |
82 and the best is selected based on their execution time.\n\ | |
83 \n\ | |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
84 @item @qcode{\"patient\"}\n\ |
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
85 Similar to @qcode{\"measure\"}, but a wider range of algorithms is\n\ |
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
86 considered.\n\ |
6228 | 87 \n\ |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
88 @item @qcode{\"exhaustive\"}\n\ |
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
89 Like @qcode{\"measure\"}, but all possible algorithms that may be used to\n\ |
6228 | 90 treat the transform are considered.\n\ |
91 \n\ | |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
92 @item @qcode{\"hybrid\"}\n\ |
6228 | 93 As run-time measurement of the algorithm can be expensive, this is a\n\ |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
94 compromise where @qcode{\"measure\"} is used for transforms up to the size\n\ |
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
95 of 8192 and beyond that the @qcode{\"estimate\"} method is used.\n\ |
6228 | 96 @end table\n\ |
97 \n\ | |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
16826
diff
changeset
|
98 The default method is @qcode{\"estimate\"}. The current method can\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
99 be queried with\n\ |
6228 | 100 \n\ |
101 @example\n\ | |
14360
97883071e8e4
doc: Correct off-by-1 spacings in all .cc docstrings
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
102 @var{method} = fftw (\"planner\")\n\ |
6228 | 103 @end example\n\ |
104 \n\ | |
10846
a4f482e66b65
Grammarcheck more of the documentation.
Rik <octave@nomad.inbox5.com>
parents:
10840
diff
changeset
|
105 @noindent\n\ |
11553
01f703952eff
Improve docstrings for functions in DLD-FUNCTIONS directory.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
106 or set by using\n\ |
6228 | 107 \n\ |
108 @example\n\ | |
14360
97883071e8e4
doc: Correct off-by-1 spacings in all .cc docstrings
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
109 fftw (\"planner\", @var{method})\n\ |
6228 | 110 @end example\n\ |
111 \n\ | |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
112 Note that calculated wisdom will be lost when restarting Octave. However,\n\ |
6228 | 113 the wisdom data can be reloaded if it is saved to a file as described\n\ |
9064
7c02ec148a3c
Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
114 above. Saved wisdom files should not be used on different platforms since\n\ |
8115
37c1bdb9805c
Clarify fftw documentation
David Bateman <dbateman@free.fr>
parents:
7789
diff
changeset
|
115 they will not be efficient and the point of calculating the wisdom is lost.\n\ |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
116 \n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
117 The number of threads used for computing the plans and executing the\n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
118 transforms can be set with\n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
119 \n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
120 @example\n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
121 fftw (\"threads\", @var{NTHREADS})\n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
122 @end example\n\ |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
123 \n\ |
16816
12005245b645
doc: Periodic grammarcheck of documentation.
Rik <rik@octave.org>
parents:
15960
diff
changeset
|
124 Note that octave must be compiled with multi-threaded @sc{fftw} support for\n\ |
12005245b645
doc: Periodic grammarcheck of documentation.
Rik <rik@octave.org>
parents:
15960
diff
changeset
|
125 this feature. The number of processors available to the current process is\n\ |
12005245b645
doc: Periodic grammarcheck of documentation.
Rik <rik@octave.org>
parents:
15960
diff
changeset
|
126 used per default.\n\ |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
127 \n\ |
6228 | 128 @seealso{fft, ifft, fft2, ifft2, fftn, ifftn}\n\ |
129 @end deftypefn") | |
130 { | |
131 octave_value retval; | |
132 | |
14846
460a3c6d8bf1
maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
Rik <octave@nomad.inbox5.com>
parents:
14361
diff
changeset
|
133 int nargin = args.length (); |
6228 | 134 |
135 if (nargin < 1 || nargin > 2) | |
136 { | |
137 print_usage (); | |
138 return retval; | |
139 } | |
140 | |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9516
diff
changeset
|
141 #if defined (HAVE_FFTW) |
6228 | 142 if (args(0).is_string ()) |
143 { | |
144 std::string arg0 = args(0).string_value (); | |
145 if (!error_state) | |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
146 { |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
147 if (arg0 == "planner") |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
148 { |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
149 if (nargin == 2) //planner setter |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
150 { |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
151 if (args(1).is_string ()) |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
152 { |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
153 // Use STL function to convert to lower case |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
154 std::transform (arg0.begin (), arg0.end (), arg0.begin (), |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
155 tolower); |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
156 std::string arg1 = args(1).string_value (); |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
157 if (!error_state) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
158 { |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
159 std::transform (arg1.begin (), arg1.end (), |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
160 arg1.begin (), tolower); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
161 octave_fftw_planner::FftwMethod meth |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
162 = octave_fftw_planner::UNKNOWN; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
163 octave_float_fftw_planner::FftwMethod methf |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
164 = octave_float_fftw_planner::UNKNOWN; |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7017
diff
changeset
|
165 |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
166 if (arg1 == "estimate") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
167 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
168 meth = octave_fftw_planner::ESTIMATE; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
169 methf = octave_float_fftw_planner::ESTIMATE; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
170 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
171 else if (arg1 == "measure") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
172 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
173 meth = octave_fftw_planner::MEASURE; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
174 methf = octave_float_fftw_planner::MEASURE; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
175 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
176 else if (arg1 == "patient") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
177 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
178 meth = octave_fftw_planner::PATIENT; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
179 methf = octave_float_fftw_planner::PATIENT; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
180 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
181 else if (arg1 == "exhaustive") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
182 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
183 meth = octave_fftw_planner::EXHAUSTIVE; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
184 methf = octave_float_fftw_planner::EXHAUSTIVE; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
185 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
186 else if (arg1 == "hybrid") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
187 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
188 meth = octave_fftw_planner::HYBRID; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
189 methf = octave_float_fftw_planner::HYBRID; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
190 } |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
191 else |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
192 error ("unrecognized planner METHOD"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
193 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
194 if (!error_state) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
195 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
196 meth = octave_fftw_planner::method (meth); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
197 octave_float_fftw_planner::method (methf); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
198 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
199 if (meth == octave_fftw_planner::MEASURE) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
200 retval = octave_value ("measure"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
201 else if (meth == octave_fftw_planner::PATIENT) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
202 retval = octave_value ("patient"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
203 else if (meth == octave_fftw_planner::EXHAUSTIVE) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
204 retval = octave_value ("exhaustive"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
205 else if (meth == octave_fftw_planner::HYBRID) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
206 retval = octave_value ("hybrid"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
207 else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
208 retval = octave_value ("estimate"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
209 } |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
210 } |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
211 } |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
212 else |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
213 error ("fftw planner expects a string value as METHOD"); |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
214 } |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
215 else //planner getter |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
216 { |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11553
diff
changeset
|
217 octave_fftw_planner::FftwMethod meth = |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
218 octave_fftw_planner::method (); |
6228 | 219 |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
220 if (meth == octave_fftw_planner::MEASURE) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
221 retval = octave_value ("measure"); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
222 else if (meth == octave_fftw_planner::PATIENT) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
223 retval = octave_value ("patient"); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
224 else if (meth == octave_fftw_planner::EXHAUSTIVE) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
225 retval = octave_value ("exhaustive"); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
226 else if (meth == octave_fftw_planner::HYBRID) |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
227 retval = octave_value ("hybrid"); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
228 else |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
229 retval = octave_value ("estimate"); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
230 } |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
231 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
232 else if (arg0 == "dwisdom") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
233 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
234 if (nargin == 2) //dwisdom setter |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
235 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
236 if (args(1).is_string ()) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
237 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
238 // Use STL function to convert to lower case |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
239 std::transform (arg0.begin (), arg0.end (), arg0.begin (), |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
240 tolower); |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
241 std::string arg1 = args(1).string_value (); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
242 if (!error_state) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
243 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
244 char *str = fftw_export_wisdom_to_string (); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
245 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
246 if (arg1.length () < 1) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
247 fftw_forget_wisdom (); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
248 else if (! fftw_import_wisdom_from_string (arg1.c_str ())) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
249 error ("could not import supplied WISDOM"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
250 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
251 if (!error_state) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
252 retval = octave_value (std::string (str)); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
253 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
254 free (str); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
255 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
256 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
257 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
258 else //dwisdom getter |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
259 { |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
260 char *str = fftw_export_wisdom_to_string (); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
261 retval = octave_value (std::string (str)); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
262 free (str); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
263 } |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
264 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
265 else if (arg0 == "swisdom") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
266 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
267 //swisdom uses fftwf_ functions (float), dwisdom fftw_ (real) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
268 if (nargin == 2) //swisdom setter |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
269 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
270 if (args(1).is_string ()) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
271 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
272 // Use STL function to convert to lower case |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
273 std::transform (arg0.begin (), arg0.end (), arg0.begin (), |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
274 tolower); |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
275 std::string arg1 = args(1).string_value (); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
276 if (!error_state) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
277 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
278 char *str = fftwf_export_wisdom_to_string (); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
279 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
280 if (arg1.length () < 1) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
281 fftwf_forget_wisdom (); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
282 else if (! fftwf_import_wisdom_from_string (arg1.c_str ())) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
283 error ("could not import supplied WISDOM"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
284 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
285 if (!error_state) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
286 retval = octave_value (std::string (str)); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
287 |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
288 free (str); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
289 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
290 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
291 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
292 else //swisdom getter |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
293 { |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
294 char *str = fftwf_export_wisdom_to_string (); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
295 retval = octave_value (std::string (str)); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
296 free (str); |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
297 } |
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
298 } |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
299 else if (arg0 == "threads") |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
300 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
301 if (nargin == 2) //threads setter |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
302 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
303 if (args(1).is_real_scalar ()) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
304 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
305 int nthreads = args(1).int_value(); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
306 if ( nthreads >= 1) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
307 { |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
308 #if defined (HAVE_FFTW3_THREADS) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
309 octave_fftw_planner::threads (nthreads); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
310 #else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
311 warning ("this copy of Octave was not configured to use the multithreaded fftw libraries."); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
312 #endif |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
313 #if defined (HAVE_FFTW3F_THREADS) |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
314 octave_float_fftw_planner::threads (nthreads); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
315 #else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
316 warning ("this copy of Octave was not configured to use the multithreaded fftwf libraries."); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
317 #endif |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
318 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
319 else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
320 error ("number of threads must be >=1"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
321 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
322 else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
323 error ("setting threads needs one integer argument."); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
324 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
325 else //threads getter |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
326 #if defined (HAVE_FFTW3_THREADS) |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
327 retval = octave_value (octave_fftw_planner::threads()); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
328 #else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
329 retval = 1; |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
330 #endif |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
331 } |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
332 else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
333 error ("unrecognized argument"); |
10154
40dfc0c99116
DLD-FUNCTIONS/*.cc: untabify
John W. Eaton <jwe@octave.org>
parents:
9523
diff
changeset
|
334 } |
6228 | 335 } |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
336 else |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
337 error ("unrecognized argument"); |
6228 | 338 #else |
339 | |
9523
0ce82753dd72
more configure changes for libraries
John W. Eaton <jwe@octave.org>
parents:
9516
diff
changeset
|
340 warning ("fftw: this copy of Octave was not configured to use the FFTW3 planner"); |
6228 | 341 |
342 #endif | |
343 | |
344 return retval; | |
345 } | |
15741
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
346 |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
347 /* |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
348 %!testif HAVE_FFTW |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
349 %! def_method = fftw ("planner"); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
350 %! unwind_protect |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
351 %! method = "estimate"; |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
352 %! fftw ("planner", method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
353 %! assert (fftw ("planner"), method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
354 %! method = "measure"; |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
355 %! fftw ("planner", method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
356 %! assert (fftw ("planner"), method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
357 %! method = "patient"; |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
358 %! fftw ("planner", method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
359 %! assert (fftw ("planner"), method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
360 %! method = "exhaustive"; |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
361 %! fftw ("planner", method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
362 %! assert (fftw ("planner"), method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
363 %! method = "hybrid"; |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
364 %! fftw ("planner", method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
365 %! assert (fftw ("planner"), method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
366 %! unwind_protect_cleanup |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
367 %! fftw ("planner", def_method); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
368 %! end_unwind_protect |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
369 |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
370 %!error <Invalid call to fftw> fftw (); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
371 %!error <Invalid call to fftw> fftw ("planner", "estimate", "measure"); |
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
372 |
15960
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
373 %!testif HAVE_FFTW3_THREADS |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
374 %! n = fftw ("threads"); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
375 %! unwind_protect |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
376 %! fftw ("threads", 3); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
377 %! assert (fftw ("threads"), 3); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
378 %! unwind_protect_cleanup |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
379 %! fftw ("threads", n); |
bde7731b2b83
added FFTW multithreaded library support
Andreas Weber <andy.weber.aw@gmail.com>
parents:
15818
diff
changeset
|
380 %! end_unwind_protect |
15741
f63a4f23bfe7
Fix infinite loop when setting fftw planner method (bug #37873)
Mike Miller <mtmiller@ieee.org>
parents:
14138
diff
changeset
|
381 */ |