Malloc mode - GPU memory allocation - MATLAB (original) (raw)

Main Content

Description

App Configuration Pane: GPU Code

Configuration Objects: coder.gpuConfig

The Malloc Mode parameter specifies the memory allocation mode to use in the generated CUDA® code. For more information, see Discrete and Managed Modes.

Settings

discrete

This value is the default value.

Uses the cudaMalloc API to transfer data between the CPU and the GPU. This mode has a traditional memory architecture with separate CPU and GPU global memory address space.

unified

Uses the cudaMallocManaged API, which uses a unified CPU and GPU global memory address space.

Programmatic Use

**Property:**MallocMode
Values: "discrete" |"unified"
Default: "discrete"

Version History

Introduced in R2018a