GPU Coder
Generate CUDA code from MATLAB code
Description
The GPU Coder app generates CUDA® C++ code from MATLAB® code. You can generate CUDA C++ source code, static libraries, dynamically linked libraries, and executables that you can then integrate into existing CUDA C++ applications outside of MATLAB. You can also generate CUDA MEX functions for MATLAB acceleration. The GPU Coder™ app is integrated into the MATLAB desktop. You can use the app in the installed version of MATLAB and MATLAB Online™.
The app includes:
A GPU Coder tab where you can select the output type, configure the code generator, open the Entry Points pane, generate code, and verify code.
An Entry Points pane where you can add entry-point functions and global variables. You can define input types automatically or manually.
A GPU Coder panel that suggests next steps. In this panel, the Input section shows the entry-point functions and global variables. The Output section shows the output from code generation. After successfully generating code, the Output section links to the generated code.
Using the app, you can:
Generate code in MATLAB Online.
Create a project or open an existing project. The project specifies the input files, entry-point function input types, and build configuration.
Review code generation readiness issues, including unsupported functions.
Switch between the MATLAB Editor and the Entry Points pane.
Export project settings in the form of a MATLAB script.
Access generated files.
Package generated files as a single zip file for deployment outside of MATLAB.
If you have an Embedded Coder® license, verify the numerical behavior of generated code using software-in-the-loop or processor-in-the-loop execution.
Open the GPU Coder App
MATLAB Toolstrip: On the Apps tab, under Code Generation, click the app icon.
MATLAB Command Window: Enter
gpucoder
.