Utility to create double-precision FFTW wisdom files. More...
Prototypes | |
void | print_help (void) |
Print basic usage information about the program and exit. More... | |
int | plan_problem (char type, char direc, UINT4 transform_size, int measurelvl) |
Function used only internally, to create an FFTW plan for a specified problem (thereby adding to wisdom) More... | |
int | main (int argc, char **argv) |
Main function. More... | |
Utility to create double-precision FFTW wisdom files.
This utility is designed to serve as a replacement for the utility fftw-wisdom that comes with FFTW. It will generate only the kind of plans that LAL supports, as well as a detailed, human readable description of those plans that is sent to stdout. This description can then be saved so that the user knows what transforms are included in the wisdom file (which is not itself human-readable).
The transforms to be planned must be specified in an input file, with one transform per line. The format is:
<type><direc><size>
where:
Both the <type> and <direc> specifiers are insensitive to case.
The invocation must also specify an output file, where the wisdom itself will be written. You may redirect stdout to save the human-readable description. This should always be APPENDED to the human readable description of any existing wisdom files (system or otherwise) that were read in as part of the execution; there is no way for lal_fftw_wisdom to print out the human readable description of any existing wisdom read in.
So, as an example, suppose that there is an existing system-wide file in /etc/fftw/wisdom, and that its human readable description is /etc/fftw/wisdom_description. Then if there is presently no plan for a complex, reverse transform of size 1048576 (or 2^20), then put the line:
cb1048576
into the file input_plans (say) and run:
cp /etc/fftw/wisdom_description new_description
lal_fftw_wisdom -i input_plans -o new_wisdom -l 3 >> new_description
When this has finished you can (as root) move new_wisdom to /etc/fftw/wisdom and new_description to /etc/fftw/wisdom_description. The same results could also be achieved by specifying any of cr1048576, CB1048576, etc, in input_plans.
Aside from the options specifying input and output files (which are mandatory) there are three other optional arguments. They are:
Definition in file fftw_wisdom.c.
Go to the source code of this file.
void print_help | ( | void | ) |
Print basic usage information about the program and exit.
Definition at line 113 of file fftw_wisdom.c.
int plan_problem | ( | char | type, |
char | direc, | ||
UINT4 | transform_size, | ||
int | measurelvl | ||
) |
Function used only internally, to create an FFTW plan for a specified problem (thereby adding to wisdom)
type | 'r' for real or 'c' for complex transform |
direc | 'f' for forward or 'b'/'r' for backward/reverse transform |
transform_size | Size of transform to plan |
measurelvl | Level of patience in planning (0 least, 3 most) |
Definition at line 154 of file fftw_wisdom.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Main function.
Reads command line specifying input and output files, and optionally wisdom file, measure level, and flag preventing import of system wide wisdom, and then creates plans for each problem specified in the input file. Accumulated wisdom is written to the output file, and a human readable description of the plans successfully created is written to stdout. Any warnings or errors are written to stderr.
Definition at line 270 of file fftw_wisdom.c.