MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / descriptor

Method descriptor

crates/cust/src/memory/array.rs:725–734  ·  view source on GitHub ↗

Gets the descriptor associated with this array.

(&self)

Source from the content-addressed store, hash-verified

723
724 /// Gets the descriptor associated with this array.
725 pub fn descriptor(&self) -> CudaResult<ArrayDescriptor> {
726 // Use "zeroed" incase CUDA_ARRAY3D_DESCRIPTOR has uninitialized padding
727 let mut raw_descriptor = MaybeUninit::zeroed();
728 unsafe { cuda::cuArray3DGetDescriptor_v2(raw_descriptor.as_mut_ptr(), self.handle) }
729 .to_result()?;
730
731 Ok(ArrayDescriptor::from_raw(unsafe {
732 raw_descriptor.assume_init()
733 }))
734 }
735
736 /// Try to destroy an `ArrayObject`. Can fail - if it does, returns the CUDA error and the
737 /// un-destroyed array object

Callers 10

copy_fromMethod · 0.45
copy_toMethod · 0.45
as_host_vecMethod · 0.45
fmtMethod · 0.45
descriptor_round_tripFunction · 0.45
allow_1d_arraysFunction · 0.45
allow_2d_arraysFunction · 0.45
allow_1d_layered_arraysFunction · 0.45
allow_cubemapsFunction · 0.45
allow_layered_cubemapsFunction · 0.45

Calls 2

to_resultMethod · 0.45
as_mut_ptrMethod · 0.45

Tested by 6

descriptor_round_tripFunction · 0.36
allow_1d_arraysFunction · 0.36
allow_2d_arraysFunction · 0.36
allow_1d_layered_arraysFunction · 0.36
allow_cubemapsFunction · 0.36
allow_layered_cubemapsFunction · 0.36