[][src]Module accel::memory

Memory management

Unified address

Memory Types

namewhere existsFrom HostFrom DeviceAs sliceDescription
(usual) Host memoryHost-allocated by usual manner, e.g. vec![0; n]
RegisteredMemoryHostA host memory registered into CUDA memory management system
PageLockedMemoryHostOS memory paging is disabled for accelerating memory transfer
DeviceMemoryDeviceallocated on device as a single span
ArrayDevice-properly aligned memory on device for using Texture and Surface memory

Traits

traits[T]RegisteredMemoryPageLockedMemoryDeviceMemoryArrayDescription
MemoryHas Unified address and element size
Contexted-with CUDA Context
Continuous-Can be treated as a Rust slice
Allocatable--Newly allocatable with its shape and value

Modules

array

CUDA Array and Texture, Surface Objects

device

Device and Host memory handlers

dimension
info
page_locked

Device and Host memory handlers

registered
scalar
slice

Structs

Array
ArrayFlag
DeviceMemory

Memory allocated on the device.

Ix1

Spec of 1D Array

Ix1Layered

Spec of Layered 1D Array

Ix2

Spec of 2D Array

Ix2Layered

Spec of Layered 2D Array

Ix3

Spec of 3D Array

PageLockedMemory

Host memory as page-locked.

RegisteredMemory

Enums

ArrayFormatTag
MemoryType

Memory type

NumChannels

This specifies the number of packed elements per "CUDA array element".

Traits

Allocatable

Allocatable memories with CUDA context

Continuous

Memory which has continuous 1D index, i.e. can be treated as a Rust slice

Dimension
Memcpy

Copy data from one to another

Memory

Has unique head address and allocated size.

Scalar

Functions

free_memory

Get free memory size in bytes of the current device

total_memory

Get total memory size in bytes of the current device

Type Definitions

Descriptor