cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
cuda::runtime_error Class Reference

A (base?) class for exceptions raised by CUDA code; these errors are thrown by essentially all CUDA Runtime API wrappers upon failure. More...

#include <error.hpp>

Inheritance diagram for cuda::runtime_error:
Collaboration diagram for cuda::runtime_error:

Public Member Functions

 runtime_error (status::named_t error_code)
 
 runtime_error (status::named_t error_code, const ::std::string &what_arg)
 
 runtime_error (status::named_t error_code, ::std::string &&what_arg)
 
status_t code () const
 Obtain the CUDA status code which resulted in this error being thrown.
 

Static Public Member Functions

static runtime_error with_message_override (status_t error_code, ::std::string complete_what_arg)
 Construct a runtime error which will not produce the default description for the error code, but rather only the specified message. More...
 

Detailed Description

A (base?) class for exceptions raised by CUDA code; these errors are thrown by essentially all CUDA Runtime API wrappers upon failure.

A CUDA runtime error can be constructed with either just a CUDA error code (=status code), or a code plus an additional message.

Todo:
Consider renaming this to avoid confusion with the CUDA Runtime.

Member Function Documentation

◆ with_message_override()

static runtime_error cuda::runtime_error::with_message_override ( status_t  error_code,
::std::string  complete_what_arg 
)
inlinestatic

Construct a runtime error which will not produce the default description for the error code, but rather only the specified message.


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