(self)
| 37 | |
| 38 | impl ToResult for sys::v2::cublasStatus_t { |
| 39 | fn to_result(self) -> Result<(), CublasError> { |
| 40 | use CublasError::*; |
| 41 | |
| 42 | Err(match self { |
| 43 | sys::v2::cublasStatus_t::CUBLAS_STATUS_SUCCESS => return Ok(()), |
| 44 | sys::v2::cublasStatus_t::CUBLAS_STATUS_NOT_INITIALIZED => NotInitialized, |
| 45 | sys::v2::cublasStatus_t::CUBLAS_STATUS_ALLOC_FAILED => AllocFailed, |
| 46 | sys::v2::cublasStatus_t::CUBLAS_STATUS_INVALID_VALUE => InvalidValue, |
| 47 | sys::v2::cublasStatus_t::CUBLAS_STATUS_ARCH_MISMATCH => ArchMismatch, |
| 48 | sys::v2::cublasStatus_t::CUBLAS_STATUS_MAPPING_ERROR => MappingError, |
| 49 | sys::v2::cublasStatus_t::CUBLAS_STATUS_EXECUTION_FAILED => ExecutionFailed, |
| 50 | sys::v2::cublasStatus_t::CUBLAS_STATUS_INTERNAL_ERROR => InternalError, |
| 51 | sys::v2::cublasStatus_t::CUBLAS_STATUS_NOT_SUPPORTED => NotSupported, |
| 52 | sys::v2::cublasStatus_t::CUBLAS_STATUS_LICENSE_ERROR => LicenseError, |
| 53 | }) |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | impl CublasError { |
no outgoing calls
no test coverage detected