Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

FFTW Support Functions

The FFTW wrappers provide memory allocation functions to be used with FFTW:

void* fftw_malloc(size_t n);

void fftw_free(void* x);

The fftw_malloc wrapper aligns the memory on a 16-byte boundary.

If fftw_malloc fails to allocate memory, it aborts the application. To override this behavior, set a global variable fftw_malloc_hook and optionally the complementary variable fftw_free_hook:

void *(*fftw_malloc_hook) (size_t n);

void (*fftw_free_hook) (void *p);

The wrappers use the function fftw_die to abort the application in cases when a caller cannot be informed of an error otherwise (for example, in computational functions that return void). To override this behavior, set a global variable fftw_die_hook:

void (*fftw_die_hook)(const char *error_string);

void fftw_die(const char *s);