Public Types | Public Member Functions | Protected Member Functions
InferenceEngine::InferenceEngine Class Referenceabstract

This class is a C++ API wrapper for IInferencePlugin. It can throw exceptions safely for the application, where it is properly handled. More...

#include <ie_plugin_cpp.hpp>

Inheritance diagram for InferenceEngine::InferenceEngine:
Inheritance graph
[legend]
Collaboration diagram for InferenceEngine::InferenceEngine:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< InferencePlugin >
 Shared pointer on InferencePlugin object.
 

Public Member Functions

 InferencePlugin ()=default
 A default constructor.
 
 InferencePlugin (const InferenceEnginePluginPtr &pointer)
 Constructs a plugin instance from the given pointer. More...
 
const VersionGetVersion ()
 Wraps original method IInferencePlugin::GetVersion.
 
ExecutableNetwork LoadNetwork (ICNNNetwork &network, const std::map< std::string, std::string > &config)
 Wraps original method IInferencePlugin::LoadNetwork(IExecutableNetwork::Ptr&, ICNNNetwork&, const std::map<std::string, std::string> &, ResponseDesc*). More...
 
ExecutableNetwork LoadNetwork (CNNNetwork network, const std::map< std::string, std::string > &config)
 Wraps original method IInferencePlugin::LoadNetwork(IExecutableNetwork::Ptr&, ICNNNetwork&, const std::map<std::string, std::string> &, ResponseDesc*). More...
 
void AddExtension (InferenceEngine::IExtensionPtr extension)
 Wraps original method IInferencePlugin::AddExtension. More...
 
void SetConfig (const std::map< std::string, std::string > &config)
 Wraps original method IInferencePlugin::SetConfig. More...
 
ExecutableNetwork ImportNetwork (const std::string &modelFileName, const std::map< std::string, std::string > &config)
 Wraps original method IInferencePlugin::ImportNetwork. More...
 
void QueryNetwork (const ICNNNetwork &network, const std::map< std::string, std::string > &config, QueryNetworkResult &res) const
 Wraps original method IInferencePlugin::QueryNetwork(const ICNNNetwork&, const std::map<std::string, std::string> &, QueryNetworkResult&) const. More...
 
 operator InferenceEngine::InferenceEnginePluginPtr ()
 Converts InferenceEngine to InferenceEnginePluginPtr pointer. More...
 
virtual void GetVersion (const Version *&versionInfo) noexcept=0
 Returns plugin version information. More...
 
virtual void SetLogCallback (IErrorListener &listener) noexcept=0
 Sets logging callback Logging is used to track what is going on inside. More...
 
virtual StatusCode LoadNetwork (IExecutableNetwork::Ptr &ret, ICNNNetwork &network, const std::map< std::string, std::string > &config, ResponseDesc *resp) noexcept=0
 Creates an executable network from a network object. User can create as many networks as they need and use them simultaneously (up to the limitation of the hardware resources) More...
 
virtual StatusCode ImportNetwork (IExecutableNetwork::Ptr &ret, const std::string &modelFileName, const std::map< std::string, std::string > &config, ResponseDesc *resp) noexcept=0
 Creates an executable network from a previously exported network. More...
 
virtual StatusCode AddExtension (InferenceEngine::IExtensionPtr extension, InferenceEngine::ResponseDesc *resp) noexcept=0
 Registers extension within the plugin. More...
 
virtual StatusCode SetConfig (const std::map< std::string, std::string > &config, ResponseDesc *resp) noexcept=0
 Sets configuration for plugin, acceptable keys can be found in ie_plugin_config.hpp. More...
 
virtual void QueryNetwork (const ICNNNetwork &network, const std::map< std::string, std::string > &config, QueryNetworkResult &res) const noexcept
 Query plugin if it supports specified network with specified configuration. More...
 
 ~IInferencePlugin () override
 A default virtual destructor.
 
 PluginDispatcher (const std::vector< file_name_t > &pp={file_name_t()})
 A constructor. More...
 
virtual InferencePlugin getPluginByName (const file_name_t &name) const
 Loads a plugin from plugin directories. More...
 
InferencePlugin getPluginByDevice (const std::string &deviceName) const
 Loads a plugin from directories that is suitable for the device string. More...
 

Protected Member Functions

file_name_t make_plugin_name (const file_name_t &path, const file_name_t &input) const
 Creates path to the plugin. More...
 

Detailed Description

This class is a C++ API wrapper for IInferencePlugin. It can throw exceptions safely for the application, where it is properly handled.

This is a class to load a suitable plugin.

This class is a main plugin interface.

Deprecated:
Use InferenceEngine::Core instead.
Deprecated:
Use InferenceEngine::Core instead.
Deprecated:
Use InferenceEngine::Core instead.

Member Function Documentation

§ AddExtension() [1/2]

void InferenceEngine::InferenceEngine::AddExtension ( InferenceEngine::IExtensionPtr  extension)
inline

Wraps original method IInferencePlugin::AddExtension.

Parameters
extensionPointer to loaded Extension

§ AddExtension() [2/2]

virtual StatusCode InferenceEngine::InferenceEngine::AddExtension ( InferenceEngine::IExtensionPtr  extension,
InferenceEngine::ResponseDesc resp 
)
pure virtualnoexcept

Registers extension within the plugin.

Parameters
extensionPointer to already loaded extension
respPointer to the response message that holds a description of an error if any occurred
Returns
Status code of the operation. OK if succeeded

§ getPluginByDevice()

InferencePlugin InferenceEngine::InferenceEngine::getPluginByDevice ( const std::string &  deviceName) const

Loads a plugin from directories that is suitable for the device string.

Deprecated:
Use InferenceEngine::Core to work with devices by name
Parameters
deviceNameA string value representing target device
Returns
A pointer to the plugin

§ getPluginByName()

virtual InferencePlugin InferenceEngine::InferenceEngine::getPluginByName ( const file_name_t &  name) const
virtual

Loads a plugin from plugin directories.

Parameters
namePlugin name
Returns
A pointer to the loaded plugin

§ GetVersion()

virtual void InferenceEngine::InferenceEngine::GetVersion ( const Version *&  versionInfo)
pure virtualnoexcept

Returns plugin version information.

Parameters
versionInfoPointer to version info. Is set by plugin

§ ImportNetwork() [1/2]

virtual StatusCode InferenceEngine::InferenceEngine::ImportNetwork ( IExecutableNetwork::Ptr ret,
const std::string &  modelFileName,
const std::map< std::string, std::string > &  config,
ResponseDesc resp 
)
pure virtualnoexcept

Creates an executable network from a previously exported network.

Parameters
retReference to a shared ptr of the returned network interface
modelFileNamePath to the location of the exported file
configMap of pairs: (config parameter name, config parameter value) relevant only for this load operation*
respPointer to the response message that holds a description of an error if any occurred
Returns
Status code of the operation. OK if succeeded

§ ImportNetwork() [2/2]

ExecutableNetwork InferenceEngine::InferenceEngine::ImportNetwork ( const std::string &  modelFileName,
const std::map< std::string, std::string > &  config 
)
inline

Wraps original method IInferencePlugin::ImportNetwork.

Parameters
modelFileNameA path to the imported network
configA configuration map
Returns
Created Executable Network object

§ InferencePlugin()

InferenceEngine::InferenceEngine::InferencePlugin ( const InferenceEnginePluginPtr pointer)
inlineexplicit

Constructs a plugin instance from the given pointer.

Parameters
pointerInitialized Plugin pointer

§ LoadNetwork() [1/3]

ExecutableNetwork InferenceEngine::InferenceEngine::LoadNetwork ( ICNNNetwork network,
const std::map< std::string, std::string > &  config 
)
inline

Wraps original method IInferencePlugin::LoadNetwork(IExecutableNetwork::Ptr&, ICNNNetwork&, const std::map<std::string, std::string> &, ResponseDesc*).

Parameters
networkA network object to load
configA map of configuration options
Returns
Created Executable Network object

§ LoadNetwork() [2/3]

ExecutableNetwork InferenceEngine::InferenceEngine::LoadNetwork ( CNNNetwork  network,
const std::map< std::string, std::string > &  config 
)
inline

Wraps original method IInferencePlugin::LoadNetwork(IExecutableNetwork::Ptr&, ICNNNetwork&, const std::map<std::string, std::string> &, ResponseDesc*).

Parameters
networkA network object to load
configA map of configuration options
Returns
Created Executable Network object

§ LoadNetwork() [3/3]

virtual StatusCode InferenceEngine::InferenceEngine::LoadNetwork ( IExecutableNetwork::Ptr ret,
ICNNNetwork network,
const std::map< std::string, std::string > &  config,
ResponseDesc resp 
)
pure virtualnoexcept

Creates an executable network from a network object. User can create as many networks as they need and use them simultaneously (up to the limitation of the hardware resources)

Parameters
retReference to a shared ptr of the returned network interface
networkNetwork object acquired from CNNNetReader
configMap of pairs: (config parameter name, config parameter value) relevant only for this load operation
respPointer to the response message that holds a description of an error if any occurred
Returns
Status code of the operation. OK if succeeded

§ make_plugin_name()

file_name_t InferenceEngine::InferenceEngine::make_plugin_name ( const file_name_t &  path,
const file_name_t &  input 
) const
protected

Creates path to the plugin.

Parameters
pathPath to the plugin
inputPlugin name
Returns
The path to the plugin

§ operator InferenceEngine::InferenceEnginePluginPtr()

InferenceEngine::InferenceEngine::operator InferenceEngine::InferenceEnginePluginPtr ( )
inline

Converts InferenceEngine to InferenceEnginePluginPtr pointer.

Returns
Wrapped object

§ PluginDispatcher()

InferenceEngine::InferenceEngine::PluginDispatcher ( const std::vector< file_name_t > &  pp = {file_name_t()})
explicit

A constructor.

Parameters
ppVector of paths to plugin directories

§ QueryNetwork() [1/2]

void InferenceEngine::InferenceEngine::QueryNetwork ( const ICNNNetwork network,
const std::map< std::string, std::string > &  config,
QueryNetworkResult res 
) const
inline

Wraps original method IInferencePlugin::QueryNetwork(const ICNNNetwork&, const std::map<std::string, std::string> &, QueryNetworkResult&) const.

Parameters
networkA network object to query
configA configuration map
resQuery results

§ QueryNetwork() [2/2]

virtual void InferenceEngine::InferenceEngine::QueryNetwork ( const ICNNNetwork network,
const std::map< std::string, std::string > &  config,
QueryNetworkResult res 
) const
inlinevirtualnoexcept

Query plugin if it supports specified network with specified configuration.

Parameters
networkNetwork object to query
configMap of pairs: (config parameter name, config parameter value)
resReference to query network result

§ SetConfig() [1/2]

void InferenceEngine::InferenceEngine::SetConfig ( const std::map< std::string, std::string > &  config)
inline

Wraps original method IInferencePlugin::SetConfig.

Parameters
configA configuration map

§ SetConfig() [2/2]

virtual StatusCode InferenceEngine::InferenceEngine::SetConfig ( const std::map< std::string, std::string > &  config,
ResponseDesc resp 
)
pure virtualnoexcept

Sets configuration for plugin, acceptable keys can be found in ie_plugin_config.hpp.

Parameters
configMap of pairs: (config parameter name, config parameter value)
respPointer to the response message that holds a description of an error if any occurred
Returns
Status code of the operation. OK if succeeded

§ SetLogCallback()

virtual void InferenceEngine::InferenceEngine::SetLogCallback ( IErrorListener listener)
pure virtualnoexcept

Sets logging callback Logging is used to track what is going on inside.

Parameters
listenerLogging sink

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