|
1 | 1 | /* automatically generated by rust-bindgen 0.70.1 */
|
2 | 2 |
|
3 |
| -#[doc = "!< SUCCESS"] |
4 |
| -pub const ov_status_e_OK: ov_status_e = 0; |
5 |
| -#[doc = "!< GENERAL_ERROR"] |
6 |
| -pub const ov_status_e_GENERAL_ERROR: ov_status_e = -1; |
7 |
| -#[doc = "!< NOT_IMPLEMENTED"] |
8 |
| -pub const ov_status_e_NOT_IMPLEMENTED: ov_status_e = -2; |
9 |
| -#[doc = "!< NETWORK_NOT_LOADED"] |
10 |
| -pub const ov_status_e_NETWORK_NOT_LOADED: ov_status_e = -3; |
11 |
| -#[doc = "!< PARAMETER_MISMATCH"] |
12 |
| -pub const ov_status_e_PARAMETER_MISMATCH: ov_status_e = -4; |
13 |
| -#[doc = "!< NOT_FOUND"] |
14 |
| -pub const ov_status_e_NOT_FOUND: ov_status_e = -5; |
15 |
| -#[doc = "!< OUT_OF_BOUNDS"] |
16 |
| -pub const ov_status_e_OUT_OF_BOUNDS: ov_status_e = -6; |
17 |
| -#[doc = "!< UNEXPECTED"] |
18 |
| -pub const ov_status_e_UNEXPECTED: ov_status_e = -7; |
19 |
| -#[doc = "!< REQUEST_BUSY"] |
20 |
| -pub const ov_status_e_REQUEST_BUSY: ov_status_e = -8; |
21 |
| -#[doc = "!< RESULT_NOT_READY"] |
22 |
| -pub const ov_status_e_RESULT_NOT_READY: ov_status_e = -9; |
23 |
| -#[doc = "!< NOT_ALLOCATED"] |
24 |
| -pub const ov_status_e_NOT_ALLOCATED: ov_status_e = -10; |
25 |
| -#[doc = "!< INFER_NOT_STARTED"] |
26 |
| -pub const ov_status_e_INFER_NOT_STARTED: ov_status_e = -11; |
27 |
| -#[doc = "!< NETWORK_NOT_READ"] |
28 |
| -pub const ov_status_e_NETWORK_NOT_READ: ov_status_e = -12; |
29 |
| -#[doc = "!< INFER_CANCELLED"] |
30 |
| -pub const ov_status_e_INFER_CANCELLED: ov_status_e = -13; |
31 |
| -#[doc = "!< INVALID_C_PARAM"] |
32 |
| -pub const ov_status_e_INVALID_C_PARAM: ov_status_e = -14; |
33 |
| -#[doc = "!< UNKNOWN_C_ERROR"] |
34 |
| -pub const ov_status_e_UNKNOWN_C_ERROR: ov_status_e = -15; |
35 |
| -#[doc = "!< NOT_IMPLEMENT_C_METHOD"] |
36 |
| -pub const ov_status_e_NOT_IMPLEMENT_C_METHOD: ov_status_e = -16; |
37 |
| -#[doc = "!< UNKNOW_EXCEPTION"] |
38 |
| -pub const ov_status_e_UNKNOW_EXCEPTION: ov_status_e = -17; |
| 3 | +#[repr(i32)] |
39 | 4 | #[doc = " @enum ov_status_e\n @ingroup ov_base_c_api\n @brief This enum contains codes for all possible return values of the interface functions"]
|
40 |
| -pub type ov_status_e = ::std::os::raw::c_int; |
41 |
| -#[doc = "!< Undefined element type"] |
42 |
| -pub const ov_element_type_e_UNDEFINED: ov_element_type_e = 0; |
43 |
| -#[doc = "!< Dynamic element type"] |
44 |
| -pub const ov_element_type_e_DYNAMIC: ov_element_type_e = 1; |
45 |
| -pub const ov_element_type_e_OV_BOOLEAN: ov_element_type_e = 2; |
46 |
| -#[doc = "!< bf16 element type"] |
47 |
| -pub const ov_element_type_e_BF16: ov_element_type_e = 3; |
48 |
| -#[doc = "!< f16 element type"] |
49 |
| -pub const ov_element_type_e_F16: ov_element_type_e = 4; |
50 |
| -#[doc = "!< f32 element type"] |
51 |
| -pub const ov_element_type_e_F32: ov_element_type_e = 5; |
52 |
| -#[doc = "!< f64 element type"] |
53 |
| -pub const ov_element_type_e_F64: ov_element_type_e = 6; |
54 |
| -#[doc = "!< i4 element type"] |
55 |
| -pub const ov_element_type_e_I4: ov_element_type_e = 7; |
56 |
| -#[doc = "!< i8 element type"] |
57 |
| -pub const ov_element_type_e_I8: ov_element_type_e = 8; |
58 |
| -#[doc = "!< i16 element type"] |
59 |
| -pub const ov_element_type_e_I16: ov_element_type_e = 9; |
60 |
| -#[doc = "!< i32 element type"] |
61 |
| -pub const ov_element_type_e_I32: ov_element_type_e = 10; |
62 |
| -#[doc = "!< i64 element type"] |
63 |
| -pub const ov_element_type_e_I64: ov_element_type_e = 11; |
64 |
| -#[doc = "!< binary element type"] |
65 |
| -pub const ov_element_type_e_U1: ov_element_type_e = 12; |
66 |
| -#[doc = "!< u4 element type"] |
67 |
| -pub const ov_element_type_e_U4: ov_element_type_e = 13; |
68 |
| -#[doc = "!< u8 element type"] |
69 |
| -pub const ov_element_type_e_U8: ov_element_type_e = 14; |
70 |
| -#[doc = "!< u16 element type"] |
71 |
| -pub const ov_element_type_e_U16: ov_element_type_e = 15; |
72 |
| -#[doc = "!< u32 element type"] |
73 |
| -pub const ov_element_type_e_U32: ov_element_type_e = 16; |
74 |
| -#[doc = "!< u64 element type"] |
75 |
| -pub const ov_element_type_e_U64: ov_element_type_e = 17; |
76 |
| -#[doc = "!< nf4 element type"] |
77 |
| -pub const ov_element_type_e_NF4: ov_element_type_e = 18; |
78 |
| -#[doc = "!< f8e4m3 element type"] |
79 |
| -pub const ov_element_type_e_F8E4M3: ov_element_type_e = 19; |
80 |
| -#[doc = "!< f8e5m2 element type"] |
81 |
| -pub const ov_element_type_e_F8E5M3: ov_element_type_e = 20; |
82 |
| -#[doc = " @enum ov_element_type_e\n @ingroup ov_base_c_api\n @brief This enum contains codes for element type."] |
83 |
| -pub type ov_element_type_e = ::std::os::raw::c_uint; |
| 5 | +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] |
| 6 | +pub enum ov_status_e { |
| 7 | + #[doc = "!< SUCCESS"] |
| 8 | + OK = 0, |
| 9 | + #[doc = "!< GENERAL_ERROR"] |
| 10 | + GENERAL_ERROR = -1, |
| 11 | + #[doc = "!< NOT_IMPLEMENTED"] |
| 12 | + NOT_IMPLEMENTED = -2, |
| 13 | + #[doc = "!< NETWORK_NOT_LOADED"] |
| 14 | + NETWORK_NOT_LOADED = -3, |
| 15 | + #[doc = "!< PARAMETER_MISMATCH"] |
| 16 | + PARAMETER_MISMATCH = -4, |
| 17 | + #[doc = "!< NOT_FOUND"] |
| 18 | + NOT_FOUND = -5, |
| 19 | + #[doc = "!< OUT_OF_BOUNDS"] |
| 20 | + OUT_OF_BOUNDS = -6, |
| 21 | + #[doc = "!< UNEXPECTED"] |
| 22 | + UNEXPECTED = -7, |
| 23 | + #[doc = "!< REQUEST_BUSY"] |
| 24 | + REQUEST_BUSY = -8, |
| 25 | + #[doc = "!< RESULT_NOT_READY"] |
| 26 | + RESULT_NOT_READY = -9, |
| 27 | + #[doc = "!< NOT_ALLOCATED"] |
| 28 | + NOT_ALLOCATED = -10, |
| 29 | + #[doc = "!< INFER_NOT_STARTED"] |
| 30 | + INFER_NOT_STARTED = -11, |
| 31 | + #[doc = "!< NETWORK_NOT_READ"] |
| 32 | + NETWORK_NOT_READ = -12, |
| 33 | + #[doc = "!< INFER_CANCELLED"] |
| 34 | + INFER_CANCELLED = -13, |
| 35 | + #[doc = "!< INVALID_C_PARAM"] |
| 36 | + INVALID_C_PARAM = -14, |
| 37 | + #[doc = "!< UNKNOWN_C_ERROR"] |
| 38 | + UNKNOWN_C_ERROR = -15, |
| 39 | + #[doc = "!< NOT_IMPLEMENT_C_METHOD"] |
| 40 | + NOT_IMPLEMENT_C_METHOD = -16, |
| 41 | + #[doc = "!< UNKNOW_EXCEPTION"] |
| 42 | + UNKNOW_EXCEPTION = -17, |
| 43 | +} |
| 44 | +#[repr(u32)] |
| 45 | +#[doc = " @enum ov_element_type_e\n @ingroup ov_base_c_api\n @brief This enum contains codes for element type, which is aligned with ov::element::Type_t in\n src/core/include/openvino/core/type/element_type.hpp"] |
| 46 | +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] |
| 47 | +pub enum ov_element_type_e { |
| 48 | + #[doc = "!< Undefined element type"] |
| 49 | + UNDEFINED = 0, |
| 50 | + #[doc = "!< Dynamic element type"] |
| 51 | + DYNAMIC = 1, |
| 52 | + OV_BOOLEAN = 2, |
| 53 | + #[doc = "!< bf16 element type"] |
| 54 | + BF16 = 3, |
| 55 | + #[doc = "!< f16 element type"] |
| 56 | + F16 = 4, |
| 57 | + #[doc = "!< f32 element type"] |
| 58 | + F32 = 5, |
| 59 | + #[doc = "!< f64 element type"] |
| 60 | + F64 = 6, |
| 61 | + #[doc = "!< i4 element type"] |
| 62 | + I4 = 7, |
| 63 | + #[doc = "!< i8 element type"] |
| 64 | + I8 = 8, |
| 65 | + #[doc = "!< i16 element type"] |
| 66 | + I16 = 9, |
| 67 | + #[doc = "!< i32 element type"] |
| 68 | + I32 = 10, |
| 69 | + #[doc = "!< i64 element type"] |
| 70 | + I64 = 11, |
| 71 | + #[doc = "!< binary element type"] |
| 72 | + U1 = 12, |
| 73 | + #[doc = "!< u2 element type"] |
| 74 | + U2 = 13, |
| 75 | + #[doc = "!< u3 element type"] |
| 76 | + U3 = 14, |
| 77 | + #[doc = "!< u4 element type"] |
| 78 | + U4 = 15, |
| 79 | + #[doc = "!< u6 element type"] |
| 80 | + U6 = 16, |
| 81 | + #[doc = "!< u8 element type"] |
| 82 | + U8 = 17, |
| 83 | + #[doc = "!< u16 element type"] |
| 84 | + U16 = 18, |
| 85 | + #[doc = "!< u32 element type"] |
| 86 | + U32 = 19, |
| 87 | + #[doc = "!< u64 element type"] |
| 88 | + U64 = 20, |
| 89 | + #[doc = "!< nf4 element type"] |
| 90 | + NF4 = 21, |
| 91 | + #[doc = "!< f8e4m3 element type"] |
| 92 | + F8E4M3 = 22, |
| 93 | + #[doc = "!< f8e5m2 element type"] |
| 94 | + F8E5M3 = 23, |
| 95 | + #[doc = "!< string element type"] |
| 96 | + STRING = 24, |
| 97 | + #[doc = "!< f4e2m1 element type"] |
| 98 | + F4E2M1 = 25, |
| 99 | + #[doc = "!< f8e8m0 element type"] |
| 100 | + F8E8M0 = 26, |
| 101 | +} |
| 102 | +#[doc = " @brief encryption_func is a function pointer that encrypt or decrypt the input memory, example of this function is\n codec(const char* input, const size_t in_size, const char* output, size_t* out_size)\n This function needs to be called twice,\n the first call to obtain out_size (the size of output buffer), the second call to obtain output buffer.\n The first call output is nullptr, before the second call, the caller needs to apply for output\n memory based on the out_size returned by the first call.\n the memory of parameter output is allocated and released by the caller.\n @param input The pointer to the input buffer.\n @param in_size The size of input.\n @param output The pointer to the encrypted/decrypted buffer.\n @param out_size The size of output."] |
| 103 | +pub type encryption_func = ::std::option::Option< |
| 104 | + unsafe extern "C" fn( |
| 105 | + arg1: *const ::std::os::raw::c_char, |
| 106 | + arg2: usize, |
| 107 | + arg3: *mut ::std::os::raw::c_char, |
| 108 | + arg4: *mut usize, |
| 109 | + ), |
| 110 | +>; |
| 111 | +#[repr(C)] |
| 112 | +#[derive(Debug, Copy, Clone)] |
| 113 | +pub struct ov_encryption_callbacks { |
| 114 | + pub encrypt_func: encryption_func, |
| 115 | + pub decrypt_func: encryption_func, |
| 116 | +} |
| 117 | +#[allow(clippy::unnecessary_operation, clippy::identity_op)] |
| 118 | +const _: () = { |
| 119 | + ["Size of ov_encryption_callbacks"][::std::mem::size_of::<ov_encryption_callbacks>() - 16usize]; |
| 120 | + ["Alignment of ov_encryption_callbacks"] |
| 121 | + [::std::mem::align_of::<ov_encryption_callbacks>() - 8usize]; |
| 122 | + ["Offset of field: ov_encryption_callbacks::encrypt_func"] |
| 123 | + [::std::mem::offset_of!(ov_encryption_callbacks, encrypt_func) - 0usize]; |
| 124 | + ["Offset of field: ov_encryption_callbacks::decrypt_func"] |
| 125 | + [::std::mem::offset_of!(ov_encryption_callbacks, decrypt_func) - 8usize]; |
| 126 | +}; |
84 | 127 | #[doc = " @struct ov_dimension\n @ingroup ov_dimension_c_api\n @brief This is a structure interface equal to ov::Dimension"]
|
85 | 128 | #[repr(C)]
|
86 | 129 | #[derive(Debug, Copy, Clone)]
|
@@ -207,13 +250,16 @@ pub struct ov_profiling_info_t {
|
207 | 250 | #[doc = "!< Node type."]
|
208 | 251 | pub node_type: *const ::std::os::raw::c_char,
|
209 | 252 | }
|
210 |
| -#[doc = "!< A node is not executed."] |
211 |
| -pub const ov_profiling_info_t_Status_NOT_RUN: ov_profiling_info_t_Status = 0; |
212 |
| -#[doc = "!< A node is optimized out during graph optimization phase."] |
213 |
| -pub const ov_profiling_info_t_Status_OPTIMIZED_OUT: ov_profiling_info_t_Status = 1; |
214 |
| -#[doc = "!< A node is executed."] |
215 |
| -pub const ov_profiling_info_t_Status_EXECUTED: ov_profiling_info_t_Status = 2; |
216 |
| -pub type ov_profiling_info_t_Status = ::std::os::raw::c_uint; |
| 253 | +#[repr(u32)] |
| 254 | +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] |
| 255 | +pub enum ov_profiling_info_t_Status { |
| 256 | + #[doc = "!< A node is not executed."] |
| 257 | + NOT_RUN = 0, |
| 258 | + #[doc = "!< A node is optimized out during graph optimization phase."] |
| 259 | + OPTIMIZED_OUT = 1, |
| 260 | + #[doc = "!< A node is executed."] |
| 261 | + EXECUTED = 2, |
| 262 | +} |
217 | 263 | #[allow(clippy::unnecessary_operation, clippy::identity_op)]
|
218 | 264 | const _: () = {
|
219 | 265 | ["Size of ov_profiling_info_t"][::std::mem::size_of::<ov_profiling_info_t>() - 48usize];
|
@@ -403,33 +449,39 @@ pub struct ov_preprocess_preprocess_steps {
|
403 | 449 | }
|
404 | 450 | #[doc = " @struct ov_preprocess_preprocess_steps_t\n @ingroup ov_prepostprocess_c_api\n @brief type define ov_preprocess_preprocess_steps_t from ov_preprocess_preprocess_steps"]
|
405 | 451 | pub type ov_preprocess_preprocess_steps_t = ov_preprocess_preprocess_steps;
|
406 |
| -#[doc = "!< Undefine color format"] |
407 |
| -pub const ov_color_format_e_UNDEFINE: ov_color_format_e = 0; |
408 |
| -#[doc = "!< Image in NV12 format as single tensor"] |
409 |
| -pub const ov_color_format_e_NV12_SINGLE_PLANE: ov_color_format_e = 1; |
410 |
| -#[doc = "!< Image in NV12 format represented as separate tensors for Y and UV planes."] |
411 |
| -pub const ov_color_format_e_NV12_TWO_PLANES: ov_color_format_e = 2; |
412 |
| -#[doc = "!< Image in I420 (YUV) format as single tensor"] |
413 |
| -pub const ov_color_format_e_I420_SINGLE_PLANE: ov_color_format_e = 3; |
414 |
| -#[doc = "!< Image in I420 format represented as separate tensors for Y, U and V planes."] |
415 |
| -pub const ov_color_format_e_I420_THREE_PLANES: ov_color_format_e = 4; |
416 |
| -#[doc = "!< Image in RGB interleaved format (3 channels)"] |
417 |
| -pub const ov_color_format_e_RGB: ov_color_format_e = 5; |
418 |
| -#[doc = "!< Image in BGR interleaved format (3 channels)"] |
419 |
| -pub const ov_color_format_e_BGR: ov_color_format_e = 6; |
420 |
| -#[doc = "!< Image in GRAY format (1 channel)"] |
421 |
| -pub const ov_color_format_e_GRAY: ov_color_format_e = 7; |
422 |
| -#[doc = "!< Image in RGBX interleaved format (4 channels)"] |
423 |
| -pub const ov_color_format_e_RGBX: ov_color_format_e = 8; |
424 |
| -#[doc = "!< Image in BGRX interleaved format (4 channels)"] |
425 |
| -pub const ov_color_format_e_BGRX: ov_color_format_e = 9; |
| 452 | +#[repr(u32)] |
426 | 453 | #[doc = " @enum ov_color_format_e\n @ingroup ov_prepostprocess_c_api\n @brief This enum contains enumerations for color format."]
|
427 |
| -pub type ov_color_format_e = ::std::os::raw::c_uint; |
428 |
| -#[doc = "!< linear algorithm"] |
429 |
| -pub const ov_preprocess_resize_algorithm_e_RESIZE_LINEAR: ov_preprocess_resize_algorithm_e = 0; |
430 |
| -#[doc = "!< cubic algorithm"] |
431 |
| -pub const ov_preprocess_resize_algorithm_e_RESIZE_CUBIC: ov_preprocess_resize_algorithm_e = 1; |
432 |
| -#[doc = "!< nearest algorithm"] |
433 |
| -pub const ov_preprocess_resize_algorithm_e_RESIZE_NEAREST: ov_preprocess_resize_algorithm_e = 2; |
| 454 | +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] |
| 455 | +pub enum ov_color_format_e { |
| 456 | + #[doc = "!< Undefine color format"] |
| 457 | + UNDEFINE = 0, |
| 458 | + #[doc = "!< Image in NV12 format as single tensor"] |
| 459 | + NV12_SINGLE_PLANE = 1, |
| 460 | + #[doc = "!< Image in NV12 format represented as separate tensors for Y and UV planes."] |
| 461 | + NV12_TWO_PLANES = 2, |
| 462 | + #[doc = "!< Image in I420 (YUV) format as single tensor"] |
| 463 | + I420_SINGLE_PLANE = 3, |
| 464 | + #[doc = "!< Image in I420 format represented as separate tensors for Y, U and V planes."] |
| 465 | + I420_THREE_PLANES = 4, |
| 466 | + #[doc = "!< Image in RGB interleaved format (3 channels)"] |
| 467 | + RGB = 5, |
| 468 | + #[doc = "!< Image in BGR interleaved format (3 channels)"] |
| 469 | + BGR = 6, |
| 470 | + #[doc = "!< Image in GRAY format (1 channel)"] |
| 471 | + GRAY = 7, |
| 472 | + #[doc = "!< Image in RGBX interleaved format (4 channels)"] |
| 473 | + RGBX = 8, |
| 474 | + #[doc = "!< Image in BGRX interleaved format (4 channels)"] |
| 475 | + BGRX = 9, |
| 476 | +} |
| 477 | +#[repr(u32)] |
434 | 478 | #[doc = " @enum ov_preprocess_resize_algorithm_e\n @ingroup ov_prepostprocess_c_api\n @brief This enum contains codes for all preprocess resize algorithm."]
|
435 |
| -pub type ov_preprocess_resize_algorithm_e = ::std::os::raw::c_uint; |
| 479 | +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] |
| 480 | +pub enum ov_preprocess_resize_algorithm_e { |
| 481 | + #[doc = "!< linear algorithm"] |
| 482 | + RESIZE_LINEAR = 0, |
| 483 | + #[doc = "!< cubic algorithm"] |
| 484 | + RESIZE_CUBIC = 1, |
| 485 | + #[doc = "!< nearest algorithm"] |
| 486 | + RESIZE_NEAREST = 2, |
| 487 | +} |
0 commit comments