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

Method resource_desc

crates/cust/src/surface.rs:75–82  ·  view source on GitHub ↗

see Texture::resource_desc on why this is unsafe and private and returns a manuallydrop

(&mut self)

Source from the content-addressed store, hash-verified

73
74 // see Texture::resource_desc on why this is unsafe and private and returns a manuallydrop
75 unsafe fn resource_desc(&mut self) -> CudaResult<ManuallyDrop<ResourceDescriptor>> {
76 let raw = {
77 let mut uninit = MaybeUninit::<CUDA_RESOURCE_DESC>::uninit();
78 cuSurfObjectGetResourceDesc(uninit.as_mut_ptr(), self.handle).to_result()?;
79 uninit.assume_init()
80 };
81 Ok(ManuallyDrop::new(ResourceDescriptor::from_raw(raw)))
82 }
83}

Callers 2

dropMethod · 0.45
into_arrayMethod · 0.45

Calls 3

newFunction · 0.85
to_resultMethod · 0.45
as_mut_ptrMethod · 0.45

Tested by

no test coverage detected