d@0: d@0: d@0: Wisdom Import - FFTW 3.2.1 d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0: d@0:
d@0:

d@0: d@0: Next: , d@0: Previous: Wisdom Export, d@0: Up: Wisdom d@0:


d@0:
d@0: d@0:

4.7.2 Wisdom Import

d@0: d@0:
     int fftw_import_system_wisdom(void);
d@0:      int fftw_import_wisdom_from_file(FILE *input_file);
d@0:      int fftw_import_wisdom_from_string(const char *input_string);
d@0:      int fftw_import_wisdom(int (*read_char)(void *), void *data);
d@0: 
d@0:

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

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

fftw_import_wisdom_from_file reads wisdom from the current d@0: position in input_file, which should be open with read d@0: permission. Upon exit, the file remains open, but the position of the d@0: read pointer is unspecified. d@0: d@0:

fftw_import_wisdom_from_string reads wisdom from the d@0: NULL-terminated string input_string. d@0: d@0:

fftw_import_system_wisdom reads wisdom from an d@0: implementation-defined standard file (/etc/fftw/wisdom on Unix d@0: and GNU systems). d@0: d@0: The return value of these import routines is 1 if the wisdom was d@0: read successfully and 0 otherwise. Note that, in all of these d@0: functions, any data in the input stream past the end of the wisdom data d@0: is simply ignored. d@0: d@0: d@0: d@0: