coder.fftw.StandaloneFFTW3Interface class
Package:coder.fftw
Superclasses:
Abstract class for specifying an FFTW library for FFTW calls in generated code
Description
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 thecoder.fftw.StandaloneFFTW3Interface
class. For example, to define an FFT library callback class with the nameuseMyFFTW
, make this line the first line of your class definition file:
classdef useMyFFTW < coder.fftw.StandaloneFFTW3Interface
MATLAB fast Fourier transform functions includefft
,fft2
,fftn
,ifft
,ifft2
, andifftn
. 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) withMATLAB Coder™or generate C/C++ code from aMATLAB Functionblock with万博1manbetx®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 theMATLAB Coder
codegen
command, setCustomFFTCallback
.For code generation with theMATLAB Coderapp, setCustom FFT library callback.
For code generation for aMATLAB Functionblock by usingSimulink Coder, setCustom FFT library callback.
You must implement theupdateBuildInfo
andgetNumThreads
methods.
Optionally, you can implement these methods:
getPlanMethod
lock
andunlock
All methods are static.
Methods
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 |
Examples
See Also
Topics
- Speed Up Fast Fourier Transforms in Generated Standalone Code by Using FFTW Library Calls
- Synchronize Multithreaded Access to FFTW Planning in Generated Standalone Code
- Speed Up Fast Fourier Transforms in Code Generated from a MATLAB Function Block(Simulink Coder)
- Synchronize Multithreaded FFTW Planning in Code Generated from a MATLAB Function Block(Simulink Coder)