cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: FFTW 3.3.5: Wisdom Import cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127:
cannam@127:

cannam@127: Next: , Previous: , Up: Wisdom   [Contents][Index]

cannam@127:
cannam@127:
cannam@127: cannam@127:

4.7.2 Wisdom Import

cannam@127: cannam@127:
cannam@127:
int fftw_import_system_wisdom(void);
cannam@127: int fftw_import_wisdom_from_filename(const char *filename);
cannam@127: int fftw_import_wisdom_from_string(const char *input_string);
cannam@127: int fftw_import_wisdom(int (*read_char)(void *), void *data);
cannam@127: 
cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: cannam@127:

These functions import wisdom into a program from data stored by the cannam@127: fftw_export_wisdom functions above. (See Words of Wisdom-Saving Plans.) The imported wisdom replaces any wisdom cannam@127: already accumulated by the running program. cannam@127:

cannam@127:

fftw_import_wisdom imports wisdom from any input medium, as cannam@127: specified by the callback function read_char. read_char is cannam@127: a getc-like function that returns the next character in the cannam@127: input; its parameter is the data pointer passed to cannam@127: fftw_import_wisdom. If the end of the input data is reached cannam@127: (which should never happen for valid data), read_char should cannam@127: return EOF (as defined in <stdio.h>). For convenience, cannam@127: the following three “wrapper” routines are provided: cannam@127:

cannam@127:

fftw_import_wisdom_from_filename reads wisdom from a file named cannam@127: filename. A lower-level function, which requires you to open cannam@127: and close the file yourself (e.g. if you want to read wisdom from a cannam@127: portion of a larger file) is fftw_import_wisdom_from_file. This cannam@127: reads wisdom from the current position in input_file (which cannam@127: should be open with read permission); upon exit, the file remains cannam@127: open, but the position of the read pointer is unspecified. cannam@127:

cannam@127:

fftw_import_wisdom_from_string reads wisdom from the cannam@127: NULL-terminated string input_string. cannam@127:

cannam@127:

fftw_import_system_wisdom reads wisdom from an cannam@127: implementation-defined standard file (/etc/fftw/wisdom on Unix cannam@127: and GNU systems). cannam@127: cannam@127:

cannam@127: cannam@127:

The return value of these import routines is 1 if the wisdom was cannam@127: read successfully and 0 otherwise. Note that, in all of these cannam@127: functions, any data in the input stream past the end of the wisdom data cannam@127: is simply ignored. cannam@127:

cannam@127:
cannam@127:
cannam@127:

cannam@127: Next: , Previous: , Up: Wisdom   [Contents][Index]

cannam@127:
cannam@127: cannam@127: cannam@127: cannam@127: cannam@127: