Code Generation and Acceleration Support
You can generate C code from your MATLAB and Simulink model designs. Some Communications Toolbox™ blocks and System objects provide support for C code generation when you use them withMATLAB Coder™. You can speed up your code while prototyping, Communications Toolbox includes some functions that can execute on a Graphics Processing Unit (GPU).
C/C++ Code Generation.在开发应用程序之后,您可以属te portable C/C++ source code, standalone executables, or standalone applications from your MATLAB code and Simulink models. C/C++ code generation enables you to run your simulation on machines that do not have MATLAB installed and to speed up processing while you work in MATLAB. For a list of Communications Toolbox features that support C/C++ code generation, seeFunctions and System Objects Supporting C Code Generation. You needMATLAB Coderto generate C/C++ code. For more information, seeGenerate C Code from MATLAB Code Video.
GPU Code Acceleration.To speed up your code while prototyping, Communications Toolbox includes some features that can execute on a Graphics Processing Unit (GPU). You can use thegpuArray
(Parallel Computing Toolbox)function to transfer data to the GPU and then call thegather
(Parallel Computing Toolbox)function to retrieve the output data from the GPU. For a list of Communications Toolbox features that support GPU code generation, seeGPU Arrays Support List for System Objects. You need Parallel Computing Toolbox™ to enable GPU support.
Apps
MATLAB Coder | Generate C code or MEX function fromMATLABcode |
Functions
Topics
- Generate C Code from MATLAB Code
Prepare MATLAB code for code generation and generate C-MEX code and a C executable.
- Generate C Code from Simulink Model
Build an executable and run the executable within MATLAB.
- Generate C Code at the Command Line(MATLAB Coder)
Generate C/C++ code from MATLAB code by using the
codegen
command. - Run MATLAB Functions on a GPU(Parallel Computing Toolbox)
Hundreds of functions in MATLAB and other toolboxes run automatically on a GPU if you supply a
gpuArray
(Parallel Computing Toolbox) argument. - Prerequisites for Deep Learning with MATLAB Coder(MATLAB Coder)
Install products and configure environment for code generation for deep learning networks.
- GPU Support by Release(Parallel Computing Toolbox)
Support for NVIDIA®GPU architectures.