Gets the descriptor associated with this array.
(&self)
| 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 |