oneAPI Deep Neural Network Library (oneDNN)  1.4.0
Performance library for Deep Learning
Loading...
Searching...
No Matches
dnnl::error Struct Reference

oneDNN exception class. More...

#include <dnnl.hpp>

Public Member Functions

 error (dnnl_status_t status, const char *message)
 Constructs an instance of an exception class.
const char * what () const noexcept override
 Returns the explanatory string.

Static Public Member Functions

static void wrap_c_api (dnnl_status_t status, const char *message)
 A convenience function for wrapping calls to C API functions.

Detailed Description

oneDNN exception class.

This class captures the status returned by a failed C API function and the error message from the call site.

Examples
cnn_inference_int8.cpp, cpu_cnn_training_bf16.cpp, and getting_started.cpp.

Constructor & Destructor Documentation

◆ error()

dnnl::error::error ( dnnl_status_t status,
const char * message )
inline

Constructs an instance of an exception class.

Parameters
statusThe error status returned by a C API function.
messageThe error message.

Member Function Documentation

◆ wrap_c_api()

void dnnl::error::wrap_c_api ( dnnl_status_t status,
const char * message )
inlinestatic

A convenience function for wrapping calls to C API functions.

Checks the return status and throws an dnnl::error in case of failure.

Parameters
statusThe error status returned by a C API function.
messageThe error message.

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