Functions
Core

Functions

IEStatusCode ie_core_create (const char *xml_config_file, ie_core_t **core)
 Constructs Inference Engine Core instance using XML configuration file with devices description. See RegisterPlugins for more details. Use the ie_core_free() method to free memory. More...
 
void ie_core_free (ie_core_t **core)
 Releases memory occupied by core. More...
 
IEStatusCode ie_core_get_versions (const ie_core_t *core, const char *device_name, ie_core_versions_t *versions)
 Gets version information of the device specified. Use the ie_core_versions_free() method to free memory. More...
 
void ie_core_versions_free (ie_core_versions_t *vers)
 Releases memory occupied by ie_core_versions. More...
 
IEStatusCode ie_core_read_network (ie_core_t *core, const char *xml, const char *weights_file, ie_network_t **network)
 Reads the model from the .xml and .bin files of the IR. Use the ie_network_free() method to free memory. More...
 
IEStatusCode ie_core_read_network_from_memory (ie_core_t *core, const uint8_t *xml_content, size_t xml_content_size, const ie_blob_t *weight_blob, ie_network_t **network)
 Reads the model from an xml string and a blob of the bin part of the IR. Use the ie_network_free() method to free memory. More...
 
IEStatusCode ie_core_load_network (ie_core_t *core, const ie_network_t *network, const char *device_name, const ie_config_t *config, ie_executable_network_t **exe_network)
 Creates an executable network from a network object. Users can create as many networks as they need and use them simultaneously (up to the limitation of the hardware resources). Use the ie_exec_network_free() method to free memory. More...
 
IEStatusCode ie_core_set_config (ie_core_t *core, const ie_config_t *ie_core_config, const char *device_name)
 Sets configuration for device. More...
 
IEStatusCode ie_core_register_plugin (ie_core_t *core, const char *plugin_name, const char *device_name)
 Registers a new device and a plugin which implement this device inside Inference Engine. More...
 
IEStatusCode ie_core_register_plugins (ie_core_t *core, const char *xml_config_file)
 Registers plugins specified in an ".xml" configuration file. More...
 
IEStatusCode ie_core_unregister_plugin (ie_core_t *core, const char *device_name)
 Unregisters a plugin with a specified device name. More...
 
IEStatusCode ie_core_add_extension (ie_core_t *core, const char *extension_path, const char *device_name)
 Loads extension library to the device with a specified device name. More...
 
IEStatusCode ie_core_get_metric (const ie_core_t *core, const char *device_name, const char *metric_name, ie_param_t *param_result)
 Gets general runtime metric for dedicated hardware. The method is needed to request common device properties which are executable network agnostic. It can be device name, temperature, other devices-specific values. More...
 
IEStatusCode ie_core_get_config (const ie_core_t *core, const char *device_name, const char *config_name, ie_param_t *param_result)
 Gets configuration dedicated to device behaviour. The method is targeted to extract information which can be set via SetConfig method. More...
 
IEStatusCode ie_core_get_available_devices (const ie_core_t *core, ie_available_devices_t *avai_devices)
 Gets available devices for neural network inference. More...
 
void ie_core_available_devices_free (ie_available_devices_t *avai_devices)
 Releases memory occpuied by ie_available_devices_t. More...
 

Detailed Description

Set of functions dedicated to working with registered plugins and loading network to the registered devices.

Function Documentation

◆ ie_core_add_extension()

IEStatusCode ie_core_add_extension ( ie_core_t *  core,
const char *  extension_path,
const char *  device_name 
)

Loads extension library to the device with a specified device name.

Parameters
coreA pointer to ie_core_t instance.
extension_pathPath to the extensions library file to load to a device.
device_nameA device name of a device to load the extensions to.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_available_devices_free()

void ie_core_available_devices_free ( ie_available_devices_t avai_devices)

Releases memory occpuied by ie_available_devices_t.

Parameters
avai_devicesA pointer to the ie_available_devices_t to free memory.

◆ ie_core_create()

IEStatusCode ie_core_create ( const char *  xml_config_file,
ie_core_t **  core 
)

Constructs Inference Engine Core instance using XML configuration file with devices description. See RegisterPlugins for more details. Use the ie_core_free() method to free memory.

Parameters
xml_config_fileA path to .xml file with devices to load from. If XML configuration file is not specified, then default Inference Engine devices are loaded from the default plugin.xml file.
coreA pointer to the newly created ie_core_t.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_free()

void ie_core_free ( ie_core_t **  core)

Releases memory occupied by core.

Parameters
coreA pointer to the core to free memory.

◆ ie_core_get_available_devices()

IEStatusCode ie_core_get_available_devices ( const ie_core_t *  core,
ie_available_devices_t avai_devices 
)

Gets available devices for neural network inference.

Parameters
coreA pointer to ie_core_t instance.
avai_devicesThe devices are returned as { CPU, FPGA.0, FPGA.1, MYRIAD } If there more than one device of specific type, they are enumerated with .# suffix
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_get_config()

IEStatusCode ie_core_get_config ( const ie_core_t *  core,
const char *  device_name,
const char *  config_name,
ie_param_t param_result 
)

Gets configuration dedicated to device behaviour. The method is targeted to extract information which can be set via SetConfig method.

Parameters
coreA pointer to ie_core_t instance.
device_nameA name of a device to get a configuration value.
config_nameName of a configuration.
param_resultA configuration value corresponding to the config_name.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_get_metric()

IEStatusCode ie_core_get_metric ( const ie_core_t *  core,
const char *  device_name,
const char *  metric_name,
ie_param_t param_result 
)

Gets general runtime metric for dedicated hardware. The method is needed to request common device properties which are executable network agnostic. It can be device name, temperature, other devices-specific values.

Parameters
coreA pointer to ie_core_t instance.
device_nameA name of a device to get a metric value.
metric_nameA metric name to request.
param_resultA metric value corresponding to the metric_name.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_get_versions()

IEStatusCode ie_core_get_versions ( const ie_core_t *  core,
const char *  device_name,
ie_core_versions_t versions 
)

Gets version information of the device specified. Use the ie_core_versions_free() method to free memory.

Parameters
coreA pointer to ie_core_t instance.
device_nameName to identify device.
versionsA pointer to versions corresponding to device_name.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_load_network()

IEStatusCode ie_core_load_network ( ie_core_t *  core,
const ie_network_t *  network,
const char *  device_name,
const ie_config_t config,
ie_executable_network_t **  exe_network 
)

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

Parameters
coreA pointer to ie_core_t instance.
networkA pointer to ie_network instance.
device_nameName of device to load network to.
configDevice configuration.
exe_networkA pointer to the newly created executable network.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_read_network()

IEStatusCode ie_core_read_network ( ie_core_t *  core,
const char *  xml,
const char *  weights_file,
ie_network_t **  network 
)

Reads the model from the .xml and .bin files of the IR. Use the ie_network_free() method to free memory.

Parameters
coreA pointer to ie_core_t instance.
xml.xml file's path of the IR.
weights_file.bin file's path of the IR, if path is empty, will try to read bin file with the same name as xml and if bin file with the same name was not found, will load IR without weights.
networkA pointer to the newly created network.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_read_network_from_memory()

IEStatusCode ie_core_read_network_from_memory ( ie_core_t *  core,
const uint8_t *  xml_content,
size_t  xml_content_size,
const ie_blob_t *  weight_blob,
ie_network_t **  network 
)

Reads the model from an xml string and a blob of the bin part of the IR. Use the ie_network_free() method to free memory.

Parameters
coreA pointer to ie_core_t instance.
xml_contentXml content of the IR.
xml_content_sizeNumber of bytes in the xml content of the IR.
weight_blobBlob containing the bin part of the IR.
networkA pointer to the newly created network.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_register_plugin()

IEStatusCode ie_core_register_plugin ( ie_core_t *  core,
const char *  plugin_name,
const char *  device_name 
)

Registers a new device and a plugin which implement this device inside Inference Engine.

Parameters
coreA pointer to ie_core_t instance.
plugin_nameA name of a plugin. Depending on a platform, plugin_name is wrapped with a shared library suffix and a prefix to identify a full name of the library.
device_nameA device name to register plugin for. If not specified, the method registers a plugin with the default name.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_register_plugins()

IEStatusCode ie_core_register_plugins ( ie_core_t *  core,
const char *  xml_config_file 
)

Registers plugins specified in an ".xml" configuration file.

Parameters
coreA pointer to ie_core_t instance.
xml_config_fileA full path to ".xml" file containing plugins configuration.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_set_config()

IEStatusCode ie_core_set_config ( ie_core_t *  core,
const ie_config_t ie_core_config,
const char *  device_name 
)

Sets configuration for device.

Parameters
coreA pointer to ie_core_t instance.
ie_core_configDevice configuration.
device_nameAn optional name of a device. If device name is not specified, the config is set for all the registered devices.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_unregister_plugin()

IEStatusCode ie_core_unregister_plugin ( ie_core_t *  core,
const char *  device_name 
)

Unregisters a plugin with a specified device name.

Parameters
coreA pointer to ie_core_t instance.
device_nameA device name of the device to unregister.
Returns
Status code of the operation: OK(0) for success.

◆ ie_core_versions_free()

void ie_core_versions_free ( ie_core_versions_t vers)

Releases memory occupied by ie_core_versions.

Parameters
versA pointer to the ie_core_versions to free memory.