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™。您可以在原型设计时加快代码,通信工具箱包括可以在图形处理单元(GPU)上执行的一些功能。
C/C++ Code Generation.开发应用程序后,您可以从Matlab代码和Simulink模型生成便携式C / C ++源代码,独立的可执行文件或独立应用程序。金宝appC / C ++代码生成使您可以在没有MATLAB的计算机上运行模拟,并在您在MATLAB工作时加速处理。有关支持C / C ++代码生成的通信工具箱功能列表,请参阅金宝appFunctions and System Objects Supporting C Code Generation。You needMATLAB Coderto generate C/C++ code. For more information, see从MATLAB代码生成C代码Video。
GPU Code Acceleration.为了在原型设计时加快代码,通信工具箱包含可以在图形处理单元(GPU)上执行的一些功能。你可以使用gpuArray
(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
话题
- 从MATLAB代码生成C代码
Prepare MATLAB code for code generation and generate C-MEX code and a C executable.
- Generate C Code from Simulink Model
构建一个可执行文件并在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.