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;
72 const char *device_name;
73 const char *build_number;
74 const char *description;
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);
668 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_name(
const ie_network_t *network,
char **name);
677 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_inputs_number(
const ie_network_t *network,
size_t *size_result);
687 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_name(
const ie_network_t *network,
size_t number,
char **name);
697 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);
708 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_input_precision(ie_network_t *network,
const char *input_name,
const precision_e p);
718 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);
729 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_set_input_layout(ie_network_t *network,
const char *input_name,
const layout_e l);
739 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);
749 INFERENCE_ENGINE_C_API(IE_NODISCARD
IEStatusCode) ie_network_get_input_resize_algorithm(
const ie_network_t *network,
const char *input_name, \
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);
1025 #endif // IE_C_API_H