coder.gpuConfig
Configuration parameters for CUDA code generation from MATLAB code by using GPU Coder
Description
The coder.GpuCodeConfig or
coder.gpuConfig object contains the configuration parameters that
codegen uses for generating CUDA® MEX, a static library, a dynamically linked library, or an executable
program with GPU Coder™. Pass the object to the codegen function by using the
-config option.
Creation
Syntax
Description
cfg = coder.gpuConfig(
creates a code generation configuration object for the specified build type,
which can be CUDA MEX, a static library, a dynamically linked library, or an
executable program. If the Embedded Coder® product is installed, it creates a build_type)coder.EmbeddedCodeConfig object for static library, dynamic
library, or executable build types.
cfg = coder.gpuConfig(
creates a code generation configuration object to generate CUDA
build_type,'ecoder',false)'lib', 'dll', or 'exe'
output even if the Embedded Coder product is installed.
cfg = coder.gpuConfig(
creates a build_type,'ecoder',true)coder.EmbeddedCodeConfig
configuration object even if the Embedded Coder product is not installed. However, code generation using a
coder.EmbeddedCodeConfig object requires an Embedded Coder license.
Input Arguments
Properties
Examples
Limitations
For standalone targets such as static library, dynamically linked library, or executable program in the Windows® environment, the generated makefiles does not set
/MTor/MDcompiler flags. These flags indicate to the Visual Studio compiler to use the multithread library. By default, Visual Studio uses the/MTduring compilation. To pass other compiler specific flags, use theCompilerFlagsoption. For example,cfg.GpuConfig.CompilerFlags = '-Xcompiler /MD';The
nvcccompiler has limitations on input file suffixes. For example, if object file contains version numbers, compilation may fail. In such cases create symbolic links or pass'-Xlinker'to theCompilerFlags.