23 #if defined (HAVE_CONFIG_H)
29 #if defined (HAVE_FFTW3_H)
139 #if defined (HAVE_FFTW)
143 if (nargin < 1 || nargin > 2)
148 std::string arg0 =
args(0).xstring_value (
"fftw: first argument must be a string");
150 if (arg0 ==
"planner")
155 std::transform (arg0.begin (), arg0.end (), arg0.begin (), tolower);
157 std::string arg1 =
args(1).xstring_value (
"fftw: METHOD must be a string");
159 std::transform (arg1.begin (), arg1.end (), arg1.begin (), tolower);
165 if (arg1 ==
"estimate")
170 else if (arg1 ==
"measure")
175 else if (arg1 ==
"patient")
180 else if (arg1 ==
"exhaustive")
185 else if (arg1 ==
"hybrid")
191 error (
"fftw: unrecognized planner METHOD");
224 else if (arg0 ==
"dwisdom")
232 std::string arg1 =
args(1).xstring_value (
"fftw: WISDOM must be a string");
234 char *
str = fftw_export_wisdom_to_string ();
238 if (arg1.length () < 1)
239 fftw_forget_wisdom ();
240 else if (! fftw_import_wisdom_from_string (arg1.c_str ()))
241 error (
"fftw: could not import supplied WISDOM");
247 char *
str = fftw_export_wisdom_to_string ();
253 else if (arg0 ==
"swisdom")
262 std::string arg1 =
args(1).xstring_value (
"fftw: WISDOM must be a string");
264 char *
str = fftwf_export_wisdom_to_string ();
268 if (arg1.length () < 1)
269 fftwf_forget_wisdom ();
270 else if (! fftwf_import_wisdom_from_string (arg1.c_str ()))
271 error (
"fftw: could not import supplied WISDOM");
277 char *
str = fftwf_export_wisdom_to_string ();
283 else if (arg0 ==
"threads")
287 if (!
args(1).is_real_scalar ())
288 error (
"fftw: setting threads needs one integer argument");
290 int nthreads =
args(1).int_value();
292 error (
"fftw: number of threads must be >=1");
294 #if defined (HAVE_FFTW3_THREADS)
299 #if defined (HAVE_FFTW3F_THREADS)
306 #if defined (HAVE_FFTW3_THREADS)
313 error (
"fftw: unrecognized argument");
319 octave_unused_parameter (
args);
OCTINTERP_API void print_usage(void)
void error(const char *fmt,...)
static FftwMethod method(void)
static FftwMethod method(void)
ColumnVector transform(const Matrix &m, double x, double y, double z)
#define DEFUN_DLD(name, args_name, nargout_name, doc)
void err_disabled_feature(const std::string &fcn, const std::string &feature, const std::string &pkg)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))