Main Content

gpucoder

Open GPU Coder app

Description

gpucoder opens the GPU Coder™ app. To create a project, provide the entry-point file name on the Select Source Files page. The app creates a project with the name of the first entry-point file as the default name. To open an existing project, click , and select Open existing project.

If the Embedded Coder® product is installed, the app enables Embedded Coder features when it creates a project. To disable Embedded Coder features, in the project build settings, on the All Settings tab, under Advanced, set Use Embedded Coder features to No.

gpucoder projectname or gpucoder -open projectname opens the existing project named projectname.prj by using the GPU Coder app.

gpucoder -new projectname creates a GPU Coder project named projectname.prj 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 opens the GPU Coder app creating a project named projectname.prj. The app creates a project with the Embedded Coder features disabled, even if the Embedded Coder product is installed.

gpucoder -build projectname builds the existing project named projectname.prj.

gpucoder -tocode projectname -script scriptname creates a script named scriptname.m containing the equivalent MATLAB® commands for the project settings in projectname.prj.

If scriptname.m exists, gpucoder overwrites it. The script:

  • Creates a configuration object named cfg that contains project build configuration.

  • Defines the variable ARGS for the function input types.

  • Defines the variable GLOBALS for global data initial values.

  • Runs the codegen command. When you run the script, the entry-point functions that are arguments to codegen must be on the search path.

cfg, ARGS, and GLOBALS appear in the base workspace only after you run the script.

example

gpucoder -tocode projectname converts the existing project named projectname.prj to the equivalent list of MATLAB commands and writes them to the Command Window.

gpucoder -toconfig projectname 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 to projectname. For more information on which code configuration object is returned for different project file settings, see Share Build Configuration Settings.

gpucoder -typeEditor opens an empty Coder Type Editor dialog. If a dialog is already open, this command brings it to the front of the screen.

See Create and Edit Input Types by Using the Coder Type Editor.

Examples

collapse all

Convert the GPU Coder project named myGPU_project.prj to the MATLAB script named myGPU_script.m.

coder -tocode myGPU_project -script myGPU_script.m

Input Arguments

collapse all

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.

Version History

Introduced in R2017b