Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)  1.0.4
Performance library for Deep Learning
Public Member Functions | Static Public Member Functions | List of all members
mkldnn::error Struct Reference

Intel(R) MKL-DNN exception class. More...

#include <mkldnn.hpp>

Inherits exception.

Public Member Functions

 error (mkldnn_status_t astatus, const char *amessage)
 Constructs an error instance. More...
 
const char * what () const noexcept override
 Returns the explanatory string.
 

Static Public Member Functions

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

Detailed Description

Intel(R) MKL-DNN exception class.

This class captures the status returned by the failed C API function, error message, and, optionally, handle of the primitive that caused the error.

Examples:
cpu_cnn_inference_f32.cpp, cpu_cnn_inference_int8.cpp, cpu_cnn_training_bf16.cpp, cpu_cnn_training_f32.cpp, cpu_getting_started.cpp, cpu_memory_format_propagation.cpp, cpu_rnn_inference_f32.cpp, cpu_rnn_inference_int8.cpp, cpu_rnn_training_f32.cpp, gpu_getting_started.cpp, and gpu_opencl_interop.cpp.

Constructor & Destructor Documentation

◆ error()

mkldnn::error::error ( mkldnn_status_t  astatus,
const char *  amessage 
)
inline

Constructs an error instance.

Parameters
astatusThe error status returned by the C API.
amessageThe error message.

Member Function Documentation

◆ wrap_c_api()

static void mkldnn::error::wrap_c_api ( mkldnn_status_t  status,
const char *  message 
)
inlinestatic

A convenience function for wrapping calls to the C API.

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

Parameters
statusThe error status returned by the C API.
messageThe error message.

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