(mut self)
| 64 | } |
| 65 | |
| 66 | pub fn into_array(mut self) -> CudaResult<Option<ArrayObject>> { |
| 67 | let desc = unsafe { ManuallyDrop::take(&mut self.resource_desc()?) }; |
| 68 | self._destroy_array_on_drop = false; |
| 69 | Ok(match desc.ty { |
| 70 | ResourceType::Array { array } => Some(array), |
| 71 | }) |
| 72 | } |
| 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>> { |
no test coverage detected