配置参数CUDA代码生成的马铃薯使用代码GPU编码器
的编码器。GpuCodeConfig
要么Coder.gpuconfig.
对象包含的配置参数Codegen.
用于生成CUDA®MEX,一个静态库,一个动态链接库,或一个带有GPU Coder™的可执行程序。将对象传递给Codegen.
使用使用的功能-Config.
选择。
cfg = coder.gpuConfig (
为指定的构建类型创建代码生成配置对象,它可以是CUDA MEX,静态库,动态链接库或可执行程序。如果是嵌入式编码器®产品安装了,它创造了一个build_type.
)Coder.embeddedCodeConfig
对象,用于静态库、动态库或可执行构建类型。
cfg = coder.gpuConfig (
创建代码生成配置对象以生成CUDAbuild_type.
,'ecoder',false)“自由”
,'DLL'
, 要么'可执行程序'
输出即使安装了嵌入式编码器产品也是如此。
cfg = coder.gpuConfig (
创造一个build_type.
,'ecoder',true)Coder.embeddedCodeConfig
即使未安装嵌入式编码器产品,也是Configuration对象。但是,使用a的代码生成Coder.embeddedCodeConfig
对象需要嵌入的编码器许可证。
GPU编码器总是设置PassstructByReference.
财产的财产coder.codeConfig
和Coder.embeddedCodeConfig
代码配置对象为true。
GPU编码器总是设置启发性leftsprifts.
和启发性的archights.
财产的财产Coder.embeddedCodeConfig
代码配置对象为true。
对于独立的目标,如静态库、动态链接库或Windows中的可执行程序®环境,生成的makefiles没有设置/公吨
要么/ MD.
编译器标志。这些标志指示Visual Studio编译器使用多线程库。默认情况下,Visual Studio使用/公吨
在汇编期间。要传递其他编译器特定标志,请使用Compilerflags.
选择。例如,
cfg.GpuConfig.CompilerFlags ='-xcompiler / md';
的学校网站
编译器对输入文件后缀有限制。例如,如果目标文件包含版本号,编译可能会失败。在这种情况下,创建符号链接或传递'-xlinker'
到了Compilerflags.
.
Codegen.
|coder.gpu.constantmemory.
|coder.gpu.kernel.
|coder.gpu.nokernel.
|gpucoder.matrixmatrixkernel.
|gpucoder.reduce.reduce.
|gpucoder.sort
|gpucoder.stencilKernel