Converts the raw status into a result.
(self)
| 90 | impl IntoResult for sys::cudnnStatus_t { |
| 91 | /// Converts the raw status into a result. |
| 92 | fn into_result(self) -> Result<(), CudnnError> { |
| 93 | Err(match self { |
| 94 | sys::cudnnStatus_t::CUDNN_STATUS_SUCCESS => return Ok(()), |
| 95 | sys::cudnnStatus_t::CUDNN_STATUS_NOT_INITIALIZED => CudnnError::NotInitialized, |
| 96 | sys::cudnnStatus_t::CUDNN_STATUS_ALLOC_FAILED => CudnnError::AllocFailed, |
| 97 | sys::cudnnStatus_t::CUDNN_STATUS_BAD_PARAM => CudnnError::BadParam, |
| 98 | sys::cudnnStatus_t::CUDNN_STATUS_INTERNAL_ERROR => CudnnError::InternalError, |
| 99 | sys::cudnnStatus_t::CUDNN_STATUS_INVALID_VALUE => CudnnError::InvalidValue, |
| 100 | sys::cudnnStatus_t::CUDNN_STATUS_ARCH_MISMATCH => CudnnError::ArchMismatch, |
| 101 | sys::cudnnStatus_t::CUDNN_STATUS_MAPPING_ERROR => CudnnError::MappingError, |
| 102 | sys::cudnnStatus_t::CUDNN_STATUS_EXECUTION_FAILED => CudnnError::ExecutionFailed, |
| 103 | sys::cudnnStatus_t::CUDNN_STATUS_NOT_SUPPORTED => CudnnError::NotSupported, |
| 104 | sys::cudnnStatus_t::CUDNN_STATUS_LICENSE_ERROR => CudnnError::LicenseError, |
| 105 | sys::cudnnStatus_t::CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING => { |
| 106 | CudnnError::RuntimePrerequisiteMissing |
| 107 | } |
| 108 | sys::cudnnStatus_t::CUDNN_STATUS_RUNTIME_IN_PROGRESS => CudnnError::RuntimeInProgress, |
| 109 | sys::cudnnStatus_t::CUDNN_STATUS_RUNTIME_FP_OVERFLOW => CudnnError::RuntimeFpOverflow, |
| 110 | sys::cudnnStatus_t::CUDNN_STATUS_VERSION_MISMATCH => CudnnError::VersionMismatch, |
| 111 | }) |
| 112 | } |
| 113 | } |
no outgoing calls
no test coverage detected