Package: coder.fftw
Superclasses:
Abstract class for specifying an FFTW library for FFTW calls in generated code
coder.fftw.StandaloneFFTW3Interface
is an abstract
class for defining an FFT library callback class. An FFT library callback class
specifies an FFT library to use for C/C++ code generated for MATLAB® fast Fourier transform functions. To define an FFT callback class for the
FFTW library, version 3.2 or later, use the coder.fftw.StandaloneFFTW3Interface
class. For example, to define an FFT
library callback class with the name useMyFFTW
, make this line the
first line of your class definition
file:
classdef useMyFFTW < coder.fftw.StandaloneFFTW3Interface
MATLAB fast Fourier transform functions include fft
, fft2
, fftn
, ifft
, ifft2
, and ifftn
. The code generator produces FFTW
library calls for these functions when all of these
conditions are true:
You generate standalone C/C++ code (static library, dynamically linked library, or executable program) with MATLAB Coder™ or generate C/C++ code from a MATLAB Function block with Simulink® Coder.
You have access to an FFTW library installation, version 3.2 or later.
You specify the FFTW library installation in an FFT library callback class
that derives from coder.fftw.StandaloneFFTW3Interface
.
You set the appropriate configuration parameter to the name of the callback class.
For code generation with the MATLAB
Coder
codegen
command, set
CustomFFTCallback
.
For code generation with the MATLAB Coder app, set Custom FFT library callback.
For code generation for a MATLAB Function block by using Simulink Coder, set Custom FFT library callback.
You must implement the updateBuildInfo
and
getNumThreads
methods.
Optionally, you can implement these methods:
getPlanMethod
lock
and unlock
All methods are static.
getNumThreads | Return number of threads to use for FFTW library calls |
getPlanMethod | Return FFTW planning method |
lock | Lock access to FFTW planning |
unlock | Unlock access to FFTW planning |
updateBuildInfo | Update the build information for linking to a specific FFTW library |