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__
34 #define INFERENCE_ENGINE_C_API_CALLBACK __cdecl
35 #ifdef inference_engine_c_api_EXPORTS
36 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __declspec(dllexport) __VA_ARGS__ __cdecl
38 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __declspec(dllimport) __VA_ARGS__ __cdecl
42 #define INFERENCE_ENGINE_C_API(...) INFERENCE_ENGINE_C_API_EXTERN __attribute__((visibility("default"))) __VA_ARGS__
43 #define IE_NODISCARD __attribute__((warn_unused_result))
47 #ifndef INFERENCE_ENGINE_C_API_CALLBACK
48 #define INFERENCE_ENGINE_C_API_CALLBACK
51 typedef struct ie_core ie_core_t;
52 typedef struct ie_network ie_network_t;
53 typedef struct ie_executable ie_executable_network_t;
54 typedef struct ie_infer_request ie_infer_request_t;
55 typedef struct ie_blob ie_blob_t;
104 unsigned int range_for_async_infer_request[3];
105 unsigned int range_for_streams[2];
231 NOT_IMPLEMENTED = -2,
232 NETWORK_NOT_LOADED = -3,
233 PARAMETER_MISMATCH = -4,
241 RESULT_NOT_READY = -9,
243 INFER_NOT_STARTED = -11,
244 NETWORK_NOT_READ = -12
293 void (INFERENCE_ENGINE_C_API_CALLBACK *completeCallBackFunc)(
void *args);
316 INFERENCE_ENGINE_C_API(
void) ie_version_free(
ie_version_t *version);
322 INFERENCE_ENGINE_C_API(
void) ie_param_free(
ie_param_t *param);
342 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_create(
const char *xml_config_file, ie_core_t **core);
349 INFERENCE_ENGINE_C_API(
void) ie_core_free(ie_core_t **core);
359 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_get_versions(
const ie_core_t *core,
const char *device_name,
ie_core_versions_t *versions);
378 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_read_network(ie_core_t *core,
const char *xml,
const char *weights_file, ie_network_t **network);
390 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_read_network_from_memory(ie_core_t *core,
const uint8_t *xml_content,
size_t xml_content_size,
391 const ie_blob_t *weight_blob, ie_network_t **network);
404 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_load_network(ie_core_t *core,
const ie_network_t *network,
const char *device_name, \
405 const ie_config_t *config, ie_executable_network_t **exe_network);
416 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_set_config(ie_core_t *core,
const ie_config_t *ie_core_config,
const char *device_name);
428 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_register_plugin(ie_core_t *core,
const char *plugin_name,
const char *device_name);
437 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_register_plugins(ie_core_t *core,
const char *xml_config_file);
446 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_unregister_plugin(ie_core_t *core,
const char *device_name);
456 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_add_extension(ie_core_t *core,
const char *extension_path,
const char *device_name);
468 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_get_metric(
const ie_core_t *core,
const char *device_name,
const char *metric_name,
ie_param_t *param_result);
480 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_core_get_config(
const ie_core_t *core,
const char *device_name,
const char *config_name,
ie_param_t *param_result);
514 INFERENCE_ENGINE_C_API(
void) ie_exec_network_free(ie_executable_network_t **ie_exec_network);
524 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_exec_network_create_infer_request(ie_executable_network_t *ie_exec_network, ie_infer_request_t **request);
535 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_exec_network_get_metric(
const ie_executable_network_t *ie_exec_network, \
536 const char *metric_name,
ie_param_t *param_result);
546 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_exec_network_set_config(ie_executable_network_t *ie_exec_network,
const ie_config_t *param_config);
557 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_exec_network_get_config(
const ie_executable_network_t *ie_exec_network, \
558 const char *metric_config,
ie_param_t *param_result);
576 INFERENCE_ENGINE_C_API(
void) ie_infer_request_free(ie_infer_request_t **infer_request);
586 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_infer_request_get_blob(ie_infer_request_t *infer_request,
const char *name, ie_blob_t **blob);
596 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_infer_request_set_blob(ie_infer_request_t *infer_request,
const char *name,
const ie_blob_t *blob);
604 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_infer_request_infer(ie_infer_request_t *infer_request);
612 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_infer_request_infer_async(ie_infer_request_t *infer_request);
633 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_infer_request_wait(ie_infer_request_t *infer_request,
const int64_t timeout);
642 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_infer_request_set_batch(ie_infer_request_t *infer_request,
const size_t size);
660 INFERENCE_ENGINE_C_API(
void) ie_network_free(ie_network_t **network);
669 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_name(
const ie_network_t *network,
char **name);
678 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_inputs_number(
const ie_network_t *network,
size_t *size_result);
688 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_name(
const ie_network_t *network,
size_t number,
char **name);
698 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_precision(
const ie_network_t *network,
const char *input_name,
precision_e *prec_result);
709 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_input_precision(ie_network_t *network,
const char *input_name,
const precision_e p);
719 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_layout(
const ie_network_t *network,
const char *input_name,
layout_e *layout_result);
730 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_input_layout(ie_network_t *network,
const char *input_name,
const layout_e l);
740 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_dims(
const ie_network_t *network,
const char *input_name,
dimensions_t *dims_result);
750 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_resize_algorithm(
const ie_network_t *network,
const char *input_name,
resize_alg_e *resize_alg_result);
760 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_input_resize_algorithm(ie_network_t *network,
const char *input_name,
const resize_alg_e resize_algo);
770 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_color_format(
const ie_network_t *network,
const char *input_name,
colorformat_e *colformat_result);
780 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_color_format(ie_network_t *network,
const char *input_name,
const colorformat_e color_format);
808 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_outputs_number(
const ie_network_t *network,
size_t *size_result);
818 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_output_name(
const ie_network_t *network,
const size_t number,
char **name);
828 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_output_precision(
const ie_network_t *network,
const char *output_name,
precision_e *prec_result);
838 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_output_precision(ie_network_t *network,
const char *output_name,
const precision_e p);
848 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_output_layout(
const ie_network_t *network,
const char *output_name,
layout_e *layout_result);
858 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_output_layout(ie_network_t *network,
const char *output_name,
const layout_e l);
868 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_output_dims(
const ie_network_t *network,
const char *output_name,
dimensions_t *dims_result);
875 INFERENCE_ENGINE_C_API(
void) ie_network_input_shapes_free(
input_shapes_t *inputShapes);
882 INFERENCE_ENGINE_C_API(
void) ie_network_name_free(
char **name);
902 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_make_memory(
const tensor_desc_t *tensorDesc, ie_blob_t **blob);
913 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_make_memory_from_preallocated(
const tensor_desc_t *tensorDesc,
void *ptr,
size_t size, ie_blob_t **blob);
923 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_make_memory_with_roi(
const ie_blob_t *inputBlob,
const roi_t *
roi, ie_blob_t **blob);
933 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_make_memory_nv12(
const ie_blob_t *y,
const ie_blob_t *uv, ie_blob_t **nv12Blob);
944 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_make_memory_i420(
const ie_blob_t *y,
const ie_blob_t *u,
const ie_blob_t *v, ie_blob_t **i420Blob);
953 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_size(ie_blob_t *blob,
int *size_result);
962 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_byte_size(ie_blob_t *blob,
int *bsize_result);
969 INFERENCE_ENGINE_C_API(
void) ie_blob_deallocate(ie_blob_t **blob);
996 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_get_dims(
const ie_blob_t *blob,
dimensions_t *dims_result);
1005 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_get_layout(
const ie_blob_t *blob,
layout_e *layout_result);
1014 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_blob_get_precision(
const ie_blob_t *blob,
precision_e *prec_result);
1021 INFERENCE_ENGINE_C_API(
void) ie_blob_free(ie_blob_t **blob);
IEStatusCode
This enum contains codes for all possible return values of the interface functions.
Definition: ie_c_api.h:228
colorformat_e
Extra information about input color format for preprocessing.
Definition: ie_c_api.h:204
@ BGRX
BGRX color format with X ignored during inference.
Definition: ie_c_api.h:209
@ RGB
RGB color format.
Definition: ie_c_api.h:206
@ BGR
BGR color format, default in DLDT.
Definition: ie_c_api.h:207
@ RGBX
RGBX color format with X ignored during inference.
Definition: ie_c_api.h:208
@ NV12
NV12 color format represented as compound Y+UV blob.
Definition: ie_c_api.h:210
@ RAW
Plain blob (default), no extra color processing required.
Definition: ie_c_api.h:205
@ I420
I420 color format represented as compound Y+U+V blob.
Definition: ie_c_api.h:211
precision_e
Precisions that the inference engine supports.
Definition: ie_c_api.h:172
@ U64
Definition: ie_c_api.h:184
@ U8
Definition: ie_c_api.h:179
@ FP32
Definition: ie_c_api.h:175
@ BIN
Definition: ie_c_api.h:186
@ FP16
Definition: ie_c_api.h:176
@ MIXED
Definition: ie_c_api.h:174
@ U32
Definition: ie_c_api.h:185
@ I32
Definition: ie_c_api.h:182
@ Q78
Definition: ie_c_api.h:177
@ I8
Definition: ie_c_api.h:180
@ I16
Definition: ie_c_api.h:178
@ CUSTOM
Definition: ie_c_api.h:187
@ I64
Definition: ie_c_api.h:183
@ UNSPECIFIED
Definition: ie_c_api.h:173
@ U16
Definition: ie_c_api.h:181
layout_e
Layouts that the inference engine supports.
Definition: ie_c_api.h:139
@ BLOCKED
"BLOCKED" layout
Definition: ie_c_api.h:165
@ NC
"NC" layout
Definition: ie_c_api.h:162
@ NCHW
"NCHW" layout
Definition: ie_c_api.h:143
@ CN
"CN" layout
Definition: ie_c_api.h:163
@ C
"C" layout
Definition: ie_c_api.h:155
@ NHWC
"NHWC" layout
Definition: ie_c_api.h:144
@ OIHW
"OIHW" layout
Definition: ie_c_api.h:149
@ SCALAR
"SCALAR" layout
Definition: ie_c_api.h:152
@ CHW
"CHW" layout
Definition: ie_c_api.h:158
@ ANY
"ANY" layout
Definition: ie_c_api.h:140
@ HW
"HW" layout
Definition: ie_c_api.h:161
@ NCDHW
"NCDHW" layout
Definition: ie_c_api.h:145
@ NDHWC
"NDHWC" layout
Definition: ie_c_api.h:146
resize_alg_e
Represents the list of supported resize algorithms.
Definition: ie_c_api.h:218
@ RESIZE_BILINEAR
"Bilinear resize" mode
Definition: ie_c_api.h:220
@ RESIZE_AREA
"Area resize" mode
Definition: ie_c_api.h:221
@ NO_RESIZE
"No resize" mode
Definition: ie_c_api.h:219
Represents detailed information for an error.
Definition: ie_c_api.h:122
char msg[256]
A description message.
Definition: ie_c_api.h:123
Represents dimensions for input or output data.
Definition: ie_c_api.h:130
size_t dims[8]
An array of dimensions.
Definition: ie_c_api.h:132
size_t ranks
A runk representing a number of dimensions.
Definition: ie_c_api.h:131
Represent all available devices.
Definition: ie_c_api.h:301
Represents copied data from the given blob.
Definition: ie_c_api.h:281
const void * cbuffer
cbuffer is read-only
Definition: ie_c_api.h:284
void * buffer
buffer can be written
Definition: ie_c_api.h:283
Completion callback definition about the function and args.
Definition: ie_c_api.h:292
Represents configuration information that describes devices.
Definition: ie_c_api.h:90
const char * name
A configuration key.
Definition: ie_c_api.h:91
const char * value
A configuration value.
Definition: ie_c_api.h:92
struct ie_config * next
A pointer to the next configuration value.
Definition: ie_c_api.h:93
Represents version information that describes devices and the inference engine runtime library.
Definition: ie_c_api.h:69
const char * build_number
A build number.
Definition: ie_c_api.h:73
size_t minor
A minor version.
Definition: ie_c_api.h:71
size_t major
A major version.
Definition: ie_c_api.h:70
const char * device_name
A device name.
Definition: ie_c_api.h:72
const char * description
A device description.
Definition: ie_c_api.h:74
Represents all versions information that describes all devices and the inference engine runtime libra...
Definition: ie_c_api.h:81
size_t num_vers
A number of versions in the array.
Definition: ie_c_api.h:83
ie_core_version_t * versions
An array of device versions.
Definition: ie_c_api.h:82
Represents configuration parameter information.
Definition: ie_c_api.h:113
metric and config parameters.
Definition: ie_c_api.h:100
Represents an API version information that reflects the set of supported features.
Definition: ie_c_api.h:61
char * api_version
A string representing Inference Engine version.
Definition: ie_c_api.h:62
This structure describes roi data.
Definition: ie_c_api.h:251
size_t sizeX
W size of roi.
Definition: ie_c_api.h:255
size_t id
ID of a roi.
Definition: ie_c_api.h:252
size_t posY
H upper left coordinate of roi.
Definition: ie_c_api.h:254
size_t posX
W upper left coordinate of roi.
Definition: ie_c_api.h:253
size_t sizeY
H size of roi.
Definition: ie_c_api.h:256
Represents detailed information for a tensor.
Definition: ie_c_api.h:194