(&self, f: &mut std::fmt::Formatter<'_>)
| 73 | |
| 74 | impl Display for CudnnError { |
| 75 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 76 | unsafe { |
| 77 | let ptr = sys::cudnnGetErrorString(self.into_raw()); |
| 78 | let cow = CStr::from_ptr(ptr).to_string_lossy(); |
| 79 | f.write_str(cow.as_ref()) |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | impl Error for CudnnError {} |