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

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

#include <mkldnn.hpp>

Inheritance diagram for mkldnn::error:
Inheritance graph
[legend]
Collaboration diagram for mkldnn::error:
Collaboration graph
[legend]

Public Member Functions

 error (mkldnn_status_t astatus, std::string amessage, mkldnn_primitive_t aerror_primitive=0)
 Constructs an error instance. More...
 

Static Public Member Functions

static void wrap_c_api (mkldnn_status_t status, const std::string &message, mkldnn_primitive_t *error_primitive=0)
 A convenience function for wrapping calls to the C API. Checks the return status and throws an error in case of failure. More...
 

Public Attributes

mkldnn_status_t status
 
std::string message
 
primitive error_primitive
 

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.

Constructor & Destructor Documentation

◆ error()

mkldnn::error::error ( mkldnn_status_t  astatus,
std::string  amessage,
mkldnn_primitive_t  aerror_primitive = 0 
)
inline

Constructs an error instance.

Parameters
astatusThe error status returned by the C API.
amessageThe error message.
aerror_primitive(optional) A C handle of the primitive that caused the error.

Member Function Documentation

◆ wrap_c_api()

static void mkldnn::error::wrap_c_api ( mkldnn_status_t  status,
const std::string &  message,
mkldnn_primitive_t error_primitive = 0 
)
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.
error_primitive(optional) A C handle of the primitive that caused the error.

Member Data Documentation

◆ status

mkldnn_status_t mkldnn::error::status

◆ message

std::string mkldnn::error::message

◆ error_primitive

primitive mkldnn::error::error_primitive

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