Skip to content

Commit 100eabc

Browse files
authored
Update bindings to v2024.4.0 (#144)
* Update bindings to use OpenVINO v2024.4.0 This consists of using #142: ``` $ cargo xtask update 2024.4.0 $ cargo xtask codegen $ cargo test ``` The follow-on commits resolve the errors introduced by this update. * Generate C enums as Rust enums This change is an effort avoid missing new enum variants if they are added to OpenVINO's C headers. As it stands now, new variants could be missed until runtime, when the enum code can't be parsed and the library panics. Instead, this change generates a Rust `enum` for each C `enum` so that missing variants become a compile time error; if we update the bindings but don't handle these, we see a compile-time error. * Propagate new `ov_*_e` enum changes throughout The `openvino` crate depended on the previous constants generated by `bindgen`. This change uses the new Rust `enum`s instead, creating `From` and `Into` implementations to go between the Rust and C versions. Why not just pass through the `openvino_sys` enum as-is? The only real issue currently is documentation: the C headers start documentation with `<!` which seems a bit weird. I've also fixed up a few grammar problems in the documentation. But one day we may indeed be able to just reuse these types. * Move `version` into its module; add parsing It wasn't clear to me why the function and the struct were kept in different places so I moved them together. I also added a `Version::parts` function. * Handle tests which depend on v2024.2 breaking change Any test using `ElementType::U8` will cause problems when run on older versions of the library. This change manually ignores tests that depend on this by detecting the library version. For `Tensor`'s doc test, I chose to use a type not affected by the breaking change to keep things consistent. * ci: update versions tested against * clippy: fix `Into` to `From` recommendations * fix: tweak version check * fix: continue ignoring `OV_BOOLEAN` doc comment See b2bdfb0 for the rationale for this. * review: print message when test is skipped
1 parent b2bdfb0 commit 100eabc

File tree

19 files changed

+440
-311
lines changed

19 files changed

+440
-311
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
# found ("dyld: Library not loaded; '@rpath/libopenvino.2310.dylib'"). See
2222
# https://github.com/abrown/openvino-rs/actions/runs/6423141936/job/17441022932#step:7:154
2323
os: [ubuntu-20.04, ubuntu-22.04, windows-latest]
24-
version: [2023.2.0, 2024.0.0, 2024.1.0]
24+
version: [2023.2.0, 2024.1.0, 2024.4.0]
2525
apt: [false]
2626
# We also spot-check that things work when installing from APT by adding to the matrix: see
2727
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
28-
# APT install and check latest supported version 2024.1.0
28+
# APT install and check latest supported version.
2929
include:
3030
- os: ubuntu-22.04
31-
version: 2024.1.0
31+
version: 2024.4.0
3232
apt: true
3333
env:
3434
RUST_LOG: debug

crates/openvino-sys/src/generated/functions.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,13 +923,29 @@ extern "C" {
923923
value: f32,
924924
) -> ov_status_e;
925925
}
926+
extern "C" {
927+
#[doc = " @brief Add scale preprocess operation. Divide each channel element of input by different specified value.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param values Scaling values array for each channels\n @param value_size Scaling value size\n @return Status code of the operation: OK(0) for success."]
928+
pub fn ov_preprocess_preprocess_steps_scale_multi_channels(
929+
preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
930+
values: *const f32,
931+
value_size: i32,
932+
) -> ov_status_e;
933+
}
926934
extern "C" {
927935
#[doc = " @brief Add mean preprocess operation. Subtract specified value from each element of input.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param value Value to subtract from each element.\n @return Status code of the operation: OK(0) for success."]
928936
pub fn ov_preprocess_preprocess_steps_mean(
929937
preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
930938
value: f32,
931939
) -> ov_status_e;
932940
}
941+
extern "C" {
942+
#[doc = " @brief Add mean preprocess operation. Subtract each channel element of input by different specified value.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param values Value array to subtract from each element.\n @param value_size Mean value size\n @return Status code of the operation: OK(0) for success."]
943+
pub fn ov_preprocess_preprocess_steps_mean_multi_channels(
944+
preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
945+
values: *const f32,
946+
value_size: i32,
947+
) -> ov_status_e;
948+
}
933949
extern "C" {
934950
#[doc = " @brief Crop input tensor between begin and end coordinates.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param begin Pointer to begin indexes for input tensor cropping.\n Negative values represent counting elements from the end of input tensor\n @param begin_size The size of begin array\n @param end Pointer to end indexes for input tensor cropping.\n End indexes are exclusive, which means values including end edge are not included in the output slice.\n Negative values represent counting elements from the end of input tensor\n @param end_size The size of end array\n @return Status code of the operation: OK(0) for success."]
935951
pub fn ov_preprocess_preprocess_steps_crop(

crates/openvino-sys/src/generated/types.rs

Lines changed: 167 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,129 @@
11
/* automatically generated by rust-bindgen 0.70.1 */
22

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)]
394
#[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+
};
84127
#[doc = " @struct ov_dimension\n @ingroup ov_dimension_c_api\n @brief This is a structure interface equal to ov::Dimension"]
85128
#[repr(C)]
86129
#[derive(Debug, Copy, Clone)]
@@ -207,13 +250,16 @@ pub struct ov_profiling_info_t {
207250
#[doc = "!< Node type."]
208251
pub node_type: *const ::std::os::raw::c_char,
209252
}
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+
}
217263
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
218264
const _: () = {
219265
["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 {
403449
}
404450
#[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"]
405451
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)]
426453
#[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)]
434478
#[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+
}

crates/openvino-sys/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! buildNumber: std::ptr::null(),
1919
//! };
2020
//! let code = unsafe { openvino_sys::ov_get_openvino_version(&mut ov_version) };
21-
//! assert_eq!(code, 0);
21+
//! assert_eq!(code, openvino_sys::ov_status_e::OK);
2222
//! let version_ptr = { ov_version }.buildNumber;
2323
//! let string_version = unsafe { CStr::from_ptr(version_ptr) }.to_string_lossy().into_owned();
2424
//! unsafe { openvino_sys::ov_version_free(std::ptr::addr_of_mut!(ov_version)) };

crates/openvino-sys/upstream

Submodule upstream updated 8834 files

0 commit comments

Comments
 (0)