Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uni20::cuda::CudaRuntimeError Class Reference

Exception carrying a failed CUDA runtime operation and status. More...

#include <cuda_error.hpp>

Inheritance diagram for uni20::cuda::CudaRuntimeError:
[legend]
Collaboration diagram for uni20::cuda::CudaRuntimeError:
[legend]

Public Member Functions

 CudaRuntimeError (cudaError_t status, std::string operation, std::optional< int > device=std::nullopt)
 Construct a CUDA runtime error with optional device context.
 
std::optional< int > device () const noexcept
 Return the associated CUDA device ordinal, when known.
 
std::string const & error_name () const noexcept
 Return the CUDA symbolic error name.
 
std::string const & operation () const noexcept
 Return the CUDA runtime operation that failed.
 
std::string const & reason () const noexcept
 Return the CUDA runtime error description.
 
cudaError_t status () const noexcept
 Return the CUDA runtime status code.
 
- Public Member Functions inherited from uni20::diagnostic_error
 diagnostic_error (std::string message)
 Construct an exception with its concise plain-text message.
 
void set_source_location (std::source_location where) noexcept
 Attach the source location at which the exception is raised.
 
std::optional< std::source_location > const & source_location () const noexcept
 Return the attached source location, if any.
 

Detailed Description

Exception carrying a failed CUDA runtime operation and status.

Constructor & Destructor Documentation

◆ CudaRuntimeError()

uni20::cuda::CudaRuntimeError::CudaRuntimeError ( cudaError_t  status,
std::string  operation,
std::optional< int >  device = std::nullopt 
)

Construct a CUDA runtime error with optional device context.

Member Function Documentation

◆ device()

std::optional< int > uni20::cuda::CudaRuntimeError::device ( ) const
inlinenoexcept

Return the associated CUDA device ordinal, when known.

◆ error_name()

std::string const & uni20::cuda::CudaRuntimeError::error_name ( ) const
inlinenoexcept

Return the CUDA symbolic error name.

◆ operation()

std::string const & uni20::cuda::CudaRuntimeError::operation ( ) const
inlinenoexcept

Return the CUDA runtime operation that failed.

◆ reason()

std::string const & uni20::cuda::CudaRuntimeError::reason ( ) const
inlinenoexcept

Return the CUDA runtime error description.

◆ status()

cudaError_t uni20::cuda::CudaRuntimeError::status ( ) const
inlinenoexcept

Return the CUDA runtime status code.


The documentation for this class was generated from the following files: