Skip to main content

CudaStatus

Trait CudaStatus 

Source
pub trait CudaStatus:
    Copy
    + Debug
    + Eq {
    // Required methods
    fn code(self) -> i32;
    fn name(self) -> &'static str;
    fn description(self) -> &'static str;
    fn is_success(self) -> bool;
    fn library(self) -> &'static str;
}
Expand description

A status code returned by an NVIDIA library call.

Required Methods§

Source

fn code(self) -> i32

The integer value of this status, as returned from the C API.

Source

fn name(self) -> &'static str

The stable symbol name of this status (e.g. "CUDA_SUCCESS", "CUBLAS_STATUS_NOT_INITIALIZED").

Source

fn description(self) -> &'static str

A human-readable description of the status.

Implementations should prefer the strings returned by the library itself (cuGetErrorString, cudnnGetErrorString, …) when available.

Source

fn is_success(self) -> bool

true if this status represents successful completion.

Source

fn library(self) -> &'static str

Which NVIDIA library produced this status (e.g. "cuda-driver", "cublas"). Used for composing cross-library error messages.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§