Skip to main content
`Ctrl`+`K`

# error Class Reference

API library: rocrand_cpp::error Class Reference
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
rocrand_cpp::error Class Reference
rocRAND host API C++ Wrapper

A run-time rocRAND error. More...

`#include <rocrand.hpp>`

Inheritance diagram for rocrand_cpp::error:

## Public Types

typedef rocrand_status | error_type
| rocRAND error code type

## Public Member Functions

| error (error_type error) noexcept
error_type | error_code () const noexcept
| Returns the numeric error code.
std::string | error_string () const noexcept
| Returns a string description of the error.
const char * | what () const noexcept override
| Returns a C-string description of the error.

## Static Public Member Functions

static std::string | to_string (error_type error)

## Friends

bool | operator== (const error &l, const error &r)
| Compares two error objects for equality.
bool | operator!= (const error &l, const error &r)
| Compares two error objects for inequality.

## Detailed Description

A run-time rocRAND error.

The error class represents an error returned by a rocRAND function.

## Constructor & Destructor Documentation

## ◆ error()

rocrand_cpp::error::error | ( | error_type | error | ) |

inline explicit noexcept

Constructs new error object from error code `error`.

Parameters

  error | error code

## Member Function Documentation

## ◆ to_string()

std::string rocrand_cpp::error::to_string | ( | error_type | error | ) |

inline static

Static function which converts the numeric rocRAND error code `error` to a human-readable string.

If the error code is unknown, a string containing "Unknown rocRAND error" along with the error code `error` will be returned.

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

- /build/rocrand-D7zBeW/rocrand-7.2.4/library/include/rocrand/rocrand.hpp