#[repr(C)]pub struct cudaPointerAttributes {
pub type_: cudaMemoryType,
pub device: c_int,
pub devicePointer: *mut c_void,
pub hostPointer: *mut c_void,
pub __bindgen_anon_1: cudaPointerAttributes__bindgen_ty_1,
pub reserved: [c_long; 7],
}Expand description
CUDA pointer attributes.
Fields§
§type_: cudaMemoryTypeThe type of memory - cudaMemoryType::cudaMemoryTypeUnregistered, cudaMemoryType::cudaMemoryTypeHost, cudaMemoryType::cudaMemoryTypeDevice or cudaMemoryType::cudaMemoryTypeManaged.
device: c_intThe device against which the memory was allocated or registered.
If the memory type is cudaMemoryType::cudaMemoryTypeDevice then this identifies the device on which the memory referred physically resides. If the memory type is cudaMemoryType::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_voidThe address which may be dereferenced on the current device to access the memory or NULL if no such address exists.
hostPointer: *mut c_voidThe 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.
__bindgen_anon_1: cudaPointerAttributes__bindgen_ty_1Anonymous native member. See cudaPointerAttributes__bindgen_ty_1 for its fields.
reserved: [c_long; 7]Must be zero.