Visible to Intel only — GUID: GUID-4CED5A65-D502-4782-AD88-CABCC23A6039
Visible to Intel only — GUID: GUID-4CED5A65-D502-4782-AD88-CABCC23A6039
struct dnnl::error
Overview
oneDNN exception class. More…
#include <dnnl_common.hpp> struct error: public exception { // fields dnnl_status_t status; const char* message; // construction error(dnnl_status_t status, const char* message); // methods const char* what() const; static void wrap_c_api(dnnl_status_t status, const char* message); };
Detailed Documentation
oneDNN exception class.
This class captures the status returned by a failed C API function and the error message from the call site.
Construction
error(dnnl_status_t status, const char* message)
Constructs an instance of an exception class.
Parameters:
status |
The error status returned by a C API function. |
message |
The error message. |
Methods
const char* what() const
Returns the explanatory string.
static void wrap_c_api(dnnl_status_t status, const char* message)
A convenience function for wrapping calls to C API functions.
Checks the return status and throws an dnnl::error in case of failure.
Parameters:
status |
The error status returned by a C API function. |
message |
The error message. |