SIMD Code Generation
You can generate SIMD code from certain algorithms in DSP System Toolbox such as the FIR filter and the LMS filter which are computationally intensive. The SIMD intrinsics significantly improve the performance of the code generated from these algorithms, in most cases meeting or exceeding the simulation performance. SIMD is a computing paradigm in which a single instruction processes multiple data. Many modern processors have SIMD instructions that, for example, perform several additions or multiplications at once.
You can generate SIMD code using the DSP Intel
AVX2-FMA
code replacement library (only for AVX2 platform)
or by using the model configuration parameter Leverage target
hardware instruction set extensions (for Apple processors, ARM®
Cortex®-A processors, and all Intel® platforms).
To generate SIMD code from MATLAB® System objects, you need MATLAB Coder™ and Embedded Coder®. To generate SIMD code from Simulink® blocks using the Intel AVX2 code replacement library, you need Embedded Coder. To generate SIMD code from Simulink blocks using the model configuration parameter Leverage target hardware instruction set extensions, you need Simulink Coder or Embedded Coder.
Topics
- System objects in DSP System Toolbox that Support SIMD Code Generation
List of System objects that support SIMD code generation.
- Simulink Blocks in DSP System Toolbox that Support SIMD Code Generation
List of Simulink blocks in DSP System Toolbox that support SIMD code generation.
- Use Intel AVX2 Code Replacement Library to Generate SIMD Code from MATLAB Algorithms
Generate high performance SIMD Code from MATLAB algorithms in DSP System Toolbox using Intel AVX2 code replacement library.
- Use Intel AVX2 Code Replacement Library to Generate SIMD Code from Simulink Blocks
Generate high performance SIMD code from Simulink blocks in DSP System Toolbox using Intel AVX2 code replacement library.
- Use Target Hardware Instruction Set Extensions to Generate SIMD Code from Simulink Blocks for Intel Platforms
Generate high performance SIMD Code from Simulink Blocks in DSP System Toolbox by using the Leverage target hardware instruction set extensions model configuration parameter.
- Use Target Hardware Instruction Set Extensions to Generate SIMD Code from Simulink Blocks for Apple silicon
Generate high performance SIMD Code from Simulink Blocks in DSP System Toolbox by using the ARM Neon technology for Apple silicon platforms.
- Use Target Hardware Instruction Set Extensions to Generate SIMD Code from Simulink Blocks for ARM Cortex-A Processors
Generate high performance SIMD Code from Simulink Blocks in DSP System Toolbox by using the Embedded Coder Support Package for ARM Cortex-A Processors.