Struct rcudnn::cudaPointerAttributes[][src]

#[repr(C)]
pub struct cudaPointerAttributes { pub type_: cudaMemoryType, pub device: i32, pub devicePointer: *mut c_void, pub hostPointer: *mut c_void, }
Expand description

CUDA pointer attributes

Fields

type_: cudaMemoryType

The type of memory - ::cudaMemoryTypeUnregistered, ::cudaMemoryTypeHost, ::cudaMemoryTypeDevice or ::cudaMemoryTypeManaged.

device: i32

The device against which the memory was allocated or registered. If the memory type is ::cudaMemoryTypeDevice then this identifies the device on which the memory referred physically resides. If the memory type is ::cudaMemoryTypeHost or::cudaMemoryTypeManaged then this identifies the device which was current when the memory was allocated or registered (and if that device is deinitialized then this allocation will vanish with that device’s state).

devicePointer: *mut c_void

The address which may be dereferenced on the current device to access the memory or NULL if no such address exists.

hostPointer: *mut c_void

The address which may be dereferenced on the host to access the memory or NULL if no such address exists.

\note CUDA doesn’t check if unregistered memory is allocated so this field may contain invalid pointer if an invalid pointer has been passed to CUDA.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.