d@0: d@0:
d@0:d@0: d@0: Previous: Precision, d@0: Up: Data Types and Files d@0:
void *fftw_malloc(size_t n); d@0: void fftw_free(void *p); d@0:d@0:
d@0: These are functions that behave identically to malloc
and
d@0: free
, except that they guarantee that the returned pointer obeys
d@0: any special alignment restrictions imposed by any algorithm in FFTW
d@0: (e.g. for SIMD acceleration). See Data Alignment.
d@0:
d@0: Data allocated by fftw_malloc
must be deallocated by
d@0: fftw_free
and not by the ordinary free
.
d@0:
d@0:
These routines simply call through to your operating system's
d@0: malloc
or, if necessary, its aligned equivalent
d@0: (e.g. memalign
), so you normally need not worry about any
d@0: significant time or space overhead. You are not required to use
d@0: them to allocate your data, but we strongly recommend it.
d@0:
d@0:
Note: in C++, just as with ordinary malloc
, you must typecast
d@0: the output of fftw_malloc
to whatever pointer type you are
d@0: allocating.
d@0:
d@0:
d@0:
d@0:
d@0: