gpucoder - Open GPU Coder app - MATLAB (original) (raw)
Main Content
Syntax
Description
gpucoder
opens the GPU Coder™ app. To create a project, in the Create GPU Coder Project dialog box, enter a name for the project and select a file location. To open an existing project, click Open and select the project file.
If you have the Embedded Coder® product, the app enables Embedded Coder features when it creates a project. To disable Embedded Coder features, in the project build settings, underAdvanced, set Use Embedded Coder features to No
.
gpucoder [projectname](#d126e5440)
orgpucoder -open `projectname`
opens the existing project named projectname.coderprj
by using the GPU Coder app.
gpucoder -new [projectname](#d126e5440)
creates a GPU Coder project named projectname.coderprj
and opens the GPU Coder app. If the Embedded Coder product is installed, the app enables Embedded Coder features when it creates a project.
gpucoder -ecoder false -new [projectname](#d126e5440)
opens the GPU Coder app creating a project named projectname.coderprj
. The app creates a project with the Embedded Coder features disabled, even if the Embedded Coder product is installed.
gpucoder -build [projectname](#d126e5440)
builds the existing project named projectname.coderprj
.
gpucoder -tocode [projectname](#d126e5440) -script [scriptname](#d126e5465)
creates a script named scriptname.m
containing the equivalent MATLAB® commands for the project settings inprojectname.coderprj
.
If scriptname.m
exists, gpucoder
overwrites it. The script:
- Creates a configuration object named
cfg
that contains project build configuration. - Defines the variable
inputTypes
for the function input types. - Defines the variable
globalVariables
for global data initial values. - Runs the
codegen
command. When you run the script, the entry-point functions that are arguments tocodegen
must be on the search path.
cfg
, inputTypes
, andglobalVariables
appear in the base workspace only after you run the script.
gpucoder -tocode [projectname](#d126e5440)
converts the existing project named projectname.prj
to the equivalent list of MATLAB commands and writes them to the Command Window.
gpucoder -toconfig [projectname](#d126e5440)
exports the code configuration settings stored in a GPU Coder project file to a code configuration object. Executing this command returns a code configuration object corresponding toprojectname
. For more information on which code configuration object is returned for different project file settings, see Share Build Configuration Settings.
[cfg](#mw%5F4175679e-8b66-40de-bb38-14861504680c) = gpucoder("-toconfig",[projectname](#d126e5440))
returns the code configuration settings stored in a GPU Coder project file to a code configuration object. Executing this command returns a code configuration object corresponding toprojectname
. For more information on which code configuration object is returned for different project file settings, see Share Build Configuration Settings.
Examples
Convert the GPU Coder project named myGPU_project.coderprj
to the MATLAB script named myGPU_script.m
.
gpucoder -tocode myGPU_project -script myGPU_script.m
Input Arguments
Name of GPU Coder project that you want to create, open, or build. The project name must not contain spaces.
Name of script that you want to create when using the-tocode
option with the -script
option. The script name must not contain spaces.
Output Arguments
Code configuration object that stores the configurations in a GPU Coder project file.
Version History
Introduced in R2017b
The gpucoder
function saves projects with the.coderprj
extension instead of a .prj
extension. If you open a GPU Coder project created in previous releases usinggpucoder
, the function saves a copy of the PRJ file as a CODERPRJ file. The GPU Coder app saves changes you make to the CODERPRJ file.
When opening a code generation project from a prior release, the app does not copy parameters specific to NVIDIA® Jetson™ or NVIDIA DRIVE® platforms from the PRJ file to the CODERPRJ file. If you open a project from a prior release that uses NVIDIA Jetson or NVIDIA DRIVE, verify the hardware settings before generating code.