Main Content

Compiler flags

Pass additional flags to GPU compiler

Description

App Configuration Pane: GPU Code

Configuration Objects: coder.GpuCodeConfig

The Compiler flags parameter passes additional flags to the GPU compiler.

For example, to instruct the nvcc compiler to disable contraction of floating-point multiply and add to a floating-point multiply-add (FMAD) instruction, specify this for the Compiler flags parameter:

--fmad=false

For similar NVIDIA® compiler options, see the topic on "NVCC Command Options" in the CUDA® Toolkit documentation.

Settings

no default

Enter the flags to pass to the GPU compiler.

Programmatic Use

Property: CompilerFlags
Values: '' | character vector | string scalar
Default: ''

Tips

  • On Windows® platforms, the generated makefiles for standalone targets, such as dynamic libraries, static libraries, and executables, do not set the /MT or /MD compiler flags. These flags direct the Visual Studio® compiler to use the multithread library. By default, Visual Studio uses the /MT flag during compilation. To specify the /MD flag, specify -Xcompiler /MD in the Compiler flags parameter.

Version History

Introduced in R2018a