Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: FFTW 3.3.8: Wisdom Import Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:

Chris@82: Next: , Previous: , Up: Wisdom   [Contents][Index]

Chris@82:
Chris@82:
Chris@82: Chris@82:

4.7.2 Wisdom Import

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

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

Chris@82:

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

Chris@82:

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

Chris@82:

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

Chris@82:

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

Chris@82: Chris@82:

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

Chris@82:
Chris@82:
Chris@82:

Chris@82: Next: , Previous: , Up: Wisdom   [Contents][Index]

Chris@82:
Chris@82: Chris@82: Chris@82: Chris@82: Chris@82: