Copyright (C) 2000-2012 |
GNU Info (fftw.info)fftw_import_wisdomImporting Wisdom ---------------- #include <fftw.h> fftw_status fftw_import_wisdom(int (*get_input)(void *), void *data); fftw_status fftw_import_wisdom_from_file(FILE *input_file); fftw_status fftw_import_wisdom_from_string(const char *input_string); These functions import `wisdom' into a program from data stored by the `fftw_export_wisdom' functions above. (Note: Words of Wisdom.) The imported `wisdom' supplements rather than replaces any `wisdom' already accumulated by the running program (except when there is conflicting `wisdom', in which case the existing wisdom is replaced). `fftw_import_wisdom' imports `wisdom' from any input medium, as specified by the callback function `get_input'. `get_input' is a `getc'-like function that returns the next character in the input; its parameter is the `data' pointer passed to `fftw_import_wisdom'. If the end of the input data is reached (which should never happen for valid data), it may return either `NULL' (ASCII 0) or `EOF' (as defined in `<stdio.h>'). For convenience, the following two "wrapper" routines are provided: `fftw_import_wisdom_from_file' reads `wisdom' from the current position in `input_file', which should be open with read permission. Upon exit, the file remains open and is positioned at the end of the `wisdom' data. `fftw_import_wisdom_from_string' reads `wisdom' from the `NULL'-terminated string `input_string'. The return value of these routines is `FFTW_SUCCESS' if the wisdom was read successfully, and `FFTW_FAILURE' otherwise. Note that, in all of these functions, any data in the input stream past the end of the `wisdom' data is simply ignored (it is not even read if the `wisdom' data is well-formed). automatically generated by info2www version 1.2.2.9 |