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

An execution engine. More...

#include <mkldnn.hpp>

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

Public Types

enum  kind { kind::any = mkldnn_any_engine, kind::cpu = mkldnn_cpu, kind::gpu = mkldnn_gpu }
 Kinds of engines. More...
 

Public Member Functions

 engine (kind akind, size_t index)
 Constructs an engine. More...
 
 engine (const mkldnn_engine_t &aengine)
 Constructs an engine from other engine aengine.
 
 engine (const handle< mkldnn_primitive_desc_t > &pd)
 Constructs an engine from the primitive descriptor pd by querying its engine. More...
 
kind get_kind () const
 Returns the kind of the engine.
 
- Public Member Functions inherited from mkldnn::handle< mkldnn_engine_t >
 handle (mkldnn_engine_t t, bool weak=false)
 Constructs a C handle wrapper. More...
 
 handle ()
 Empty constructor. More...
 
void reset (mkldnn_engine_t t, bool weak=false)
 Resets the value of a C handle. More...
 
mkldnn_engine_t get (bool allow_emtpy=false) const
 Returns the value of the underlying C handle.
 

Static Public Member Functions

static size_t get_count (kind akind)
 Returns the number of engines of a certain kind. More...
 

Detailed Description

An execution engine.

Examples:
cpu_cnn_inference_f32.cpp, cpu_getting_started.cpp, cpu_memory_format_propagation.cpp, cpu_performance_profiling.cpp, and gpu_opencl_interop.cpp.

Member Enumeration Documentation

◆ kind

enum mkldnn::engine::kind
strong

Kinds of engines.

Enumerator
any 

An unspecified engine.

cpu 

CPU engine.

gpu 

GPU engine.

Constructor & Destructor Documentation

◆ engine() [1/2]

mkldnn::engine::engine ( kind  akind,
size_t  index 
)
inline

Constructs an engine.

Parameters
akindThe kind of engine to construct.
indexThe index of the engine. Must be less than the value returned by get_count() for this particular kind of engine.

◆ engine() [2/2]

mkldnn::engine::engine ( const handle< mkldnn_primitive_desc_t > &  pd)
inline

Constructs an engine from the primitive descriptor pd by querying its engine.

Member Function Documentation

◆ get_count()

static size_t mkldnn::engine::get_count ( kind  akind)
inlinestatic

Returns the number of engines of a certain kind.

Parameters
akindThe kind of engines to count.

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