23 #if defined (HAVE_CONFIG_H) 30 #if defined (HAVE_FFTW3_H) 139 #if defined (HAVE_FFTW) 141 int nargin = args.length ();
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 ();
236 error (
"fftw: could not get current FFTW wisdom");
241 if (arg1.length () < 1)
242 fftw_forget_wisdom ();
243 else if (! fftw_import_wisdom_from_string (arg1.c_str ()))
244 error (
"fftw: could not import supplied WISDOM");
250 char *
str = fftw_export_wisdom_to_string ();
252 error (
"fftw: could not get current FFTW wisdom");
259 else if (arg0 ==
"swisdom")
268 std::string arg1 = args(1).xstring_value (
"fftw: WISDOM must be a string");
270 char *
str = fftwf_export_wisdom_to_string ();
272 error (
"fftw: could not get current FFTW wisdom");
277 if (arg1.length () < 1)
278 fftwf_forget_wisdom ();
279 else if (! fftwf_import_wisdom_from_string (arg1.c_str ()))
280 error (
"fftw: could not import supplied WISDOM");
286 char *
str = fftwf_export_wisdom_to_string ();
288 error (
"fftw: could not get current FFTW wisdom");
295 else if (arg0 ==
"threads")
299 if (! args(1).is_real_scalar ())
300 error (
"fftw: setting threads needs one integer argument");
302 int nthreads = args(1).int_value();
304 error (
"fftw: number of threads must be >=1");
306 #if defined (HAVE_FFTW3_THREADS) 311 #if defined (HAVE_FFTW3F_THREADS) 318 #if defined (HAVE_FFTW3_THREADS) 325 error (
"fftw: unrecognized argument");
331 octave_unused_parameter (args);
OCTINTERP_API void print_usage(void)
void error(const char *fmt,...)
static FftwMethod method(void)
static FftwMethod method(void)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
ColumnVector transform(const Matrix &m, double x, double y, double z)
#define DEFUN_DLD(name, args_name, nargout_name, doc)
Macro to define an at run time dynamically loadable builtin function.
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