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

Method into_raw

crates/cudnn/src/error.rs:52–71  ·  view source on GitHub ↗

Converts the `CudnnError` into the corresponding raw variant.

(self)

Source from the content-addressed store, hash-verified

50impl CudnnError {
51 /// Converts the `CudnnError` into the corresponding raw variant.
52 pub fn into_raw(self) -> sys::cudnnStatus_t {
53 match self {
54 CudnnError::NotInitialized => sys::cudnnStatus_t::CUDNN_STATUS_NOT_INITIALIZED,
55 CudnnError::AllocFailed => sys::cudnnStatus_t::CUDNN_STATUS_ALLOC_FAILED,
56 CudnnError::BadParam => sys::cudnnStatus_t::CUDNN_STATUS_BAD_PARAM,
57 CudnnError::InternalError => sys::cudnnStatus_t::CUDNN_STATUS_INTERNAL_ERROR,
58 CudnnError::InvalidValue => sys::cudnnStatus_t::CUDNN_STATUS_INVALID_VALUE,
59 CudnnError::ArchMismatch => sys::cudnnStatus_t::CUDNN_STATUS_ARCH_MISMATCH,
60 CudnnError::MappingError => sys::cudnnStatus_t::CUDNN_STATUS_MAPPING_ERROR,
61 CudnnError::ExecutionFailed => sys::cudnnStatus_t::CUDNN_STATUS_EXECUTION_FAILED,
62 CudnnError::NotSupported => sys::cudnnStatus_t::CUDNN_STATUS_NOT_SUPPORTED,
63 CudnnError::LicenseError => sys::cudnnStatus_t::CUDNN_STATUS_LICENSE_ERROR,
64 CudnnError::RuntimePrerequisiteMissing => {
65 sys::cudnnStatus_t::CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING
66 }
67 CudnnError::RuntimeInProgress => sys::cudnnStatus_t::CUDNN_STATUS_RUNTIME_IN_PROGRESS,
68 CudnnError::RuntimeFpOverflow => sys::cudnnStatus_t::CUDNN_STATUS_RUNTIME_FP_OVERFLOW,
69 CudnnError::VersionMismatch => sys::cudnnStatus_t::CUDNN_STATUS_VERSION_MISMATCH,
70 }
71 }
72}
73
74impl Display for CudnnError {

Callers 5

fmtMethod · 0.45
convolution_forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected