Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)  0.21.0
Performance library for Deep Learning
Public Member Functions | Protected Member Functions | List of all members
mkldnn::handle< T, traits > Class Template Reference

A class for wrapping an Intel(R) MKL-DNN handle. It is used as the base class for primitive (mkldnn_primitive_t), engine (mkldnn_engine_t), and stream (mkldnn_stream_t) handles. An object of the mkldnn::handle class can be passed by value. This class enables wrapping: More...

#include <mkldnn.hpp>

Public Member Functions

 handle (T t=0, bool weak=false)
 Constructs a C handle wrapper. More...
 
 handle (const handle &other)
 
handleoperator= (const handle &other)
 
void reset (T t, bool weak=false)
 Resets the value of a C handle. More...
 
get () const
 Returns the value of the underlying C handle. More...
 
bool operator== (const handle &other) const
 
bool operator!= (const handle &other) const
 

Protected Member Functions

bool operator== (const T other) const
 
bool operator!= (const T other) const
 

Detailed Description

template<typename T, typename traits = handle_traits<T>>
class mkldnn::handle< T, traits >

A class for wrapping an Intel(R) MKL-DNN handle. It is used as the base class for primitive (mkldnn_primitive_t), engine (mkldnn_engine_t), and stream (mkldnn_stream_t) handles. An object of the mkldnn::handle class can be passed by value. This class enables wrapping:

Constructor & Destructor Documentation

◆ handle() [1/2]

template<typename T, typename traits = handle_traits<T>>
mkldnn::handle< T, traits >::handle ( t = 0,
bool  weak = false 
)
inline

Constructs a C handle wrapper.

Parameters
tThe C handle to wrap.
weakA flag to specify whether to construct a weak wrapper.

◆ handle() [2/2]

template<typename T, typename traits = handle_traits<T>>
mkldnn::handle< T, traits >::handle ( const handle< T, traits > &  other)
inline

Member Function Documentation

◆ operator==() [1/2]

template<typename T, typename traits = handle_traits<T>>
bool mkldnn::handle< T, traits >::operator== ( const T  other) const
inlineprotected

◆ operator!=() [1/2]

template<typename T, typename traits = handle_traits<T>>
bool mkldnn::handle< T, traits >::operator!= ( const T  other) const
inlineprotected

◆ operator=()

template<typename T, typename traits = handle_traits<T>>
handle& mkldnn::handle< T, traits >::operator= ( const handle< T, traits > &  other)
inline

◆ reset()

template<typename T, typename traits = handle_traits<T>>
void mkldnn::handle< T, traits >::reset ( t,
bool  weak = false 
)
inline

Resets the value of a C handle.

Parameters
tThe new value of the C handle.
weakA flag to specify whether the wrapper should be weak.

◆ get()

template<typename T, typename traits = handle_traits<T>>
T mkldnn::handle< T, traits >::get ( ) const
inline

Returns the value of the underlying C handle.

◆ operator==() [2/2]

template<typename T, typename traits = handle_traits<T>>
bool mkldnn::handle< T, traits >::operator== ( const handle< T, traits > &  other) const
inline

◆ operator!=() [2/2]

template<typename T, typename traits = handle_traits<T>>
bool mkldnn::handle< T, traits >::operator!= ( const handle< T, traits > &  other) const
inline

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