#[allow(unused)]
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Copy, Clone, thiserror::Error)]
pub enum Error {
#[error("CUDA Driver/Runtime API not initialized.")]
NotInitialized,
#[error("The resources could not be allocated.")]
AllocFailed,
#[error("Internal: {0}")]
InternalError(&'static str),
#[error("Invalid value: {0}")]
InvalidValue(&'static str),
#[error(
"cuBLAS only supports devices with compute capabilities greater than or equal to 1.3."
)]
ArchMismatch,
#[error("There was an error accessing GPU memory.")]
MappingError,
#[error("Execution failed to launch on the GPU.")]
ExecutionFailed,
#[error("Not supported: {0}")]
NotSupported(&'static str),
#[error("There is an error with the license. Check that it is present, unexpired and the NVIDIA_LICENSE_FILE environment variable has been set correctly.")]
LicenseError,
#[error("Unknown error: {0} - code {1}")]
Unknown(&'static str, u64),
}