24 #define INFERENCE_ENGINE_C_API_EXTERN extern "C" 26 #define INFERENCE_ENGINE_C_API_EXTERN 29 #if defined(__GNUC__) && (__GNUC__ < 4) 30 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __VA_ARGS__ 33 #ifdef inference_engine_c_api_EXPORTS 34 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __declspec(dllexport) __VA_ARGS__ __cdecl 36 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __declspec(dllimport) __VA_ARGS__ __cdecl 39 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __attribute__((visibility("default"))) __VA_ARGS__ 43 typedef struct ie_core ie_core_t;
44 typedef struct ie_network ie_network_t;
45 typedef struct ie_executable ie_executable_network_t;
46 typedef struct ie_infer_request ie_infer_request_t;
47 typedef struct ie_blob ie_blob_t;
56 const char *device_name;
57 const char *build_number;
58 const char *description;
88 unsigned int range_for_async_infer_request[3];
89 unsigned int range_for_streams[2];
212 NOT_IMPLEMENTED = -2,
213 NETWORK_NOT_LOADED = -3,
214 PARAMETER_MISMATCH = -4,
222 RESULT_NOT_READY = -9,
224 INFER_NOT_STARTED = -11,
225 NETWORK_NOT_READ = -12
274 void (*completeCallBackFunc)(
void *args);
355 const ie_config_t *config, ie_executable_network_t **exe_network);
470 const char *metric_name,
ie_param_t *param_result);
492 const char *metric_config,
ie_param_t *param_result);
IEStatusCode ie_infer_request_free(ie_infer_request_t **infer_request)
Releases memory occupied by ie_infer_request_t instance.
IEStatusCode ie_blob_get_cbuffer(const ie_blob_t *blob, ie_blob_buffer_t *blob_cbuffer)
Gets read-only access to the allocated memory.
IEStatusCode ie_network_reshape(ie_network_t *network, const input_shapes_t shapes)
Run shape inference with new input shapes for the network.
Definition: ie_c_api.h:160
Definition: ie_c_api.h:161
This structure describes roi data.
IEStatusCode ie_infer_request_infer(ie_infer_request_t *infer_request)
Starts synchronous inference of the infer request and fill outputs.
colorformat_e
Extra information about input color format for preprocessing.
Definition: ie_c_api.h:186
IEStatusCode ie_blob_size(ie_blob_t *blob, int *size_result)
Gets the total number of elements, which is a product of all the dimensions.
resize_alg_e
Represents the list of supported resize algorithms.
Definition: ie_c_api.h:199
IEStatusCode ie_network_get_input_layout(const ie_network_t *network, const char *input_name, layout_e *layout_result)
Gets a layout of the input data.
IEStatusCode ie_network_get_inputs_number(const ie_network_t *network, size_t *size_result)
Gets number of inputs for the network.
IEStatusCode ie_core_set_config(ie_core_t *core, const ie_config_t *ie_core_config, const char *device_name)
Sets configuration for device.
IEStatusCode ie_exec_network_create_infer_request(ie_executable_network_t *ie_exec_network, ie_infer_request_t **request)
Creates an inference request instance used to infer the network. The created request has allocated in...
IEStatusCode ie_network_set_input_layout(ie_network_t *network, const char *input_name, const layout_e l)
Changes the layout of the input data named "input_name". This function should be called before loadin...
Represents configuration information that describes devices.
Definition: ie_c_api.h:74
IEStatusCode ie_network_get_outputs_number(const ie_network_t *network, size_t *size_result)
Gets number of output for the network.
Represents copied data from the given blob.
Definition: ie_c_api.h:262
IEStatusCode ie_exec_network_get_metric(const ie_executable_network_t *ie_exec_network, const char *metric_name, ie_param_t *param_result)
Gets general runtime metric for an executable network. It can be network name, actual device ID on wh...
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 memo...
IEStatusCode ie_core_register_plugins(ie_core_t *core, const char *xml_config_file)
Registers plugins specified in an ".xml" configuration file.
IEStatusCode ie_blob_byte_size(ie_blob_t *blob, int *bsize_result)
Gets the size of the current Blob in bytes.
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...
IEStatusCode ie_network_get_output_precision(const ie_network_t *network, const char *output_name, precision_e *prec_result)
Gets a precision of the output data named "output_name".
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.
IEStatusCode ie_blob_make_memory_from_preallocated(const tensor_desc_t *tensorDesc, void *ptr, size_t size, ie_blob_t **blob)
Creates a blob with the given tensor descriptor from the pointer to the pre-allocated memory...
IEStatusCode ie_exec_network_set_config(ie_executable_network_t *ie_exec_network, const ie_config_t *param_config)
Sets configuration for current executable network. Currently, the method can be used when the network...
BGR color format, default in DLDT.
Definition: ie_c_api.h:189
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 a...
RGB color format.
Definition: ie_c_api.h:188
IEStatusCode ie_core_free(ie_core_t **core)
Releases memory occupied by core.
BGRX color format with X ignored during inference.
Definition: ie_c_api.h:191
IEStatusCode ie_network_set_color_format(ie_network_t *network, const char *input_name, const colorformat_e color_format)
Changes the color format of the input data.
IEStatusCode ie_network_get_input_resize_algorithm(const ie_network_t *network, const char *input_name, resize_alg_e *resize_alg_result)
Gets pre-configured resize algorithm.
NV12 color format represented as compound Y+UV blob.
Definition: ie_c_api.h:192
IEStatusCode ie_network_get_output_layout(const ie_network_t *network, const char *output_name, layout_e *layout_result)
Gets a layout of the output data.
IEStatusCode ie_blob_make_memory(const tensor_desc_t *tensorDesc, ie_blob_t **blob)
Creates a blob with the specified dimensions, layout and to allocate memory.
IEStatusCode ie_network_get_input_name(const ie_network_t *network, size_t number, char **name)
Gets name corresponding to the "number". Use the ie_network_name_free() method to free memory...
RGBX color format with X ignored during inference.
Definition: ie_c_api.h:190
Plain blob (default), no extra color processing required.
Definition: ie_c_api.h:187
IEStatusCode ie_network_get_output_dims(const ie_network_t *network, const char *output_name, dimensions_t *dims_result)
Gets dimensions/shape of the output data with reversed order.
IEStatusCode ie_blob_get_precision(const ie_blob_t *blob, precision_e *prec_result)
Gets precision of blob's tensor.
IEStatusCode ie_network_input_shapes_free(input_shapes_t *inputShapes)
Releases memory occupied by input_shapes.
Represents detailed information for an error.
Definition: ie_c_api.h:106
IEStatusCode ie_infer_set_completion_callback(ie_infer_request_t *infer_request, ie_complete_call_back_t *callback)
Sets a callback function that will be called on success or failure of asynchronous request...
IEStatusCode ie_infer_request_get_blob(ie_infer_request_t *infer_request, const char *name, ie_blob_t **blob)
Gets input/output data for inference.
Represents detailed information for a tensor.
Definition: ie_c_api.h:176
IEStatusCode ie_network_set_output_layout(ie_network_t *network, const char *output_name, const layout_e l)
Changes the layout of the output data named "output_name".
Represents configuration parameter information.
Definition: ie_c_api.h:97
metric and config parameters.
Definition: ie_c_api.h:84
IEStatusCode ie_blob_make_memory_with_roi(const ie_blob_t *inputBlob, const roi_t *roi, ie_blob_t **blob)
Creates a blob describing given roi_t instance based on the given blob with pre-allocated memory...
IEStatusCode ie_network_get_input_dims(const ie_network_t *network, const char *input_name, dimensions_t *dims_result)
IEStatusCode ie_exec_network_free(ie_executable_network_t **ie_exec_network)
Releases memory occupied by ExecutableNetwork.
Definition: ie_c_api.h:169
Definition: ie_c_api.h:165
Definition: ie_c_api.h:157
IEStatusCode ie_network_set_input_precision(ie_network_t *network, const char *input_name, const precision_e p)
Changes the precision of the input data provided by the user. This function should be called before l...
IEStatusCode ie_infer_request_wait(ie_infer_request_t *infer_request, const int64_t timeout)
Waits for the result to become available. Blocks until specified timeout elapses or the result become...
IEStatusCode ie_blob_deallocate(ie_blob_t **blob)
Releases previously allocated data.
IEStatusCode ie_infer_request_set_blob(ie_infer_request_t *infer_request, const char *name, const ie_blob_t *blob)
Sets input/output data to inference.
Definition: ie_c_api.h:159
Definition: ie_c_api.h:166
Definition: ie_c_api.h:164
IEStatusCode ie_blob_get_dims(const ie_blob_t *blob, dimensions_t *dims_result)
Gets dimensions of blob's tensor.
IEStatusCode ie_exec_network_get_config(const ie_executable_network_t *ie_exec_network, const char *metric_config, ie_param_t *param_result)
Gets configuration for current executable network. The method is responsible to extract information w...
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...
Definition: ie_c_api.h:158
IEStatusCode ie_infer_request_set_batch(ie_infer_request_t *infer_request, const size_t size)
Sets new batch size for certain infer request when dynamic batching is enabled in executable network ...
IEStatusCode ie_core_unregister_plugin(ie_core_t *core, const char *device_name)
Unregisters a plugin with a specified device name.
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 memo...
Definition: ie_c_api.h:167
IEStatusCode ie_network_name_free(char **name)
Releases momory occupied by input_name or output_name.
IEStatusCode ie_network_get_color_format(const ie_network_t *network, const char *input_name, colorformat_e *colformat_result)
Gets color format of the input data.
precision_e
Precisions that the inference engine supports.
Definition: ie_c_api.h:156
IEStatusCode ie_blob_get_buffer(const ie_blob_t *blob, ie_blob_buffer_t *blob_buffer)
Gets access to the allocated memory .
Represents all versions information that describes all devices and the inference engine runtime libra...
Definition: ie_c_api.h:65
IEStatusCode ie_network_get_input_precision(const ie_network_t *network, const char *input_name, precision_e *prec_result)
Gets a precision of the input data provided by user.
Completion callback definition about the function and args.
Definition: ie_c_api.h:273
const char * ie_c_api_version(void)
Returns number of version that is exported.
Definition: ie_c_api.h:232
IEStatusCode
This enum contains codes for all possible return values of the interface functions.
Definition: ie_c_api.h:209
IEStatusCode ie_network_set_output_precision(ie_network_t *network, const char *output_name, const precision_e p)
Changes the precision of the output data named "output_name".
IEStatusCode ie_core_versions_free(ie_core_versions_t *vers)
Releases memory occupied by ie_core_versions.
Definition: ie_c_api.h:163
IEStatusCode ie_network_get_output_name(const ie_network_t *network, const size_t number, char **name)
Gets name corresponding to the "number". Use the ie_network_name_free() method to free memory...
Represents dimensions for input or output data.
Definition: ie_c_api.h:114
IEStatusCode ie_blob_get_layout(const ie_blob_t *blob, layout_e *layout_result)
Gets layout of blob's tensor.
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.
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 pro...
IEStatusCode ie_network_free(ie_network_t **network)
When netowrk is loaded into the Infernece Engine, it is not required anymore and should be released...
Definition: ie_c_api.h:162
layout_e
Layouts that the inference engine supports.
Definition: ie_c_api.h:123
Represents version information that describes devices and the inference engine runtime library...
Definition: ie_c_api.h:53
IEStatusCode ie_network_set_input_resize_algorithm(ie_network_t *network, const char *input_name, const resize_alg_e resize_algo)
Sets resize algorithm to be used during pre-processing.
IEStatusCode ie_infer_request_infer_async(ie_infer_request_t *infer_request)
Starts asynchronous inference of the infer request and fill outputs.
Definition: ie_c_api.h:168
IEStatusCode ie_network_get_input_shapes(ie_network_t *network, input_shapes_t *shapes)
Helper method collect all input shapes with input names of corresponding input data. Use the ie_network_input_shapes_free() method to free memory.