MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / to_result

Method to_result

crates/blastoff/src/error.rs:39–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37
38impl 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
57impl CublasError {

Callers 15

amin_stridedMethod · 0.45
amax_stridedMethod · 0.45
axpy_stridedMethod · 0.45
copy_stridedMethod · 0.45
dot_stridedMethod · 0.45
dotu_stridedMethod · 0.45
dotc_stridedMethod · 0.45
nrm2_stridedMethod · 0.45
rot_stridedMethod · 0.45
newMethod · 0.45
dropMethod · 0.45
versionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected