Chris@10: Chris@10: Chris@10: Wisdom Import - FFTW 3.3.3 Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10: Chris@10:
Chris@10: Chris@10:

Chris@10: Next: , Chris@10: Previous: Wisdom Export, Chris@10: Up: Wisdom Chris@10:


Chris@10:
Chris@10: Chris@10:

4.7.2 Wisdom Import

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

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

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

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

fftw_import_wisdom_from_string reads wisdom from the Chris@10: NULL-terminated string input_string. Chris@10: Chris@10:

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

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