cuda-api-wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Public Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for cuda::runtime_error:
Collaboration graph
[legend]

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.
 

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.

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