1use super::types::*;
2use crate::link;
3type wchar_t = ::std::os::raw::c_char;
4link! {
5
6unsafe extern "C" {
9 #[doc = " @brief Print the error info.\n @ingroup ov_base_c_api\n @param ov_status_e a status code."]
10 pub fn ov_get_error_info(status: ov_status_e) -> *const ::std::os::raw::c_char;
11}
12unsafe extern "C" {
13 #[doc = " @brief free char\n @ingroup ov_base_c_api\n @param content The pointer to the char to free."]
14 pub fn ov_free(content: *const ::std::os::raw::c_char);
15}
16unsafe extern "C" {
17 #[doc = " @brief Get the last error msg.\n @ingroup ov_base_c_api"]
18 pub fn ov_get_last_err_msg() -> *const ::std::os::raw::c_char;
19}
20unsafe extern "C" {
21 #[doc = " @brief Check this dimension whether is dynamic\n @ingroup ov_dimension_c_api\n @param dim The dimension pointer that will be checked.\n @return Boolean, true is dynamic and false is static."]
22 pub fn ov_dimension_is_dynamic(dim: ov_dimension_t) -> bool;
23}
24unsafe extern "C" {
25 #[doc = " @brief Create a layout object.\n @ingroup ov_layout_c_api\n @param layout The layout input pointer.\n @param layout_desc The description of layout.\n @return ov_status_e a status code, return OK if successful"]
26 pub fn ov_layout_create(
27 layout_desc: *const ::std::os::raw::c_char,
28 layout: *mut *mut ov_layout_t,
29 ) -> ov_status_e;
30}
31unsafe extern "C" {
32 #[doc = " @brief Free layout object.\n @ingroup ov_layout_c_api\n @param layout will be released."]
33 pub fn ov_layout_free(layout: *mut ov_layout_t);
34}
35unsafe extern "C" {
36 #[doc = " @brief Convert layout object to a readable string.\n @ingroup ov_layout_c_api\n @param layout will be converted.\n @return string that describes the layout content."]
37 pub fn ov_layout_to_string(layout: *const ov_layout_t) -> *const ::std::os::raw::c_char;
38}
39unsafe extern "C" {
40 #[doc = " @brief Check this rank whether is dynamic\n @ingroup ov_rank_c_api\n @param rank The rank pointer that will be checked.\n @return bool The return value."]
41 pub fn ov_rank_is_dynamic(rank: ov_rank_t) -> bool;
42}
43unsafe extern "C" {
44 #[doc = " @brief Initialize a fully shape object, allocate space for its dimensions and set its content id dims is not null.\n @ingroup ov_shape_c_api\n @param rank The rank value for this object, it should be more than 0(>0)\n @param dims The dimensions data for this shape object, it's size should be equal to rank.\n @param shape The input/output shape object pointer.\n @return ov_status_e The return status code."]
45 pub fn ov_shape_create(rank: i64, dims: *const i64, shape: *mut ov_shape_t) -> ov_status_e;
46}
47unsafe extern "C" {
48 #[doc = " @brief Free a shape object's internal memory.\n @ingroup ov_shape_c_api\n @param shape The input shape object pointer.\n @return ov_status_e The return status code."]
49 pub fn ov_shape_free(shape: *mut ov_shape_t) -> ov_status_e;
50}
51unsafe extern "C" {
52 #[doc = " @brief Initialze a partial shape with static rank and dynamic dimension.\n @ingroup ov_partial_shape_c_api\n @param rank support static rank.\n @param dims support dynamic and static dimension.\n Static rank, but dynamic dimensions on some or all axes.\n Examples: `{1,2,?,4}` or `{?,?,?}` or `{1,2,-1,4}`\n Static rank, and static dimensions on all axes.\n Examples: `{1,2,3,4}` or `{6}` or `{}`\n\n @return Status code of the operation: OK(0) for success."]
53 pub fn ov_partial_shape_create(
54 rank: i64,
55 dims: *const ov_dimension_t,
56 partial_shape_obj: *mut ov_partial_shape_t,
57 ) -> ov_status_e;
58}
59unsafe extern "C" {
60 #[doc = " @brief Initialze a partial shape with dynamic rank and dynamic dimension.\n @ingroup ov_partial_shape_c_api\n @param rank support dynamic and static rank.\n @param dims support dynamic and static dimension.\n Dynamic rank:\n Example: `?`\n Static rank, but dynamic dimensions on some or all axes.\n Examples: `{1,2,?,4}` or `{?,?,?}` or `{1,2,-1,4}`\n Static rank, and static dimensions on all axes.\n Examples: `{1,2,3,4}` or `{6}` or `{}\"`\n\n @return Status code of the operation: OK(0) for success."]
61 pub fn ov_partial_shape_create_dynamic(
62 rank: ov_rank_t,
63 dims: *const ov_dimension_t,
64 partial_shape_obj: *mut ov_partial_shape_t,
65 ) -> ov_status_e;
66}
67unsafe extern "C" {
68 #[doc = " @brief Initialize a partial shape with static rank and static dimension.\n @ingroup ov_partial_shape_c_api\n @param rank support static rank.\n @param dims support static dimension.\n Static rank, and static dimensions on all axes.\n Examples: `{1,2,3,4}` or `{6}` or `{}`\n\n @return Status code of the operation: OK(0) for success."]
69 pub fn ov_partial_shape_create_static(
70 rank: i64,
71 dims: *const i64,
72 partial_shape_obj: *mut ov_partial_shape_t,
73 ) -> ov_status_e;
74}
75unsafe extern "C" {
76 #[doc = " @brief Release internal memory allocated in partial shape.\n @ingroup ov_partial_shape_c_api\n @param partial_shape The object's internal memory will be released.\n @return Status code of the operation: OK(0) for success."]
77 pub fn ov_partial_shape_free(partial_shape: *mut ov_partial_shape_t);
78}
79unsafe extern "C" {
80 #[doc = " @brief Convert partial shape without dynamic data to a static shape.\n @ingroup ov_partial_shape_c_api\n @param partial_shape The partial_shape pointer.\n @param shape The shape pointer.\n @return Status code of the operation: OK(0) for success."]
81 pub fn ov_partial_shape_to_shape(
82 partial_shape: ov_partial_shape_t,
83 shape: *mut ov_shape_t,
84 ) -> ov_status_e;
85}
86unsafe extern "C" {
87 #[doc = " @brief Convert shape to partial shape.\n @ingroup ov_partial_shape_c_api\n @param shape The shape pointer.\n @param partial_shape The partial_shape pointer.\n @return Status code of the operation: OK(0) for success."]
88 pub fn ov_shape_to_partial_shape(
89 shape: ov_shape_t,
90 partial_shape: *mut ov_partial_shape_t,
91 ) -> ov_status_e;
92}
93unsafe extern "C" {
94 #[doc = " @brief Check this partial_shape whether is dynamic\n @ingroup ov_partial_shape_c_api\n @param partial_shape The partial_shape pointer.\n @return Status code of the operation: OK(0) for success."]
95 pub fn ov_partial_shape_is_dynamic(partial_shape: ov_partial_shape_t) -> bool;
96}
97unsafe extern "C" {
98 #[doc = " @brief Helper function, convert a partial shape to readable string.\n @ingroup ov_partial_shape_c_api\n @param partial_shape The partial_shape pointer.\n @return A string reprensts partial_shape's content."]
99 pub fn ov_partial_shape_to_string(
100 partial_shape: ov_partial_shape_t,
101 ) -> *const ::std::os::raw::c_char;
102}
103unsafe extern "C" {
104 #[doc = " @brief Get the shape of port object.\n @ingroup ov_node_c_api\n @param port A pointer to ov_output_const_port_t.\n @param tensor_shape tensor shape.\n @return Status code of the operation: OK(0) for success."]
105 pub fn ov_const_port_get_shape(
106 port: *const ov_output_const_port_t,
107 tensor_shape: *mut ov_shape_t,
108 ) -> ov_status_e;
109}
110unsafe extern "C" {
111 #[doc = " @brief Get the shape of port object.\n @ingroup ov_node_c_api\n @param port A pointer to ov_output_port_t.\n @param tensor_shape tensor shape.\n @return Status code of the operation: OK(0) for success."]
112 pub fn ov_port_get_shape(
113 port: *const ov_output_port_t,
114 tensor_shape: *mut ov_shape_t,
115 ) -> ov_status_e;
116}
117unsafe extern "C" {
118 #[doc = " @brief Get the tensor name of port.\n @ingroup ov_node_c_api\n @param port A pointer to the ov_output_const_port_t.\n @param tensor_name A pointer to the tensor name.\n @return Status code of the operation: OK(0) for success."]
119 pub fn ov_port_get_any_name(
120 port: *const ov_output_const_port_t,
121 tensor_name: *mut *mut ::std::os::raw::c_char,
122 ) -> ov_status_e;
123}
124unsafe extern "C" {
125 #[doc = " @brief Get the partial shape of port.\n @ingroup ov_node_c_api\n @param port A pointer to the ov_output_const_port_t.\n @param partial_shape Partial shape.\n @return Status code of the operation: OK(0) for success."]
126 pub fn ov_port_get_partial_shape(
127 port: *const ov_output_const_port_t,
128 partial_shape: *mut ov_partial_shape_t,
129 ) -> ov_status_e;
130}
131unsafe extern "C" {
132 #[doc = " @brief Get the tensor type of port.\n @ingroup ov_node_c_api\n @param port A pointer to the ov_output_const_port_t.\n @param tensor_type tensor type.\n @return Status code of the operation: OK(0) for success."]
133 pub fn ov_port_get_element_type(
134 port: *const ov_output_const_port_t,
135 tensor_type: *mut ov_element_type_e,
136 ) -> ov_status_e;
137}
138unsafe extern "C" {
139 #[doc = " @brief free port object\n @ingroup ov_node_c_api\n @param port The pointer to the instance of the ov_output_port_t to free."]
140 pub fn ov_output_port_free(port: *mut ov_output_port_t);
141}
142unsafe extern "C" {
143 #[doc = " @brief free const port\n @ingroup ov_node_c_api\n @param port The pointer to the instance of the ov_output_const_port_t to free."]
144 pub fn ov_output_const_port_free(port: *mut ov_output_const_port_t);
145}
146unsafe extern "C" {
147 #[doc = " @brief Constructs Tensor using element type, shape and external host ptr.\n @ingroup ov_tensor_c_api\n @param type Tensor element type\n @param shape Tensor shape\n @param host_ptr Pointer to pre-allocated host memory\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
148 pub fn ov_tensor_create_from_host_ptr(
149 type_: ov_element_type_e,
150 shape: ov_shape_t,
151 host_ptr: *mut ::std::os::raw::c_void,
152 tensor: *mut *mut ov_tensor_t,
153 ) -> ov_status_e;
154}
155unsafe extern "C" {
156 #[doc = " @brief Constructs Tensor using element type and shape. Allocate internal host storage using default allocator\n @ingroup ov_tensor_c_api\n @param type Tensor element type\n @param shape Tensor shape\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
157 pub fn ov_tensor_create(
158 type_: ov_element_type_e,
159 shape: ov_shape_t,
160 tensor: *mut *mut ov_tensor_t,
161 ) -> ov_status_e;
162}
163unsafe extern "C" {
164 #[doc = " @brief Set new shape for tensor, deallocate/allocate if new total size is bigger than previous one.\n @ingroup ov_tensor_c_api\n @param shape Tensor shape\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
165 pub fn ov_tensor_set_shape(tensor: *mut ov_tensor_t, shape: ov_shape_t) -> ov_status_e;
166}
167unsafe extern "C" {
168 #[doc = " @brief Constructs a new tensor using a string array.\n @ingroup ov_tensor_c_api\n @param string_array An array of strings\n @param array_size The size of the string array\n @param shape Tensor shape\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
169 pub fn ov_tensor_create_from_string_array(
170 string_array: *mut *const ::std::os::raw::c_char,
171 array_size: usize,
172 shape: ov_shape_t,
173 tensor: *mut *mut ov_tensor_t,
174 ) -> ov_status_e;
175}
176unsafe extern "C" {
177 #[doc = " @brief Get shape for tensor.\n @ingroup ov_tensor_c_api\n @param shape Tensor shape\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
178 pub fn ov_tensor_get_shape(tensor: *const ov_tensor_t, shape: *mut ov_shape_t) -> ov_status_e;
179}
180unsafe extern "C" {
181 #[doc = " @brief Get type for tensor.\n @ingroup ov_tensor_c_api\n @param type Tensor element type\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
182 pub fn ov_tensor_get_element_type(
183 tensor: *const ov_tensor_t,
184 type_: *mut ov_element_type_e,
185 ) -> ov_status_e;
186}
187unsafe extern "C" {
188 #[doc = " @brief Set string data for tensor\n @ingroup ov_tensor_c_api\n @param string_array Array of strings\n @param array_size Size of the array\n @param tensor A point to ov_tensor_t"]
189 pub fn ov_tensor_set_string_data(
190 tensor: *mut ov_tensor_t,
191 string_array: *mut *const ::std::os::raw::c_char,
192 array_size: usize,
193 ) -> ov_status_e;
194}
195unsafe extern "C" {
196 #[doc = " @brief the total number of elements (a product of all the dims or 1 for scalar).\n @ingroup ov_tensor_c_api\n @param elements_size number of elements\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
197 pub fn ov_tensor_get_size(tensor: *const ov_tensor_t, elements_size: *mut usize)
198 -> ov_status_e;
199}
200unsafe extern "C" {
201 #[doc = " @brief the size of the current Tensor in bytes.\n @ingroup ov_tensor_c_api\n @param byte_size the size of the current Tensor in bytes.\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
202 pub fn ov_tensor_get_byte_size(
203 tensor: *const ov_tensor_t,
204 byte_size: *mut usize,
205 ) -> ov_status_e;
206}
207unsafe extern "C" {
208 #[doc = " @brief Provides an access to the underlaying host memory.\n @ingroup ov_tensor_c_api\n @param data A point to host memory.\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
209 pub fn ov_tensor_data(
210 tensor: *const ov_tensor_t,
211 data: *mut *mut ::std::os::raw::c_void,
212 ) -> ov_status_e;
213}
214unsafe extern "C" {
215 #[doc = " @brief Free ov_tensor_t.\n @ingroup ov_tensor_c_api\n @param tensor A point to ov_tensor_t"]
216 pub fn ov_tensor_free(tensor: *mut ov_tensor_t);
217}
218unsafe extern "C" {
219 #[doc = " @brief Set an input/output tensor to infer on by the name of tensor.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param tensor_name Name of the input or output tensor.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
220 pub fn ov_infer_request_set_tensor(
221 infer_request: *mut ov_infer_request_t,
222 tensor_name: *const ::std::os::raw::c_char,
223 tensor: *const ov_tensor_t,
224 ) -> ov_status_e;
225}
226unsafe extern "C" {
227 #[doc = " @brief Set an input/output tensor to infer request for the port.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param port Port of the input or output tensor, which can be got by calling ov_model_t/ov_compiled_model_t interface.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
228 pub fn ov_infer_request_set_tensor_by_port(
229 infer_request: *mut ov_infer_request_t,
230 port: *const ov_output_port_t,
231 tensor: *const ov_tensor_t,
232 ) -> ov_status_e;
233}
234unsafe extern "C" {
235 #[doc = " @brief Set an input/output tensor to infer request for the port.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param port Const port of the input or output tensor, which can be got by call interface from\n ov_model_t/ov_compiled_model_t.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
236 pub fn ov_infer_request_set_tensor_by_const_port(
237 infer_request: *mut ov_infer_request_t,
238 port: *const ov_output_const_port_t,
239 tensor: *const ov_tensor_t,
240 ) -> ov_status_e;
241}
242unsafe extern "C" {
243 #[doc = " @brief Set an input tensor to infer on by the index of tensor.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param idx Index of the input port. If @p idx is greater than the number of model inputs, an error will return.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
244 pub fn ov_infer_request_set_input_tensor_by_index(
245 infer_request: *mut ov_infer_request_t,
246 idx: usize,
247 tensor: *const ov_tensor_t,
248 ) -> ov_status_e;
249}
250unsafe extern "C" {
251 #[doc = " @brief Set an input tensor for the model with single input to infer on.\n @note If model has several inputs, an error will return.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
252 pub fn ov_infer_request_set_input_tensor(
253 infer_request: *mut ov_infer_request_t,
254 tensor: *const ov_tensor_t,
255 ) -> ov_status_e;
256}
257unsafe extern "C" {
258 #[doc = " @brief Set an output tensor to infer by the index of output tensor.\n @note Index of the output preserved accross ov_model_t, ov_compiled_model_t.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param idx Index of the output tensor.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
259 pub fn ov_infer_request_set_output_tensor_by_index(
260 infer_request: *mut ov_infer_request_t,
261 idx: usize,
262 tensor: *const ov_tensor_t,
263 ) -> ov_status_e;
264}
265unsafe extern "C" {
266 #[doc = " @brief Set an output tensor to infer models with single output.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
267 pub fn ov_infer_request_set_output_tensor(
268 infer_request: *mut ov_infer_request_t,
269 tensor: *const ov_tensor_t,
270 ) -> ov_status_e;
271}
272unsafe extern "C" {
273 #[doc = " @brief Get an input/output tensor by the name of tensor.\n @note If model has several outputs, an error will return.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param tensor_name Name of the input or output tensor to get.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
274 pub fn ov_infer_request_get_tensor(
275 infer_request: *const ov_infer_request_t,
276 tensor_name: *const ::std::os::raw::c_char,
277 tensor: *mut *mut ov_tensor_t,
278 ) -> ov_status_e;
279}
280unsafe extern "C" {
281 #[doc = " @brief Get an input/output tensor by const port.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param port Port of the tensor to get. @p port is not found, an error will return.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
282 pub fn ov_infer_request_get_tensor_by_const_port(
283 infer_request: *const ov_infer_request_t,
284 port: *const ov_output_const_port_t,
285 tensor: *mut *mut ov_tensor_t,
286 ) -> ov_status_e;
287}
288unsafe extern "C" {
289 #[doc = " @brief Get an input/output tensor by port.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param port Port of the tensor to get. @p port is not found, an error will return.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
290 pub fn ov_infer_request_get_tensor_by_port(
291 infer_request: *const ov_infer_request_t,
292 port: *const ov_output_port_t,
293 tensor: *mut *mut ov_tensor_t,
294 ) -> ov_status_e;
295}
296unsafe extern "C" {
297 #[doc = " @brief Get an input tensor by the index of input tensor.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param idx Index of the tensor to get. @p idx. If the tensor with the specified @p idx is not found, an error will\n return.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
298 pub fn ov_infer_request_get_input_tensor_by_index(
299 infer_request: *const ov_infer_request_t,
300 idx: usize,
301 tensor: *mut *mut ov_tensor_t,
302 ) -> ov_status_e;
303}
304unsafe extern "C" {
305 #[doc = " @brief Get an input tensor from the model with only one input tensor.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
306 pub fn ov_infer_request_get_input_tensor(
307 infer_request: *const ov_infer_request_t,
308 tensor: *mut *mut ov_tensor_t,
309 ) -> ov_status_e;
310}
311unsafe extern "C" {
312 #[doc = " @brief Get an output tensor by the index of output tensor.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param idx Index of the tensor to get. @p idx. If the tensor with the specified @p idx is not found, an error will\n return.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
313 pub fn ov_infer_request_get_output_tensor_by_index(
314 infer_request: *const ov_infer_request_t,
315 idx: usize,
316 tensor: *mut *mut ov_tensor_t,
317 ) -> ov_status_e;
318}
319unsafe extern "C" {
320 #[doc = " @brief Get an output tensor from the model with only one output tensor.\n @note If model has several outputs, an error will return.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param tensor Reference to the tensor.\n @return Status code of the operation: OK(0) for success."]
321 pub fn ov_infer_request_get_output_tensor(
322 infer_request: *const ov_infer_request_t,
323 tensor: *mut *mut ov_tensor_t,
324 ) -> ov_status_e;
325}
326unsafe extern "C" {
327 #[doc = " @brief Infer specified input(s) in synchronous mode.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @return Status code of the operation: OK(0) for success."]
328 pub fn ov_infer_request_infer(infer_request: *mut ov_infer_request_t) -> ov_status_e;
329}
330unsafe extern "C" {
331 #[doc = " @brief Cancel inference request.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @return Status code of the operation: OK(0) for success."]
332 pub fn ov_infer_request_cancel(infer_request: *mut ov_infer_request_t) -> ov_status_e;
333}
334unsafe extern "C" {
335 #[doc = " @brief Start inference of specified input(s) in asynchronous mode.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @return Status code of the operation: OK(0) for success."]
336 pub fn ov_infer_request_start_async(infer_request: *mut ov_infer_request_t) -> ov_status_e;
337}
338unsafe extern "C" {
339 #[doc = " @brief Wait for the result to become available.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @return Status code of the operation: OK(0) for success."]
340 pub fn ov_infer_request_wait(infer_request: *mut ov_infer_request_t) -> ov_status_e;
341}
342unsafe extern "C" {
343 #[doc = " @brief Waits for the result to become available. Blocks until the specified timeout has elapsed or the result\n becomes available, whichever comes first.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param timeout Maximum duration, in milliseconds, to block for.\n @return Status code of the operation: OK(0) for success."]
344 pub fn ov_infer_request_wait_for(
345 infer_request: *mut ov_infer_request_t,
346 timeout: i64,
347 ) -> ov_status_e;
348}
349unsafe extern "C" {
350 #[doc = " @brief Set callback function, which will be called when inference is done.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param callback A function to be called.\n @return Status code of the operation: OK(0) for success."]
351 pub fn ov_infer_request_set_callback(
352 infer_request: *mut ov_infer_request_t,
353 callback: *const ov_callback_t,
354 ) -> ov_status_e;
355}
356unsafe extern "C" {
357 #[doc = " @brief Release the memory allocated by ov_infer_request_t.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t to free memory."]
358 pub fn ov_infer_request_free(infer_request: *mut ov_infer_request_t);
359}
360unsafe extern "C" {
361 #[doc = " @brief Query performance measures per layer to identify the most time consuming operation.\n @ingroup ov_infer_request_c_api\n @param infer_request A pointer to the ov_infer_request_t.\n @param profiling_infos Vector of profiling information for operations in a model.\n @return Status code of the operation: OK(0) for success."]
362 pub fn ov_infer_request_get_profiling_info(
363 infer_request: *const ov_infer_request_t,
364 profiling_infos: *mut ov_profiling_info_list_t,
365 ) -> ov_status_e;
366}
367unsafe extern "C" {
368 #[doc = " @brief Release the memory allocated by ov_profiling_info_list_t.\n @ingroup ov_infer_request_c_api\n @param profiling_infos A pointer to the ov_profiling_info_list_t to free memory."]
369 pub fn ov_profiling_info_list_free(profiling_infos: *mut ov_profiling_info_list_t);
370}
371unsafe extern "C" {
372 #[doc = " @brief Release the memory allocated by ov_model_t.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t to free memory."]
373 pub fn ov_model_free(model: *mut ov_model_t);
374}
375unsafe extern "C" {
376 #[doc = " @brief Get a const input port of ov_model_t,which only support single input model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param input_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
377 pub fn ov_model_const_input(
378 model: *const ov_model_t,
379 input_port: *mut *mut ov_output_const_port_t,
380 ) -> ov_status_e;
381}
382unsafe extern "C" {
383 #[doc = " @brief Get a const input port of ov_model_t by name.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param tensor_name The name of input tensor.\n @param input_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
384 pub fn ov_model_const_input_by_name(
385 model: *const ov_model_t,
386 tensor_name: *const ::std::os::raw::c_char,
387 input_port: *mut *mut ov_output_const_port_t,
388 ) -> ov_status_e;
389}
390unsafe extern "C" {
391 #[doc = " @brief Get a const input port of ov_model_t by port index.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param index input tensor index.\n @param input_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
392 pub fn ov_model_const_input_by_index(
393 model: *const ov_model_t,
394 index: usize,
395 input_port: *mut *mut ov_output_const_port_t,
396 ) -> ov_status_e;
397}
398unsafe extern "C" {
399 #[doc = " @brief Get single input port of ov_model_t, which only support single input model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param input_port A pointer to the ov_output_port_t.\n @return Status code of the operation: OK(0) for success."]
400 pub fn ov_model_input(
401 model: *const ov_model_t,
402 input_port: *mut *mut ov_output_port_t,
403 ) -> ov_status_e;
404}
405unsafe extern "C" {
406 #[doc = " @brief Get an input port of ov_model_t by name.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param tensor_name input tensor name (char *).\n @param input_port A pointer to the ov_output_port_t.\n @return Status code of the operation: OK(0) for success."]
407 pub fn ov_model_input_by_name(
408 model: *const ov_model_t,
409 tensor_name: *const ::std::os::raw::c_char,
410 input_port: *mut *mut ov_output_port_t,
411 ) -> ov_status_e;
412}
413unsafe extern "C" {
414 #[doc = " @brief Get an input port of ov_model_t by port index.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param index input tensor index.\n @param input_port A pointer to the ov_output_port_t.\n @return Status code of the operation: OK(0) for success."]
415 pub fn ov_model_input_by_index(
416 model: *const ov_model_t,
417 index: usize,
418 input_port: *mut *mut ov_output_port_t,
419 ) -> ov_status_e;
420}
421unsafe extern "C" {
422 #[doc = " @brief Get a single const output port of ov_model_t, which only support single output model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
423 pub fn ov_model_const_output(
424 model: *const ov_model_t,
425 output_port: *mut *mut ov_output_const_port_t,
426 ) -> ov_status_e;
427}
428unsafe extern "C" {
429 #[doc = " @brief Get a const output port of ov_model_t by port index.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param index input tensor index.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
430 pub fn ov_model_const_output_by_index(
431 model: *const ov_model_t,
432 index: usize,
433 output_port: *mut *mut ov_output_const_port_t,
434 ) -> ov_status_e;
435}
436unsafe extern "C" {
437 #[doc = " @brief Get a const output port of ov_model_t by name.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param tensor_name input tensor name (char *).\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
438 pub fn ov_model_const_output_by_name(
439 model: *const ov_model_t,
440 tensor_name: *const ::std::os::raw::c_char,
441 output_port: *mut *mut ov_output_const_port_t,
442 ) -> ov_status_e;
443}
444unsafe extern "C" {
445 #[doc = " @brief Get a single output port of ov_model_t, which only support single output model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
446 pub fn ov_model_output(
447 model: *const ov_model_t,
448 output_port: *mut *mut ov_output_port_t,
449 ) -> ov_status_e;
450}
451unsafe extern "C" {
452 #[doc = " @brief Get an output port of ov_model_t by port index.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param index input tensor index.\n @param output_port A pointer to the ov_output_port_t.\n @return Status code of the operation: OK(0) for success."]
453 pub fn ov_model_output_by_index(
454 model: *const ov_model_t,
455 index: usize,
456 output_port: *mut *mut ov_output_port_t,
457 ) -> ov_status_e;
458}
459unsafe extern "C" {
460 #[doc = " @brief Get an output port of ov_model_t by name.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param tensor_name output tensor name (char *).\n @param output_port A pointer to the ov_output_port_t.\n @return Status code of the operation: OK(0) for success."]
461 pub fn ov_model_output_by_name(
462 model: *const ov_model_t,
463 tensor_name: *const ::std::os::raw::c_char,
464 output_port: *mut *mut ov_output_port_t,
465 ) -> ov_status_e;
466}
467unsafe extern "C" {
468 #[doc = " @brief Get the input size of ov_model_t.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param input_size the model's input size.\n @return Status code of the operation: OK(0) for success."]
469 pub fn ov_model_inputs_size(model: *const ov_model_t, input_size: *mut usize) -> ov_status_e;
470}
471unsafe extern "C" {
472 #[doc = " @brief Get the output size of ov_model_t.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_size the model's output size.\n @return Status code of the operation: OK(0) for success."]
473 pub fn ov_model_outputs_size(model: *const ov_model_t, output_size: *mut usize) -> ov_status_e;
474}
475unsafe extern "C" {
476 #[doc = " @brief Returns true if any of the ops defined in the model is dynamic shape.\n @param model A pointer to the ov_model_t.\n @return true if model contains dynamic shapes"]
477 pub fn ov_model_is_dynamic(model: *const ov_model_t) -> bool;
478}
479unsafe extern "C" {
480 #[doc = " @brief Do reshape in model with a list of <name, partial shape>.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param tensor_names The list of input tensor names.\n @param partialShape A PartialShape list.\n @param size The item count in the list.\n @return Status code of the operation: OK(0) for success."]
481 pub fn ov_model_reshape(
482 model: *const ov_model_t,
483 tensor_names: *mut *const ::std::os::raw::c_char,
484 partial_shapes: *const ov_partial_shape_t,
485 size: usize,
486 ) -> ov_status_e;
487}
488unsafe extern "C" {
489 #[doc = " @brief Do reshape in model with partial shape for a specified name.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param tensor_name The tensor name of input tensor.\n @param partialShape A PartialShape.\n @return Status code of the operation: OK(0) for success."]
490 pub fn ov_model_reshape_input_by_name(
491 model: *const ov_model_t,
492 tensor_name: *const ::std::os::raw::c_char,
493 partial_shape: ov_partial_shape_t,
494 ) -> ov_status_e;
495}
496unsafe extern "C" {
497 #[doc = " @brief Do reshape in model for one node(port 0).\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param partialShape A PartialShape.\n @return Status code of the operation: OK(0) for success."]
498 pub fn ov_model_reshape_single_input(
499 model: *const ov_model_t,
500 partial_shape: ov_partial_shape_t,
501 ) -> ov_status_e;
502}
503unsafe extern "C" {
504 #[doc = " @brief Do reshape in model with a list of <port id, partial shape>.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param port_indexes The array of port indexes.\n @param partialShape A PartialShape list.\n @param size The item count in the list.\n @return Status code of the operation: OK(0) for success."]
505 pub fn ov_model_reshape_by_port_indexes(
506 model: *const ov_model_t,
507 port_indexes: *const usize,
508 partial_shape: *const ov_partial_shape_t,
509 size: usize,
510 ) -> ov_status_e;
511}
512unsafe extern "C" {
513 #[doc = " @brief Do reshape in model with a list of <ov_output_port_t, partial shape>.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param output_ports The ov_output_port_t list.\n @param partialShape A PartialShape list.\n @param size The item count in the list.\n @return Status code of the operation: OK(0) for success."]
514 pub fn ov_model_reshape_by_ports(
515 model: *const ov_model_t,
516 output_ports: *mut *const ov_output_port_t,
517 partial_shapes: *const ov_partial_shape_t,
518 size: usize,
519 ) -> ov_status_e;
520}
521unsafe extern "C" {
522 #[doc = " @brief Gets the friendly name for a model.\n @ingroup ov_model_c_api\n @param model A pointer to the ov_model_t.\n @param friendly_name the model's friendly name.\n @return Status code of the operation: OK(0) for success."]
523 pub fn ov_model_get_friendly_name(
524 model: *const ov_model_t,
525 friendly_name: *mut *mut ::std::os::raw::c_char,
526 ) -> ov_status_e;
527}
528unsafe extern "C" {
529 #[doc = " @brief Allocates memory tensor in device memory or wraps user-supplied memory handle\n using the specified tensor description and low-level device-specific parameters.\n Returns a pointer to the object that implements the RemoteTensor interface.\n @ingroup ov_remote_context_c_api\n @param context A pointer to the ov_remote_context_t instance.\n @param type Defines the element type of the tensor.\n @param shape Defines the shape of the tensor.\n @param object_args_size Size of the low-level tensor object parameters.\n @param remote_tensor Pointer to returned ov_tensor_t that contains remote tensor instance.\n @param ... variadic params Contains low-level tensor object parameters.\n @return Status code of the operation: OK(0) for success."]
530 pub fn ov_remote_context_create_tensor(
531 context: *const ov_remote_context_t,
532 type_: ov_element_type_e,
533 shape: ov_shape_t,
534 object_args_size: usize,
535 remote_tensor: *mut *mut ov_tensor_t,
536 ...
537 ) -> ov_status_e;
538}
539unsafe extern "C" {
540 #[doc = " @brief Returns name of a device on which underlying object is allocated.\n @ingroup ov_remote_context_c_api\n @param context A pointer to the ov_remote_context_t instance.\n @param device_name Device name will be returned.\n @return Status code of the operation: OK(0) for success."]
541 pub fn ov_remote_context_get_device_name(
542 context: *const ov_remote_context_t,
543 device_name: *mut *mut ::std::os::raw::c_char,
544 ) -> ov_status_e;
545}
546unsafe extern "C" {
547 #[doc = " @brief Returns a string contains device-specific parameters required for low-level\n operations with the underlying object.\n Parameters include device/context handles, access flags,\n etc. Content of the returned map depends on a remote execution context that is\n currently set on the device (working scenario).\n One actaul example: \"CONTEXT_TYPE OCL OCL_CONTEXT 0x5583b2ec7b40 OCL_QUEUE 0x5583b2e98ff0\"\n @ingroup ov_remote_context_c_api\n @param context A pointer to the ov_remote_context_t instance.\n @param size The size of param pairs.\n @param params Param name:value list.\n @return Status code of the operation: OK(0) for success."]
548 pub fn ov_remote_context_get_params(
549 context: *const ov_remote_context_t,
550 size: *mut usize,
551 params: *mut *mut ::std::os::raw::c_char,
552 ) -> ov_status_e;
553}
554unsafe extern "C" {
555 #[doc = " @brief This method is used to create a host tensor object friendly for the device in current context.\n For example, GPU context may allocate USM host memory (if corresponding extension is available),\n which could be more efficient than regular host memory.\n @ingroup ov_remote_context_c_api\n @param context A pointer to the ov_remote_context_t instance.\n @param type Defines the element type of the tensor.\n @param shape Defines the shape of the tensor.\n @param tensor Pointer to ov_tensor_t that contains host tensor.\n @return Status code of the operation: OK(0) for success."]
556 pub fn ov_remote_context_create_host_tensor(
557 context: *const ov_remote_context_t,
558 type_: ov_element_type_e,
559 shape: ov_shape_t,
560 tensor: *mut *mut ov_tensor_t,
561 ) -> ov_status_e;
562}
563unsafe extern "C" {
564 #[doc = " @brief Release the memory allocated by ov_remote_context_t.\n @ingroup ov_remote_context_c_api\n @param context A pointer to the ov_remote_context_t to free memory.\n @return Status code of the operation: OK(0) for success."]
565 pub fn ov_remote_context_free(context: *mut ov_remote_context_t);
566}
567unsafe extern "C" {
568 #[doc = " @brief Returns a string contains device-specific parameters required for low-level\n operations with underlying object.\n Parameters include device/context/surface/buffer handles, access flags,\n etc. Content of the returned map depends on remote execution context that is\n currently set on the device (working scenario).\n One example: \"MEM_HANDLE:0x559ff6904b00;OCL_CONTEXT:0x559ff71d62f0;SHARED_MEM_TYPE:OCL_BUFFER;\"\n @ingroup ov_remote_context_c_api\n @param tensor Pointer to ov_tensor_t that contains host tensor.\n @param size The size of param pairs.\n @param params Param name:value list.\n @return Status code of the operation: OK(0) for success."]
569 pub fn ov_remote_tensor_get_params(
570 tensor: *mut ov_tensor_t,
571 size: *mut usize,
572 params: *mut *mut ::std::os::raw::c_char,
573 ) -> ov_status_e;
574}
575unsafe extern "C" {
576 #[doc = " @brief Returns name of a device on which underlying object is allocated.\n @ingroup ov_remote_context_c_api\n @param remote_tensor A pointer to the remote tensor instance.\n @param device_name Device name will be return.\n @return Status code of the operation: OK(0) for success."]
577 pub fn ov_remote_tensor_get_device_name(
578 remote_tensor: *mut ov_tensor_t,
579 device_name: *mut *mut ::std::os::raw::c_char,
580 ) -> ov_status_e;
581}
582unsafe extern "C" {
583 #[doc = " @brief Get the input size of ov_compiled_model_t.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param input_size the compiled_model's input size.\n @return Status code of the operation: OK(0) for success."]
584 pub fn ov_compiled_model_inputs_size(
585 compiled_model: *const ov_compiled_model_t,
586 size: *mut usize,
587 ) -> ov_status_e;
588}
589unsafe extern "C" {
590 #[doc = " @brief Get the single const input port of ov_compiled_model_t, which only support single input model.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param input_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
591 pub fn ov_compiled_model_input(
592 compiled_model: *const ov_compiled_model_t,
593 input_port: *mut *mut ov_output_const_port_t,
594 ) -> ov_status_e;
595}
596unsafe extern "C" {
597 #[doc = " @brief Get a const input port of ov_compiled_model_t by port index.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param index input index.\n @param input_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
598 pub fn ov_compiled_model_input_by_index(
599 compiled_model: *const ov_compiled_model_t,
600 index: usize,
601 input_port: *mut *mut ov_output_const_port_t,
602 ) -> ov_status_e;
603}
604unsafe extern "C" {
605 #[doc = " @brief Get a const input port of ov_compiled_model_t by name.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param name input tensor name (char *).\n @param input_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
606 pub fn ov_compiled_model_input_by_name(
607 compiled_model: *const ov_compiled_model_t,
608 name: *const ::std::os::raw::c_char,
609 input_port: *mut *mut ov_output_const_port_t,
610 ) -> ov_status_e;
611}
612unsafe extern "C" {
613 #[doc = " @brief Get the output size of ov_compiled_model_t.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param size the compiled_model's output size.\n @return Status code of the operation: OK(0) for success."]
614 pub fn ov_compiled_model_outputs_size(
615 compiled_model: *const ov_compiled_model_t,
616 size: *mut usize,
617 ) -> ov_status_e;
618}
619unsafe extern "C" {
620 #[doc = " @brief Get the single const output port of ov_compiled_model_t, which only support single output model.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
621 pub fn ov_compiled_model_output(
622 compiled_model: *const ov_compiled_model_t,
623 output_port: *mut *mut ov_output_const_port_t,
624 ) -> ov_status_e;
625}
626unsafe extern "C" {
627 #[doc = " @brief Get a const output port of ov_compiled_model_t by port index.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param index input index.\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
628 pub fn ov_compiled_model_output_by_index(
629 compiled_model: *const ov_compiled_model_t,
630 index: usize,
631 output_port: *mut *mut ov_output_const_port_t,
632 ) -> ov_status_e;
633}
634unsafe extern "C" {
635 #[doc = " @brief Get a const output port of ov_compiled_model_t by name.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param name input tensor name (char *).\n @param output_port A pointer to the ov_output_const_port_t.\n @return Status code of the operation: OK(0) for success."]
636 pub fn ov_compiled_model_output_by_name(
637 compiled_model: *const ov_compiled_model_t,
638 name: *const ::std::os::raw::c_char,
639 output_port: *mut *mut ov_output_const_port_t,
640 ) -> ov_status_e;
641}
642unsafe extern "C" {
643 #[doc = " @brief Gets runtime model information from a device.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param model A pointer to the ov_model_t.\n @return Status code of the operation: OK(0) for success."]
644 pub fn ov_compiled_model_get_runtime_model(
645 compiled_model: *const ov_compiled_model_t,
646 model: *mut *mut ov_model_t,
647 ) -> ov_status_e;
648}
649unsafe extern "C" {
650 #[doc = " @brief Creates an inference request object used to infer the compiled model.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param infer_request A pointer to the ov_infer_request_t.\n @return Status code of the operation: OK(0) for success."]
651 pub fn ov_compiled_model_create_infer_request(
652 compiled_model: *const ov_compiled_model_t,
653 infer_request: *mut *mut ov_infer_request_t,
654 ) -> ov_status_e;
655}
656unsafe extern "C" {
657 #[doc = " @brief Sets properties for a device, acceptable keys can be found in ov_property_key_xxx.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param ... variadic paramaters The format is <char *property_key, char* property_value>.\n Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
658 pub fn ov_compiled_model_set_property(
659 compiled_model: *const ov_compiled_model_t,
660 property_key: *const ::std::os::raw::c_char,
661 property_value: *const ::std::os::raw::c_char
662 ) -> ov_status_e;
663}
664unsafe extern "C" {
665 #[doc = " @brief Gets properties for current compiled model.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param property_key Property key.\n @param property_value A pointer to property value.\n @return Status code of the operation: OK(0) for success."]
666 pub fn ov_compiled_model_get_property(
667 compiled_model: *const ov_compiled_model_t,
668 property_key: *const ::std::os::raw::c_char,
669 property_value: *mut *mut ::std::os::raw::c_char,
670 ) -> ov_status_e;
671}
672unsafe extern "C" {
673 #[doc = " @brief Exports the current compiled model to an output stream `std::ostream`.\n The exported model can also be imported via the ov::Core::import_model method.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param export_model_path Path to the file.\n @return Status code of the operation: OK(0) for success."]
674 pub fn ov_compiled_model_export_model(
675 compiled_model: *const ov_compiled_model_t,
676 export_model_path: *const ::std::os::raw::c_char,
677 ) -> ov_status_e;
678}
679unsafe extern "C" {
680 #[doc = " @brief Release the memory allocated by ov_compiled_model_t.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t to free memory."]
681 pub fn ov_compiled_model_free(compiled_model: *mut ov_compiled_model_t);
682}
683unsafe extern "C" {
684 #[doc = " @brief Returns pointer to device-specific shared context\n on a remote accelerator device that was used to create this CompiledModel.\n @ingroup ov_compiled_model_c_api\n @param compiled_model A pointer to the ov_compiled_model_t.\n @param context Return context.\n @return Status code of the operation: OK(0) for success.\n"]
685 pub fn ov_compiled_model_get_context(
686 compiled_model: *const ov_compiled_model_t,
687 context: *mut *mut ov_remote_context_t,
688 ) -> ov_status_e;
689}
690unsafe extern "C" {
691 #[doc = " @brief Get version of OpenVINO.\n @ingroup ov_core_c_api\n @param ov_version_t a pointer to the version\n @return Status code of the operation: OK(0) for success."]
692 pub fn ov_get_openvino_version(version: *mut ov_version_t) -> ov_status_e;
693}
694unsafe extern "C" {
695 #[doc = " @brief Release the memory allocated by ov_version_t.\n @ingroup ov_core_c_api\n @param version A pointer to the ov_version_t to free memory."]
696 pub fn ov_version_free(version: *mut ov_version_t);
697}
698unsafe extern "C" {
699 #[doc = " @brief Constructs OpenVINO Core instance by default.\n See RegisterPlugins for more details.\n @ingroup ov_core_c_api\n @param core A pointer to the newly created ov_core_t.\n @return Status code of the operation: OK(0) for success."]
700 pub fn ov_core_create(core: *mut *mut ov_core_t) -> ov_status_e;
701}
702unsafe extern "C" {
703 #[doc = " @brief Constructs OpenVINO Core instance using XML configuration file with devices description.\n See RegisterPlugins for more details.\n @ingroup ov_core_c_api\n @param xml_config_file A path to .xml file with devices to load from. If XML configuration file is not specified,\n then default plugin.xml file will be used.\n @param core A pointer to the newly created ov_core_t.\n @return Status code of the operation: OK(0) for success."]
704 pub fn ov_core_create_with_config(
705 xml_config_file: *const ::std::os::raw::c_char,
706 core: *mut *mut ov_core_t,
707 ) -> ov_status_e;
708}
709unsafe extern "C" {
710 #[doc = " @brief Constructs OpenVINO Core instance.\n See RegisterPlugins for more details.\n @ingroup ov_core_c_api\n @param xml_config_file_ws A path to model file with unicode.\n @param core A pointer to the newly created ov_core_t.\n @return Status code of the operation: OK(0) for success."]
711 pub fn ov_core_create_with_config_unicode(
712 xml_config_file_ws: *const wchar_t,
713 core: *mut *mut ov_core_t,
714 ) -> ov_status_e;
715}
716unsafe extern "C" {
717 #[doc = " @brief Release the memory allocated by ov_core_t.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t to free memory."]
718 pub fn ov_core_free(core: *mut ov_core_t);
719}
720unsafe extern "C" {
721 #[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param bin_path Path to a data file.\n For IR format (*.bin):\n * if `bin_path` is empty, will try to read a bin file with the same name as xml and\n * if the bin file with the same name is not found, will load IR without weights.\n For the following file formats the `bin_path` parameter is not used:\n * ONNX format (*.onnx)\n * PDPD (*.pdmodel)\n * TF (*.pb)\n * TFLite (*.tflite)\n @param model A pointer to the newly created model.\n @return Status code of the operation: OK(0) for success."]
722 pub fn ov_core_read_model(
723 core: *const ov_core_t,
724 model_path: *const ::std::os::raw::c_char,
725 bin_path: *const ::std::os::raw::c_char,
726 model: *mut *mut ov_model_t,
727 ) -> ov_status_e;
728}
729unsafe extern "C" {
730 #[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats, path is unicode.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param bin_path Path to a data file.\n For IR format (*.bin):\n * if `bin_path` is empty, will try to read a bin file with the same name as xml and\n * if the bin file with the same name is not found, will load IR without weights.\n For the following file formats the `bin_path` parameter is not used:\n * ONNX format (*.onnx)\n * PDPD (*.pdmodel)\n * TF (*.pb)\n * TFLite (*.tflite)\n @param model A pointer to the newly created model.\n @return Status code of the operation: OK(0) for success."]
731 pub fn ov_core_read_model_unicode(
732 core: *const ov_core_t,
733 model_path: *const wchar_t,
734 bin_path: *const wchar_t,
735 model: *mut *mut ov_model_t,
736 ) -> ov_status_e;
737}
738unsafe extern "C" {
739 #[doc = " @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats with models string size.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_str String with a model in IR / ONNX / PDPD / TF / TFLite format, support model string containing\n several null chars.\n @param str_len The length of model string.\n @param weights Shared pointer to a constant tensor with weights.\n @param model A pointer to the newly created model.\n Reading ONNX / PDPD / TF / TFLite models does not support loading weights from the @p weights tensors.\n @note Created model object shares the weights with the @p weights object.\n Thus, do not create @p weights on temporary data that can be freed later, since the model\n constant data will point to an invalid memory.\n @return Status code of the operation: OK(0) for success."]
740 pub fn ov_core_read_model_from_memory_buffer(
741 core: *const ov_core_t,
742 model_str: *const ::std::os::raw::c_char,
743 str_len: usize,
744 weights: *const ov_tensor_t,
745 model: *mut *mut ov_model_t,
746 ) -> ov_status_e;
747}
748unsafe extern "C" {
749 #[doc = " @brief Creates a compiled model from a source model object.\n Users can create as many compiled models as they need and use\n them simultaneously (up to the limitation of the hardware resources).\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model Model object acquired from Core::read_model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... property paramater: Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
750 pub fn ov_core_compile_model(
751 core: *const ov_core_t,
752 model: *const ov_model_t,
753 device_name: *const ::std::os::raw::c_char,
754 property_args_size: usize,
755 compiled_model: *mut *mut ov_compiled_model_t,
756 ...
757 ) -> ov_status_e;
758}
759unsafe extern "C" {
760 #[doc = " @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file.\n This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,\n especially for cases when caching is enabled and a cached model is available.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
761 pub fn ov_core_compile_model_from_file(
762 core: *const ov_core_t,
763 model_path: *const ::std::os::raw::c_char,
764 device_name: *const ::std::os::raw::c_char,
765 property_args_size: usize,
766 compiled_model: *mut *mut ov_compiled_model_t,
767 ...
768 ) -> ov_status_e;
769}
770unsafe extern "C" {
771 #[doc = " @brief Adds an extension to the core.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param path Path to the extension.\n @return Status code of the operation: OK(0) for success."]
772 pub fn ov_core_add_extension(
773 core: *const ov_core_t,
774 path: *const ::std::os::raw::c_char,
775 ) -> ov_status_e;
776}
777unsafe extern "C" {
778 #[doc = " @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file.\n This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow,\n especially for cases when caching is enabled and a cached model is available.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model_path Path to a model.\n @param device_name Name of a device to load a model to.\n @param property_args_size How many properties args will be passed, each property contains 2 args: key and value.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... Optional pack of pairs: <char* property_key, char* property_value> relevant only\n for this load operation operation. Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
779 pub fn ov_core_compile_model_from_file_unicode(
780 core: *const ov_core_t,
781 model_path: *const wchar_t,
782 device_name: *const ::std::os::raw::c_char,
783 property_args_size: usize,
784 compiled_model: *mut *mut ov_compiled_model_t,
785 ...
786 ) -> ov_status_e;
787}
788unsafe extern "C" {
789 #[doc = " @brief Sets properties for a device, acceptable keys can be found in ov_property_key_xxx.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Name of a device.\n @param ... variadic paramaters The format is <char* property_key, char* property_value>.\n Supported property key please see ov_property.h.\n @return Status code of the operation: OK(0) for success."]
790 pub fn ov_core_set_property(
791 core: *const ov_core_t,
792 device_name: *const ::std::os::raw::c_char,
793 property_key: *const ::std::os::raw::c_char,
794 property_value: *const ::std::os::raw::c_char
795 ) -> ov_status_e;
796}
797unsafe extern "C" {
798 #[doc = " @brief Gets properties related to device behaviour.\n The method extracts information that can be set via the set_property method.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Name of a device to get a property value.\n @param property_key Property key.\n @param property_value A pointer to property value with string format.\n @return Status code of the operation: OK(0) for success."]
799 pub fn ov_core_get_property(
800 core: *const ov_core_t,
801 device_name: *const ::std::os::raw::c_char,
802 property_key: *const ::std::os::raw::c_char,
803 property_value: *mut *mut ::std::os::raw::c_char,
804 ) -> ov_status_e;
805}
806unsafe extern "C" {
807 #[doc = " @brief Returns devices available for inference.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param devices A pointer to the ov_available_devices_t instance.\n Core objects go over all registered plugins and ask about available devices.\n @return Status code of the operation: OK(0) for success."]
808 pub fn ov_core_get_available_devices(
809 core: *const ov_core_t,
810 devices: *mut ov_available_devices_t,
811 ) -> ov_status_e;
812}
813unsafe extern "C" {
814 #[doc = " @brief Releases memory occpuied by ov_available_devices_t\n @ingroup ov_core_c_api\n @param devices A pointer to the ov_available_devices_t instance.\n @return Status code of the operation: OK(0) for success."]
815 pub fn ov_available_devices_free(devices: *mut ov_available_devices_t);
816}
817unsafe extern "C" {
818 #[doc = " @brief Imports a compiled model from the previously exported one.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param content A pointer to content of the exported model.\n @param content_size Number of bytes in the exported network.\n @param device_name Name of a device to import a compiled model for.\n @param compiled_model A pointer to the newly created compiled_model.\n @return Status code of the operation: OK(0) for success."]
819 pub fn ov_core_import_model(
820 core: *const ov_core_t,
821 content: *const ::std::os::raw::c_char,
822 content_size: usize,
823 device_name: *const ::std::os::raw::c_char,
824 compiled_model: *mut *mut ov_compiled_model_t,
825 ) -> ov_status_e;
826}
827unsafe extern "C" {
828 #[doc = " @brief Returns device plugins version information.\n Device name can be complex and identify multiple devices at once like `HETERO:CPU,GPU`;\n in this case, std::map contains multiple entries, each per device.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Device name to identify a plugin.\n @param versions A pointer to versions corresponding to device_name.\n @return Status code of the operation: OK(0) for success."]
829 pub fn ov_core_get_versions_by_device_name(
830 core: *const ov_core_t,
831 device_name: *const ::std::os::raw::c_char,
832 versions: *mut ov_core_version_list_t,
833 ) -> ov_status_e;
834}
835unsafe extern "C" {
836 #[doc = " @brief Releases memory occupied by ov_core_version_list_t.\n @ingroup ov_core_c_api\n @param versions A pointer to the ov_core_version_list_t to free memory."]
837 pub fn ov_core_versions_free(versions: *mut ov_core_version_list_t);
838}
839unsafe extern "C" {
840 #[doc = " @brief Creates a new remote shared context object on the specified accelerator device\n using specified plugin-specific low-level device API parameters (device handle, pointer, context, etc.).\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Device name to identify a plugin.\n @param context_args_size How many property args will be for this remote context creation.\n @param context A pointer to the newly created remote context.\n @param ... variadic parmameters Actual context property parameter for remote context\n @return Status code of the operation: OK(0) for success."]
841 pub fn ov_core_create_context(
842 core: *const ov_core_t,
843 device_name: *const ::std::os::raw::c_char,
844 context_args_size: usize,
845 context: *mut *mut ov_remote_context_t,
846 ...
847 ) -> ov_status_e;
848}
849unsafe extern "C" {
850 #[doc = " @brief Creates a compiled model from a source model within a specified remote context.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param model Model object acquired from ov_core_read_model.\n @param context A pointer to the newly created remote context.\n @param property_args_size How many args will be for this compiled model.\n @param compiled_model A pointer to the newly created compiled_model.\n @param ... variadic parmameters Actual property parameter for remote context\n @return Status code of the operation: OK(0) for success."]
851 pub fn ov_core_compile_model_with_context(
852 core: *const ov_core_t,
853 model: *const ov_model_t,
854 context: *const ov_remote_context_t,
855 property_args_size: usize,
856 compiled_model: *mut *mut ov_compiled_model_t,
857 ...
858 ) -> ov_status_e;
859}
860unsafe extern "C" {
861 #[doc = " @brief Gets a pointer to default (plugin-supplied) shared context object for the specified accelerator device.\n @ingroup ov_core_c_api\n @param core A pointer to the ov_core_t instance.\n @param device_name Name of a device to get a default shared context from.\n @param context A pointer to the referenced remote context.\n @return Status code of the operation: OK(0) for success."]
862 pub fn ov_core_get_default_context(
863 core: *const ov_core_t,
864 device_name: *const ::std::os::raw::c_char,
865 context: *mut *mut ov_remote_context_t,
866 ) -> ov_status_e;
867}
868unsafe extern "C" {
869 #[doc = " @brief Shut down the OpenVINO by deleting all static-duration objects allocated by the library and releasing\n dependent resources\n @ingroup ov_c_api\n @note This function should be used by advanced user to control unload the resources.\n\n You might want to use this function if you are developing a dynamically-loaded library which should clean up all\n resources after itself when the library is unloaded."]
870 pub fn ov_shutdown();
871}
872unsafe extern "C" {
873 #[doc = " @brief Create a ov_preprocess_prepostprocessor_t instance.\n @ingroup ov_prepostprocess_c_api\n @param model A pointer to the ov_model_t.\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @return Status code of the operation: OK(0) for success."]
874 pub fn ov_preprocess_prepostprocessor_create(
875 model: *const ov_model_t,
876 preprocess: *mut *mut ov_preprocess_prepostprocessor_t,
877 ) -> ov_status_e;
878}
879unsafe extern "C" {
880 #[doc = " @brief Release the memory allocated by ov_preprocess_prepostprocessor_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t to free memory."]
881 pub fn ov_preprocess_prepostprocessor_free(preprocess: *mut ov_preprocess_prepostprocessor_t);
882}
883unsafe extern "C" {
884 #[doc = " @brief Get the input info of ov_preprocess_prepostprocessor_t instance.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param preprocess_input_info A pointer to the ov_preprocess_input_info_t.\n @return Status code of the operation: OK(0) for success."]
885 pub fn ov_preprocess_prepostprocessor_get_input_info(
886 preprocess: *const ov_preprocess_prepostprocessor_t,
887 preprocess_input_info: *mut *mut ov_preprocess_input_info_t,
888 ) -> ov_status_e;
889}
890unsafe extern "C" {
891 #[doc = " @brief Get the input info of ov_preprocess_prepostprocessor_t instance by tensor name.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param tensor_name The name of input.\n @param preprocess_input_info A pointer to the ov_preprocess_input_info_t.\n @return Status code of the operation: OK(0) for success."]
892 pub fn ov_preprocess_prepostprocessor_get_input_info_by_name(
893 preprocess: *const ov_preprocess_prepostprocessor_t,
894 tensor_name: *const ::std::os::raw::c_char,
895 preprocess_input_info: *mut *mut ov_preprocess_input_info_t,
896 ) -> ov_status_e;
897}
898unsafe extern "C" {
899 #[doc = " @brief Get the input info of ov_preprocess_prepostprocessor_t instance by tensor order.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param tensor_index The order of input.\n @param preprocess_input_info A pointer to the ov_preprocess_input_info_t.\n @return Status code of the operation: OK(0) for success."]
900 pub fn ov_preprocess_prepostprocessor_get_input_info_by_index(
901 preprocess: *const ov_preprocess_prepostprocessor_t,
902 tensor_index: usize,
903 preprocess_input_info: *mut *mut ov_preprocess_input_info_t,
904 ) -> ov_status_e;
905}
906unsafe extern "C" {
907 #[doc = " @brief Release the memory allocated by ov_preprocess_input_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_info A pointer to the ov_preprocess_input_info_t to free memory."]
908 pub fn ov_preprocess_input_info_free(preprocess_input_info: *mut ov_preprocess_input_info_t);
909}
910unsafe extern "C" {
911 #[doc = " @brief Get a ov_preprocess_input_tensor_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_info A pointer to the ov_preprocess_input_info_t.\n @param preprocess_input_tensor_info A pointer to ov_preprocess_input_tensor_info_t.\n @return Status code of the operation: OK(0) for success."]
912 pub fn ov_preprocess_input_info_get_tensor_info(
913 preprocess_input_info: *const ov_preprocess_input_info_t,
914 preprocess_input_tensor_info: *mut *mut ov_preprocess_input_tensor_info_t,
915 ) -> ov_status_e;
916}
917unsafe extern "C" {
918 #[doc = " @brief Release the memory allocated by ov_preprocess_input_tensor_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t to free memory."]
919 pub fn ov_preprocess_input_tensor_info_free(
920 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
921 );
922}
923unsafe extern "C" {
924 #[doc = " @brief Get a ov_preprocess_preprocess_steps_t.\n @ingroup ov_prepostprocess_c_api\n @param ov_preprocess_input_info_t A pointer to the ov_preprocess_input_info_t.\n @param preprocess_input_steps A pointer to ov_preprocess_preprocess_steps_t.\n @return Status code of the operation: OK(0) for success."]
925 pub fn ov_preprocess_input_info_get_preprocess_steps(
926 preprocess_input_info: *const ov_preprocess_input_info_t,
927 preprocess_input_steps: *mut *mut ov_preprocess_preprocess_steps_t,
928 ) -> ov_status_e;
929}
930unsafe extern "C" {
931 #[doc = " @brief Release the memory allocated by ov_preprocess_preprocess_steps_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_steps A pointer to the ov_preprocess_preprocess_steps_t to free memory."]
932 pub fn ov_preprocess_preprocess_steps_free(
933 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
934 );
935}
936unsafe extern "C" {
937 #[doc = " @brief Add resize operation to model's dimensions.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param resize_algorithm A ov_preprocess_resizeAlgorithm instance\n @return Status code of the operation: OK(0) for success."]
938 pub fn ov_preprocess_preprocess_steps_resize(
939 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
940 resize_algorithm: ov_preprocess_resize_algorithm_e,
941 ) -> ov_status_e;
942}
943unsafe extern "C" {
944 #[doc = " @brief Add scale preprocess operation. Divide each element of input by specified value.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param value Scaling value\n @return Status code of the operation: OK(0) for success."]
945 pub fn ov_preprocess_preprocess_steps_scale(
946 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
947 value: f32,
948 ) -> ov_status_e;
949}
950unsafe extern "C" {
951 #[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."]
952 pub fn ov_preprocess_preprocess_steps_scale_multi_channels(
953 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
954 values: *const f32,
955 value_size: i32,
956 ) -> ov_status_e;
957}
958unsafe extern "C" {
959 #[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."]
960 pub fn ov_preprocess_preprocess_steps_mean(
961 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
962 value: f32,
963 ) -> ov_status_e;
964}
965unsafe extern "C" {
966 #[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."]
967 pub fn ov_preprocess_preprocess_steps_mean_multi_channels(
968 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
969 values: *const f32,
970 value_size: i32,
971 ) -> ov_status_e;
972}
973unsafe extern "C" {
974 #[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."]
975 pub fn ov_preprocess_preprocess_steps_crop(
976 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
977 begin: *mut i32,
978 begin_size: i32,
979 end: *mut i32,
980 end_size: i32,
981 ) -> ov_status_e;
982}
983unsafe extern "C" {
984 #[doc = " @brief Add 'convert layout' operation to specified layout.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @param layout A point to ov_layout_t\n @return Status code of the operation: OK(0) for success."]
985 pub fn ov_preprocess_preprocess_steps_convert_layout(
986 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
987 layout: *mut ov_layout_t,
988 ) -> ov_status_e;
989}
990unsafe extern "C" {
991 #[doc = " @brief Reverse channels operation.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t.\n @return Status code of the operation: OK(0) for success."]
992 pub fn ov_preprocess_preprocess_steps_reverse_channels(
993 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
994 ) -> ov_status_e;
995}
996unsafe extern "C" {
997 #[doc = " @brief Set ov_preprocess_input_tensor_info_t precesion.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param element_type A point to element_type\n @return Status code of the operation: OK(0) for success."]
998 pub fn ov_preprocess_input_tensor_info_set_element_type(
999 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1000 element_type: ov_element_type_e,
1001 ) -> ov_status_e;
1002}
1003unsafe extern "C" {
1004 #[doc = " @brief Set ov_preprocess_input_tensor_info_t color format.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param colorFormat The enumerate of colorFormat\n @return Status code of the operation: OK(0) for success."]
1005 pub fn ov_preprocess_input_tensor_info_set_color_format(
1006 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1007 colorFormat: ov_color_format_e,
1008 ) -> ov_status_e;
1009}
1010unsafe extern "C" {
1011 #[doc = " @brief Set ov_preprocess_input_tensor_info_t color format with subname.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param colorFormat The enumerate of colorFormat\n @param sub_names_size The size of sub_names\n @param ... variadic params sub_names Optional list of sub-names assigned for each plane (e.g. \"Y\", \"UV\").\n @return Status code of the operation: OK(0) for success."]
1012 pub fn ov_preprocess_input_tensor_info_set_color_format_with_subname(
1013 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1014 colorFormat: ov_color_format_e,
1015 sub_names_size: usize,
1016 ...
1017 ) -> ov_status_e;
1018}
1019unsafe extern "C" {
1020 #[doc = " @brief Set ov_preprocess_input_tensor_info_t spatial_static_shape.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param input_height The height of input\n @param input_width The width of input\n @return Status code of the operation: OK(0) for success."]
1021 pub fn ov_preprocess_input_tensor_info_set_spatial_static_shape(
1022 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1023 input_height: usize,
1024 input_width: usize,
1025 ) -> ov_status_e;
1026}
1027unsafe extern "C" {
1028 #[doc = " @brief Set ov_preprocess_input_tensor_info_t memory type.\n @ingroup prepostprocess\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param mem_type Memory type. Refer to ov_remote_context.h to get memory type string info.\n @return Status code of the operation: OK(0) for success."]
1029 pub fn ov_preprocess_input_tensor_info_set_memory_type(
1030 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1031 mem_type: *const ::std::os::raw::c_char,
1032 ) -> ov_status_e;
1033}
1034unsafe extern "C" {
1035 #[doc = " @brief Convert ov_preprocess_preprocess_steps_t element type.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_steps A pointer to the ov_preprocess_preprocess_steps_t.\n @param element_type preprocess input element type.\n @return Status code of the operation: OK(0) for success."]
1036 pub fn ov_preprocess_preprocess_steps_convert_element_type(
1037 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
1038 element_type: ov_element_type_e,
1039 ) -> ov_status_e;
1040}
1041unsafe extern "C" {
1042 #[doc = " @brief Convert ov_preprocess_preprocess_steps_t color.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_steps A pointer to the ov_preprocess_preprocess_steps_t.\n @param colorFormat The enumerate of colorFormat.\n @return Status code of the operation: OK(0) for success."]
1043 pub fn ov_preprocess_preprocess_steps_convert_color(
1044 preprocess_input_process_steps: *mut ov_preprocess_preprocess_steps_t,
1045 colorFormat: ov_color_format_e,
1046 ) -> ov_status_e;
1047}
1048unsafe extern "C" {
1049 #[doc = " @brief Helper function to reuse element type and shape from user's created tensor.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param tensor A point to ov_tensor_t\n @return Status code of the operation: OK(0) for success."]
1050 pub fn ov_preprocess_input_tensor_info_set_from(
1051 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1052 tensor: *const ov_tensor_t,
1053 ) -> ov_status_e;
1054}
1055unsafe extern "C" {
1056 #[doc = " @brief Set ov_preprocess_input_tensor_info_t layout.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t.\n @param layout A point to ov_layout_t\n @return Status code of the operation: OK(0) for success."]
1057 pub fn ov_preprocess_input_tensor_info_set_layout(
1058 preprocess_input_tensor_info: *mut ov_preprocess_input_tensor_info_t,
1059 layout: *mut ov_layout_t,
1060 ) -> ov_status_e;
1061}
1062unsafe extern "C" {
1063 #[doc = " @brief Get the output info of ov_preprocess_output_info_t instance.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param preprocess_output_info A pointer to the ov_preprocess_output_info_t.\n @return Status code of the operation: OK(0) for success."]
1064 pub fn ov_preprocess_prepostprocessor_get_output_info(
1065 preprocess: *const ov_preprocess_prepostprocessor_t,
1066 preprocess_output_info: *mut *mut ov_preprocess_output_info_t,
1067 ) -> ov_status_e;
1068}
1069unsafe extern "C" {
1070 #[doc = " @brief Get the output info of ov_preprocess_output_info_t instance.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param tensor_index The tensor index\n @param preprocess_output_info A pointer to the ov_preprocess_output_info_t.\n @return Status code of the operation: OK(0) for success."]
1071 pub fn ov_preprocess_prepostprocessor_get_output_info_by_index(
1072 preprocess: *const ov_preprocess_prepostprocessor_t,
1073 tensor_index: usize,
1074 preprocess_output_info: *mut *mut ov_preprocess_output_info_t,
1075 ) -> ov_status_e;
1076}
1077unsafe extern "C" {
1078 #[doc = " @brief Get the output info of ov_preprocess_output_info_t instance.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param tensor_name The name of input.\n @param preprocess_output_info A pointer to the ov_preprocess_output_info_t.\n @return Status code of the operation: OK(0) for success."]
1079 pub fn ov_preprocess_prepostprocessor_get_output_info_by_name(
1080 preprocess: *const ov_preprocess_prepostprocessor_t,
1081 tensor_name: *const ::std::os::raw::c_char,
1082 preprocess_output_info: *mut *mut ov_preprocess_output_info_t,
1083 ) -> ov_status_e;
1084}
1085unsafe extern "C" {
1086 #[doc = " @brief Release the memory allocated by ov_preprocess_output_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_output_info A pointer to the ov_preprocess_output_info_t to free memory."]
1087 pub fn ov_preprocess_output_info_free(preprocess_output_info: *mut ov_preprocess_output_info_t);
1088}
1089unsafe extern "C" {
1090 #[doc = " @brief Get a ov_preprocess_input_tensor_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_output_info A pointer to the ov_preprocess_output_info_t.\n @param preprocess_output_tensor_info A pointer to the ov_preprocess_output_tensor_info_t.\n @return Status code of the operation: OK(0) for success."]
1091 pub fn ov_preprocess_output_info_get_tensor_info(
1092 preprocess_output_info: *const ov_preprocess_output_info_t,
1093 preprocess_output_tensor_info: *mut *mut ov_preprocess_output_tensor_info_t,
1094 ) -> ov_status_e;
1095}
1096unsafe extern "C" {
1097 #[doc = " @brief Release the memory allocated by ov_preprocess_output_tensor_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_output_tensor_info A pointer to the ov_preprocess_output_tensor_info_t to free memory."]
1098 pub fn ov_preprocess_output_tensor_info_free(
1099 preprocess_output_tensor_info: *mut ov_preprocess_output_tensor_info_t,
1100 );
1101}
1102unsafe extern "C" {
1103 #[doc = " @brief Set ov_preprocess_input_tensor_info_t precesion.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_output_tensor_info A pointer to the ov_preprocess_output_tensor_info_t.\n @param element_type A point to element_type\n @return Status code of the operation: OK(0) for success."]
1104 pub fn ov_preprocess_output_set_element_type(
1105 preprocess_output_tensor_info: *mut ov_preprocess_output_tensor_info_t,
1106 element_type: ov_element_type_e,
1107 ) -> ov_status_e;
1108}
1109unsafe extern "C" {
1110 #[doc = " @brief Get current input model information.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_info A pointer to the ov_preprocess_input_info_t.\n @param preprocess_input_model_info A pointer to the ov_preprocess_input_model_info_t\n @return Status code of the operation: OK(0) for success."]
1111 pub fn ov_preprocess_input_info_get_model_info(
1112 preprocess_input_info: *const ov_preprocess_input_info_t,
1113 preprocess_input_model_info: *mut *mut ov_preprocess_input_model_info_t,
1114 ) -> ov_status_e;
1115}
1116unsafe extern "C" {
1117 #[doc = " @brief Release the memory allocated by ov_preprocess_input_model_info_t.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_model_info A pointer to the ov_preprocess_input_model_info_t to free memory."]
1118 pub fn ov_preprocess_input_model_info_free(
1119 preprocess_input_model_info: *mut ov_preprocess_input_model_info_t,
1120 );
1121}
1122unsafe extern "C" {
1123 #[doc = " @brief Set layout for model's input tensor.\n @ingroup ov_prepostprocess_c_api\n @param preprocess_input_model_info A pointer to the ov_preprocess_input_model_info_t\n @param layout A point to ov_layout_t\n @return Status code of the operation: OK(0) for success."]
1124 pub fn ov_preprocess_input_model_info_set_layout(
1125 preprocess_input_model_info: *mut ov_preprocess_input_model_info_t,
1126 layout: *mut ov_layout_t,
1127 ) -> ov_status_e;
1128}
1129unsafe extern "C" {
1130 #[doc = " @brief Adds pre/post-processing operations to function passed in constructor.\n @ingroup ov_prepostprocess_c_api\n @param preprocess A pointer to the ov_preprocess_prepostprocessor_t.\n @param model A pointer to the ov_model_t.\n @return Status code of the operation: OK(0) for success."]
1131 pub fn ov_preprocess_prepostprocessor_build(
1132 preprocess: *const ov_preprocess_prepostprocessor_t,
1133 model: *mut *mut ov_model_t,
1134 ) -> ov_status_e;
1135}
1136unsafe extern "C" {
1137 #[doc = " @brief Add pad preprocess operation. Extends an input tensor on edges with constants.\n\n @param preprocess_input_process_steps A pointer to the ov_preprocess_preprocess_steps_t.\n @param pads_begin Number of padding elements to add at the beginning of each axis.\n @param pads_begin_size Pads begin size (number of axes).\n @param pads_end Number of padding elements to add at the end of each axis.\n @param pads_end_size Pads end size (number of axes).\n @param value Value to be populated in the padded area (mode=CONSTANT)\n @param mode Padding mode."]
1138 pub fn ov_preprocess_preprocess_steps_pad(
1139 preprocess_input_process_steps: *const ov_preprocess_preprocess_steps_t,
1140 pads_begin: *const ::std::os::raw::c_int,
1141 pads_begin_size: usize,
1142 pads_end: *const ::std::os::raw::c_int,
1143 pads_end_size: usize,
1144 value: f32,
1145 mode: ov_padding_mode_e,
1146 ) -> ov_status_e;
1147}
1148
1149}