Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: FFTW 3.3.5: Wisdom Export Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42:
Chris@42:

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

Chris@42:
Chris@42:
Chris@42: Chris@42:

4.7.1 Wisdom Export

Chris@42: Chris@42:
Chris@42:
int fftw_export_wisdom_to_filename(const char *filename);
Chris@42: void fftw_export_wisdom_to_file(FILE *output_file);
Chris@42: char *fftw_export_wisdom_to_string(void);
Chris@42: void fftw_export_wisdom(void (*write_char)(char c, void *), void *data);
Chris@42: 
Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: Chris@42:

These functions allow you to export all currently accumulated wisdom Chris@42: in a form from which it can be later imported and restored, even Chris@42: during a separate run of the program. (See Words of Wisdom-Saving Plans.) The current store of wisdom is not affected by calling any Chris@42: of these routines. Chris@42:

Chris@42:

fftw_export_wisdom exports the wisdom to any output Chris@42: medium, as specified by the callback function Chris@42: write_char. write_char is a putc-like function that Chris@42: writes the character c to some output; its second parameter is Chris@42: the data pointer passed to fftw_export_wisdom. For Chris@42: convenience, the following three “wrapper” routines are provided: Chris@42:

Chris@42:

fftw_export_wisdom_to_filename writes wisdom to a file named Chris@42: filename (which is created or overwritten), returning 1 Chris@42: on success and 0 on failure. A lower-level function, which Chris@42: requires you to open and close the file yourself (e.g. if you want to Chris@42: write wisdom to a portion of a larger file) is Chris@42: fftw_export_wisdom_to_file. This writes the wisdom to the Chris@42: current position in output_file, which should be open with Chris@42: write permission; upon exit, the file remains open and is positioned Chris@42: at the end of the wisdom data. Chris@42:

Chris@42:

fftw_export_wisdom_to_string returns a pointer to a Chris@42: NULL-terminated string holding the wisdom data. This string is Chris@42: dynamically allocated, and it is the responsibility of the caller to Chris@42: deallocate it with free when it is no longer needed. Chris@42:

Chris@42:

All of these routines export the wisdom in the same format, which we Chris@42: will not document here except to say that it is LISP-like ASCII text Chris@42: that is insensitive to white space. Chris@42:

Chris@42:
Chris@42:
Chris@42:

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

Chris@42:
Chris@42: Chris@42: Chris@42: Chris@42: Chris@42: