Expand description
This crate provides low-level, unsafe, Rust bindings to OpenVINO™ using its C API. If you are looking to use OpenVINO™ from Rust, you likely should look at the ergonomic, safe bindings in openvino, which depends on this crate. See the repository README for more information, including build instructions.
An example interaction with raw openvino-sys:
openvino_sys::library::load().expect("to have an OpenVINO library available");
let mut ov_version = openvino_sys::ov_version_t {
// Initialize the fields to default values
description: std::ptr::null(),
buildNumber: std::ptr::null(),
};
let code = unsafe { openvino_sys::ov_get_openvino_version(&mut ov_version) };
assert_eq!(code, openvino_sys::ov_status_e::OK);
let version_ptr = { ov_version }.buildNumber;
let string_version = unsafe { CStr::from_ptr(version_ptr) }.to_string_lossy().into_owned();
unsafe { openvino_sys::ov_version_free(std::ptr::addr_of_mut!(ov_version)) };
assert!(string_version.starts_with("2"));Modules§
- library
- Contains extra utilities for finding and loading the OpenVINO shared libraries.
Structs§
- ov_
available_ devices_ t - @struct ov_available_devices_t @ingroup ov_core_c_api @brief Represent all available devices.
- ov_
callback_ t - @struct ov_callback_t @ingroup ov_infer_request_c_api @brief Completion callback definition about the function and args
- ov_
compiled_ model - ov_core
- ov_
core_ version_ list_ t - @struct ov_core_version_list @ingroup ov_core_c_api @brief Represents version information that describes all devices and ov runtime library
- ov_
core_ version_ t - @struct ov_core_version @ingroup ov_core_c_api @brief Represents version information that describes device and ov runtime library
- ov_
dimension - @struct ov_dimension @ingroup ov_dimension_c_api @brief This is a structure interface equal to ov::Dimension
- ov_
encryption_ callbacks - ov_
infer_ request - ov_
layout - ov_
model - ov_
output_ const_ port - ov_
output_ port - ov_
partial_ shape - @struct ov_partial_shape
@ingroup ov_partial_shape_c_api
@brief It represents a shape that may be partially or totally dynamic.
A PartialShape may have:
Dynamic rank. (Informal notation:
?) Static rank, but dynamic dimensions on some or all axes. (Informal notation examples:{1,2,?,4},{?,?,?},{-1,-1,-1}) Static rank, and static dimensions on all axes. (Informal notation examples:{1,2,3,4},{6},{}) - ov_
preprocess_ input_ info - ov_
preprocess_ input_ model_ info - ov_
preprocess_ input_ tensor_ info - ov_
preprocess_ output_ info - ov_
preprocess_ output_ tensor_ info - ov_
preprocess_ prepostprocessor - ov_
preprocess_ preprocess_ steps - ov_
profiling_ info_ list_ t - @struct ov_profiling_info_list_t @ingroup ov_infer_request_c_api @brief A list of profiling info data
- ov_
profiling_ info_ t - @struct ov_ProfilingInfo_t @ingroup ov_infer_request_c_api @brief Store profiling info data
- ov_
remote_ context - ov_
shape_ t - @struct ov_shape_t @ingroup ov_shape_c_api @brief Reprents a static shape.
- ov_
tensor - ov_
version - @struct ov_version @ingroup ov_core_c_api @brief Represents OpenVINO version information
Enums§
- ov_
color_ format_ e - @enum ov_color_format_e @ingroup ov_prepostprocess_c_api @brief This enum contains enumerations for color format.
- ov_
element_ type_ e - @enum ov_element_type_e @ingroup ov_base_c_api @brief This enum contains codes for element type, which is aligned with ov::element::Type_t in src/core/include/openvino/core/type/element_type.hpp
- ov_
padding_ mode_ e - @enum ov_padding_mode_e @ingroup ov_prepostprocess_c_api @brief This enum contains enumeration for padding mode.
- ov_
preprocess_ resize_ algorithm_ e - @enum ov_preprocess_resize_algorithm_e @ingroup ov_prepostprocess_c_api @brief This enum contains codes for all preprocess resize algorithm.
- ov_
profiling_ info_ t_ Status - ov_
status_ e - @enum ov_status_e @ingroup ov_base_c_api @brief This enum contains codes for all possible return values of the interface functions
Functions§
- load
- Load all of the function definitions from a shared library.
- ov_
available_ ⚠devices_ free - @brief Releases memory occpuied by ov_available_devices_t @ingroup ov_core_c_api @param devices A pointer to the ov_available_devices_t instance. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ create_ infer_ request - @brief Creates an inference request object used to infer the compiled model. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param infer_request A pointer to the ov_infer_request_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ export_ model - @brief Exports the current compiled model to an output stream
std::ostream. The exported model can also be imported via the ov::Core::import_model method. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param export_model_path Path to the file. @return Status code of the operation: OK(0) for success. - ov_
compiled_ ⚠model_ free - @brief Release the memory allocated by ov_compiled_model_t. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t to free memory.
- ov_
compiled_ ⚠model_ get_ context - @brief Returns pointer to device-specific shared context on a remote accelerator device that was used to create this CompiledModel. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param context Return context. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ get_ property - @brief Gets properties for current compiled model. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param property_key Property key. @param property_value A pointer to property value. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ get_ runtime_ model - @brief Gets runtime model information from a device. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param model A pointer to the ov_model_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ input - @brief Get the single const input port of ov_compiled_model_t, which only support single input model. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param input_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ input_ by_ index - @brief Get a const input port of ov_compiled_model_t by port index. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param index input index. @param input_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ input_ by_ name - @brief Get a const input port of ov_compiled_model_t by name. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param name input tensor name (char *). @param input_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ inputs_ size - @brief Get the input size of ov_compiled_model_t. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param input_size the compiled_model’s input size. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ output - @brief Get the single const output port of ov_compiled_model_t, which only support single output model. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ output_ by_ index - @brief Get a const output port of ov_compiled_model_t by port index. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param index input index. @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ output_ by_ name - @brief Get a const output port of ov_compiled_model_t by name. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param name input tensor name (char *). @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ outputs_ size - @brief Get the output size of ov_compiled_model_t. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param size the compiled_model’s output size. @return Status code of the operation: OK(0) for success.
- ov_
compiled_ ⚠model_ set_ property - @brief Sets properties for a device, acceptable keys can be found in ov_property_key_xxx. @ingroup ov_compiled_model_c_api @param compiled_model A pointer to the ov_compiled_model_t. @param … variadic paramaters The format is <char property_key, char property_value>. Supported property key please see ov_property.h. @return Status code of the operation: OK(0) for success.
- ov_
const_ ⚠port_ get_ shape - @brief Get the shape of port object. @ingroup ov_node_c_api @param port A pointer to ov_output_const_port_t. @param tensor_shape tensor shape. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠add_ extension - @brief Adds an extension to the core. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param path Path to the extension. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠compile_ model - @brief Creates a compiled model from a source model object. Users can create as many compiled models as they need and use them simultaneously (up to the limitation of the hardware resources). @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model Model object acquired from Core::read_model. @param device_name Name of a device to load a model to. @param property_args_size How many properties args will be passed, each property contains 2 args: key and value. @param compiled_model A pointer to the newly created compiled_model. @param … property paramater: Optional pack of pairs: <char* property_key, char* property_value> relevant only for this load operation operation. Supported property key please see ov_property.h. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠compile_ model_ from_ file - @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file. This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow, especially for cases when caching is enabled and a cached model is available. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model_path Path to a model. @param device_name Name of a device to load a model to. @param property_args_size How many properties args will be passed, each property contains 2 args: key and value. @param compiled_model A pointer to the newly created compiled_model. @param … Optional pack of pairs: <char* property_key, char* property_value> relevant only for this load operation operation. Supported property key please see ov_property.h. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠compile_ model_ from_ file_ unicode - @brief Reads a model and creates a compiled model from the IR/ONNX/PDPD file. This can be more efficient than using the ov_core_read_model_from_XXX + ov_core_compile_model flow, especially for cases when caching is enabled and a cached model is available. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model_path Path to a model. @param device_name Name of a device to load a model to. @param property_args_size How many properties args will be passed, each property contains 2 args: key and value. @param compiled_model A pointer to the newly created compiled_model. @param … Optional pack of pairs: <char* property_key, char* property_value> relevant only for this load operation operation. Supported property key please see ov_property.h. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠compile_ model_ with_ context - @brief Creates a compiled model from a source model within a specified remote context. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model Model object acquired from ov_core_read_model. @param context A pointer to the newly created remote context. @param property_args_size How many args will be for this compiled model. @param compiled_model A pointer to the newly created compiled_model. @param … variadic parmameters Actual property parameter for remote context @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠create - @brief Constructs OpenVINO Core instance by default. See RegisterPlugins for more details. @ingroup ov_core_c_api @param core A pointer to the newly created ov_core_t. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠create_ context - @brief Creates a new remote shared context object on the specified accelerator device using specified plugin-specific low-level device API parameters (device handle, pointer, context, etc.). @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param device_name Device name to identify a plugin. @param context_args_size How many property args will be for this remote context creation. @param context A pointer to the newly created remote context. @param … variadic parmameters Actual context property parameter for remote context @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠create_ with_ config - @brief Constructs OpenVINO Core instance using XML configuration file with devices description. See RegisterPlugins for more details. @ingroup ov_core_c_api @param xml_config_file A path to .xml file with devices to load from. If XML configuration file is not specified, then default plugin.xml file will be used. @param core A pointer to the newly created ov_core_t. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠create_ with_ config_ unicode - @brief Constructs OpenVINO Core instance. See RegisterPlugins for more details. @ingroup ov_core_c_api @param xml_config_file_ws A path to model file with unicode. @param core A pointer to the newly created ov_core_t. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠free - @brief Release the memory allocated by ov_core_t. @ingroup ov_core_c_api @param core A pointer to the ov_core_t to free memory.
- ov_
core_ ⚠get_ available_ devices - @brief Returns devices available for inference. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param devices A pointer to the ov_available_devices_t instance. Core objects go over all registered plugins and ask about available devices. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠get_ default_ context - @brief Gets a pointer to default (plugin-supplied) shared context object for the specified accelerator device. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param device_name Name of a device to get a default shared context from. @param context A pointer to the referenced remote context. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠get_ property - @brief Gets properties related to device behaviour. The method extracts information that can be set via the set_property method. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param device_name Name of a device to get a property value. @param property_key Property key. @param property_value A pointer to property value with string format. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠get_ versions_ by_ device_ name - @brief Returns device plugins version information.
Device name can be complex and identify multiple devices at once like
HETERO:CPU,GPU; in this case, std::map contains multiple entries, each per device. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param device_name Device name to identify a plugin. @param versions A pointer to versions corresponding to device_name. @return Status code of the operation: OK(0) for success. - ov_
core_ ⚠import_ model - @brief Imports a compiled model from the previously exported one. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param content A pointer to content of the exported model. @param content_size Number of bytes in the exported network. @param device_name Name of a device to import a compiled model for. @param compiled_model A pointer to the newly created compiled_model. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠read_ model - @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model_path Path to a model. @param bin_path Path to a data file. For IR format (*.bin):
- ov_
core_ ⚠read_ model_ from_ memory_ buffer - @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats with models string size. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model_str String with a model in IR / ONNX / PDPD / TF / TFLite format, support model string containing several null chars. @param str_len The length of model string. @param weights Shared pointer to a constant tensor with weights. @param model A pointer to the newly created model. Reading ONNX / PDPD / TF / TFLite models does not support loading weights from the @p weights tensors. @note Created model object shares the weights with the @p weights object. Thus, do not create @p weights on temporary data that can be freed later, since the model constant data will point to an invalid memory. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠read_ model_ unicode - @brief Reads models from IR / ONNX / PDPD / TF / TFLite formats, path is unicode. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param model_path Path to a model. @param bin_path Path to a data file. For IR format (*.bin):
- ov_
core_ ⚠set_ property - @brief Sets properties for a device, acceptable keys can be found in ov_property_key_xxx. @ingroup ov_core_c_api @param core A pointer to the ov_core_t instance. @param device_name Name of a device. @param … variadic paramaters The format is <char* property_key, char* property_value>. Supported property key please see ov_property.h. @return Status code of the operation: OK(0) for success.
- ov_
core_ ⚠versions_ free - @brief Releases memory occupied by ov_core_version_list_t. @ingroup ov_core_c_api @param versions A pointer to the ov_core_version_list_t to free memory.
- ov_
dimension_ ⚠is_ dynamic - @brief Check this dimension whether is dynamic @ingroup ov_dimension_c_api @param dim The dimension pointer that will be checked. @return Boolean, true is dynamic and false is static.
- ov_free⚠
- @brief free char @ingroup ov_base_c_api @param content The pointer to the char to free.
- ov_
get_ ⚠error_ info - @brief Print the error info. @ingroup ov_base_c_api @param ov_status_e a status code.
- ov_
get_ ⚠last_ err_ msg - @brief Get the last error msg. @ingroup ov_base_c_api
- ov_
get_ ⚠openvino_ version - @brief Get version of OpenVINO. @ingroup ov_core_c_api @param ov_version_t a pointer to the version @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ cancel - @brief Cancel inference request. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ free - @brief Release the memory allocated by ov_infer_request_t. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t to free memory.
- ov_
infer_ ⚠request_ get_ input_ tensor - @brief Get an input tensor from the model with only one input tensor. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ input_ tensor_ by_ index - @brief Get an input tensor by the index of input tensor. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param idx Index of the tensor to get. @p idx. If the tensor with the specified @p idx is not found, an error will return. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ output_ tensor - @brief Get an output tensor from the model with only one output tensor. @note If model has several outputs, an error will return. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ output_ tensor_ by_ index - @brief Get an output tensor by the index of output tensor. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param idx Index of the tensor to get. @p idx. If the tensor with the specified @p idx is not found, an error will return. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ profiling_ info - @brief Query performance measures per layer to identify the most time consuming operation. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param profiling_infos Vector of profiling information for operations in a model. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ tensor - @brief Get an input/output tensor by the name of tensor. @note If model has several outputs, an error will return. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param tensor_name Name of the input or output tensor to get. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ tensor_ by_ const_ port - @brief Get an input/output tensor by const port. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param port Port of the tensor to get. @p port is not found, an error will return. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ get_ tensor_ by_ port - @brief Get an input/output tensor by port. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param port Port of the tensor to get. @p port is not found, an error will return. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ infer - @brief Infer specified input(s) in synchronous mode. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ callback - @brief Set callback function, which will be called when inference is done. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param callback A function to be called. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ input_ tensor - @brief Set an input tensor for the model with single input to infer on. @note If model has several inputs, an error will return. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ input_ tensor_ by_ index - @brief Set an input tensor to infer on by the index of tensor. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param idx Index of the input port. If @p idx is greater than the number of model inputs, an error will return. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ output_ tensor - @brief Set an output tensor to infer models with single output. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ output_ tensor_ by_ index - @brief Set an output tensor to infer by the index of output tensor. @note Index of the output preserved accross ov_model_t, ov_compiled_model_t. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param idx Index of the output tensor. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ tensor - @brief Set an input/output tensor to infer on by the name of tensor. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param tensor_name Name of the input or output tensor. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ tensor_ by_ const_ port - @brief Set an input/output tensor to infer request for the port. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param port Const port of the input or output tensor, which can be got by call interface from ov_model_t/ov_compiled_model_t. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ set_ tensor_ by_ port - @brief Set an input/output tensor to infer request for the port. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param port Port of the input or output tensor, which can be got by calling ov_model_t/ov_compiled_model_t interface. @param tensor Reference to the tensor. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ start_ async - @brief Start inference of specified input(s) in asynchronous mode. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ wait - @brief Wait for the result to become available. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @return Status code of the operation: OK(0) for success.
- ov_
infer_ ⚠request_ wait_ for - @brief Waits for the result to become available. Blocks until the specified timeout has elapsed or the result becomes available, whichever comes first. @ingroup ov_infer_request_c_api @param infer_request A pointer to the ov_infer_request_t. @param timeout Maximum duration, in milliseconds, to block for. @return Status code of the operation: OK(0) for success.
- ov_
layout_ ⚠create - @brief Create a layout object. @ingroup ov_layout_c_api @param layout The layout input pointer. @param layout_desc The description of layout. @return ov_status_e a status code, return OK if successful
- ov_
layout_ ⚠free - @brief Free layout object. @ingroup ov_layout_c_api @param layout will be released.
- ov_
layout_ ⚠to_ string - @brief Convert layout object to a readable string. @ingroup ov_layout_c_api @param layout will be converted. @return string that describes the layout content.
- ov_
model_ ⚠const_ input - @brief Get a const input port of ov_model_t,which only support single input model. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param input_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠const_ input_ by_ index - @brief Get a const input port of ov_model_t by port index. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param index input tensor index. @param input_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠const_ input_ by_ name - @brief Get a const input port of ov_model_t by name. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param tensor_name The name of input tensor. @param input_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠const_ output - @brief Get a single const output port of ov_model_t, which only support single output model. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠const_ output_ by_ index - @brief Get a const output port of ov_model_t by port index. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param index input tensor index. @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠const_ output_ by_ name - @brief Get a const output port of ov_model_t by name. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param tensor_name input tensor name (char *). @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠free - @brief Release the memory allocated by ov_model_t. @ingroup ov_model_c_api @param model A pointer to the ov_model_t to free memory.
- ov_
model_ ⚠get_ friendly_ name - @brief Gets the friendly name for a model. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param friendly_name the model’s friendly name. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠input - @brief Get single input port of ov_model_t, which only support single input model. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param input_port A pointer to the ov_output_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠input_ by_ index - @brief Get an input port of ov_model_t by port index. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param index input tensor index. @param input_port A pointer to the ov_output_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠input_ by_ name - @brief Get an input port of ov_model_t by name. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param tensor_name input tensor name (char *). @param input_port A pointer to the ov_output_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠inputs_ size - @brief Get the input size of ov_model_t. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param input_size the model’s input size. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠is_ dynamic - @brief Returns true if any of the ops defined in the model is dynamic shape. @param model A pointer to the ov_model_t. @return true if model contains dynamic shapes
- ov_
model_ ⚠output - @brief Get a single output port of ov_model_t, which only support single output model. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param output_port A pointer to the ov_output_const_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠output_ by_ index - @brief Get an output port of ov_model_t by port index. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param index input tensor index. @param output_port A pointer to the ov_output_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠output_ by_ name - @brief Get an output port of ov_model_t by name. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param tensor_name output tensor name (char *). @param output_port A pointer to the ov_output_port_t. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠outputs_ size - @brief Get the output size of ov_model_t. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param output_size the model’s output size. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠reshape - @brief Do reshape in model with a list of <name, partial shape>. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param tensor_names The list of input tensor names. @param partialShape A PartialShape list. @param size The item count in the list. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠reshape_ by_ port_ indexes - @brief Do reshape in model with a list of <port id, partial shape>. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param port_indexes The array of port indexes. @param partialShape A PartialShape list. @param size The item count in the list. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠reshape_ by_ ports - @brief Do reshape in model with a list of <ov_output_port_t, partial shape>. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param output_ports The ov_output_port_t list. @param partialShape A PartialShape list. @param size The item count in the list. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠reshape_ input_ by_ name - @brief Do reshape in model with partial shape for a specified name. @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param tensor_name The tensor name of input tensor. @param partialShape A PartialShape. @return Status code of the operation: OK(0) for success.
- ov_
model_ ⚠reshape_ single_ input - @brief Do reshape in model for one node(port 0). @ingroup ov_model_c_api @param model A pointer to the ov_model_t. @param partialShape A PartialShape. @return Status code of the operation: OK(0) for success.
- ov_
output_ ⚠const_ port_ free - @brief free const port @ingroup ov_node_c_api @param port The pointer to the instance of the ov_output_const_port_t to free.
- ov_
output_ ⚠port_ free - @brief free port object @ingroup ov_node_c_api @param port The pointer to the instance of the ov_output_port_t to free.
- ov_
partial_ ⚠shape_ create - @brief Initialze a partial shape with static rank and dynamic dimension.
@ingroup ov_partial_shape_c_api
@param rank support static rank.
@param dims support dynamic and static dimension.
Static rank, but dynamic dimensions on some or all axes.
Examples:
{1,2,?,4}or{?,?,?}or{1,2,-1,4}Static rank, and static dimensions on all axes. Examples:{1,2,3,4}or{6}or{} - ov_
partial_ ⚠shape_ create_ dynamic - @brief Initialze a partial shape with dynamic rank and dynamic dimension.
@ingroup ov_partial_shape_c_api
@param rank support dynamic and static rank.
@param dims support dynamic and static dimension.
Dynamic rank:
Example:
?Static rank, but dynamic dimensions on some or all axes. Examples:{1,2,?,4}or{?,?,?}or{1,2,-1,4}Static rank, and static dimensions on all axes. Examples:{1,2,3,4}or{6}or{}" - ov_
partial_ ⚠shape_ create_ static - @brief Initialize a partial shape with static rank and static dimension.
@ingroup ov_partial_shape_c_api
@param rank support static rank.
@param dims support static dimension.
Static rank, and static dimensions on all axes.
Examples:
{1,2,3,4}or{6}or{} - ov_
partial_ ⚠shape_ free - @brief Release internal memory allocated in partial shape. @ingroup ov_partial_shape_c_api @param partial_shape The object’s internal memory will be released. @return Status code of the operation: OK(0) for success.
- ov_
partial_ ⚠shape_ is_ dynamic - @brief Check this partial_shape whether is dynamic @ingroup ov_partial_shape_c_api @param partial_shape The partial_shape pointer. @return Status code of the operation: OK(0) for success.
- ov_
partial_ ⚠shape_ to_ shape - @brief Convert partial shape without dynamic data to a static shape. @ingroup ov_partial_shape_c_api @param partial_shape The partial_shape pointer. @param shape The shape pointer. @return Status code of the operation: OK(0) for success.
- ov_
partial_ ⚠shape_ to_ string - @brief Helper function, convert a partial shape to readable string. @ingroup ov_partial_shape_c_api @param partial_shape The partial_shape pointer. @return A string reprensts partial_shape’s content.
- ov_
port_ ⚠get_ any_ name - @brief Get the tensor name of port. @ingroup ov_node_c_api @param port A pointer to the ov_output_const_port_t. @param tensor_name A pointer to the tensor name. @return Status code of the operation: OK(0) for success.
- ov_
port_ ⚠get_ element_ type - @brief Get the tensor type of port. @ingroup ov_node_c_api @param port A pointer to the ov_output_const_port_t. @param tensor_type tensor type. @return Status code of the operation: OK(0) for success.
- ov_
port_ ⚠get_ partial_ shape - @brief Get the partial shape of port. @ingroup ov_node_c_api @param port A pointer to the ov_output_const_port_t. @param partial_shape Partial shape. @return Status code of the operation: OK(0) for success.
- ov_
port_ ⚠get_ shape - @brief Get the shape of port object. @ingroup ov_node_c_api @param port A pointer to ov_output_port_t. @param tensor_shape tensor shape. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ info_ free - @brief Release the memory allocated by ov_preprocess_input_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_input_info A pointer to the ov_preprocess_input_info_t to free memory.
- ov_
preprocess_ ⚠input_ info_ get_ model_ info - @brief Get current input model information. @ingroup ov_prepostprocess_c_api @param preprocess_input_info A pointer to the ov_preprocess_input_info_t. @param preprocess_input_model_info A pointer to the ov_preprocess_input_model_info_t @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ info_ get_ preprocess_ steps - @brief Get a ov_preprocess_preprocess_steps_t. @ingroup ov_prepostprocess_c_api @param ov_preprocess_input_info_t A pointer to the ov_preprocess_input_info_t. @param preprocess_input_steps A pointer to ov_preprocess_preprocess_steps_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ info_ get_ tensor_ info - @brief Get a ov_preprocess_input_tensor_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_input_info A pointer to the ov_preprocess_input_info_t. @param preprocess_input_tensor_info A pointer to ov_preprocess_input_tensor_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ model_ info_ free - @brief Release the memory allocated by ov_preprocess_input_model_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_input_model_info A pointer to the ov_preprocess_input_model_info_t to free memory.
- ov_
preprocess_ ⚠input_ model_ info_ set_ layout - @brief Set layout for model’s input tensor. @ingroup ov_prepostprocess_c_api @param preprocess_input_model_info A pointer to the ov_preprocess_input_model_info_t @param layout A point to ov_layout_t @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ free - @brief Release the memory allocated by ov_preprocess_input_tensor_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t to free memory.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ color_ format - @brief Set ov_preprocess_input_tensor_info_t color format. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param colorFormat The enumerate of colorFormat @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ color_ format_ with_ subname - @brief Set ov_preprocess_input_tensor_info_t color format with subname. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param colorFormat The enumerate of colorFormat @param sub_names_size The size of sub_names @param … variadic params sub_names Optional list of sub-names assigned for each plane (e.g. “Y”, “UV”). @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ element_ type - @brief Set ov_preprocess_input_tensor_info_t precesion. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param element_type A point to element_type @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ from - @brief Helper function to reuse element type and shape from user’s created tensor. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ layout - @brief Set ov_preprocess_input_tensor_info_t layout. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param layout A point to ov_layout_t @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ memory_ type - @brief Set ov_preprocess_input_tensor_info_t memory type. @ingroup prepostprocess @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param mem_type Memory type. Refer to ov_remote_context.h to get memory type string info. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠input_ tensor_ info_ set_ spatial_ static_ shape - @brief Set ov_preprocess_input_tensor_info_t spatial_static_shape. @ingroup ov_prepostprocess_c_api @param preprocess_input_tensor_info A pointer to the ov_preprocess_input_tensor_info_t. @param input_height The height of input @param input_width The width of input @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠output_ info_ free - @brief Release the memory allocated by ov_preprocess_output_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_output_info A pointer to the ov_preprocess_output_info_t to free memory.
- ov_
preprocess_ ⚠output_ info_ get_ tensor_ info - @brief Get a ov_preprocess_input_tensor_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_output_info A pointer to the ov_preprocess_output_info_t. @param preprocess_output_tensor_info A pointer to the ov_preprocess_output_tensor_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠output_ set_ element_ type - @brief Set ov_preprocess_input_tensor_info_t precesion. @ingroup ov_prepostprocess_c_api @param preprocess_output_tensor_info A pointer to the ov_preprocess_output_tensor_info_t. @param element_type A point to element_type @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠output_ tensor_ info_ free - @brief Release the memory allocated by ov_preprocess_output_tensor_info_t. @ingroup ov_prepostprocess_c_api @param preprocess_output_tensor_info A pointer to the ov_preprocess_output_tensor_info_t to free memory.
- ov_
preprocess_ ⚠prepostprocessor_ build - @brief Adds pre/post-processing operations to function passed in constructor. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param model A pointer to the ov_model_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ create - @brief Create a ov_preprocess_prepostprocessor_t instance. @ingroup ov_prepostprocess_c_api @param model A pointer to the ov_model_t. @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ free - @brief Release the memory allocated by ov_preprocess_prepostprocessor_t. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t to free memory.
- ov_
preprocess_ ⚠prepostprocessor_ get_ input_ info - @brief Get the input info of ov_preprocess_prepostprocessor_t instance. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param preprocess_input_info A pointer to the ov_preprocess_input_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ get_ input_ info_ by_ index - @brief Get the input info of ov_preprocess_prepostprocessor_t instance by tensor order. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param tensor_index The order of input. @param preprocess_input_info A pointer to the ov_preprocess_input_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ get_ input_ info_ by_ name - @brief Get the input info of ov_preprocess_prepostprocessor_t instance by tensor name. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param tensor_name The name of input. @param preprocess_input_info A pointer to the ov_preprocess_input_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ get_ output_ info - @brief Get the output info of ov_preprocess_output_info_t instance. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param preprocess_output_info A pointer to the ov_preprocess_output_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ get_ output_ info_ by_ index - @brief Get the output info of ov_preprocess_output_info_t instance. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param tensor_index The tensor index @param preprocess_output_info A pointer to the ov_preprocess_output_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠prepostprocessor_ get_ output_ info_ by_ name - @brief Get the output info of ov_preprocess_output_info_t instance. @ingroup ov_prepostprocess_c_api @param preprocess A pointer to the ov_preprocess_prepostprocessor_t. @param tensor_name The name of input. @param preprocess_output_info A pointer to the ov_preprocess_output_info_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ convert_ color - @brief Convert ov_preprocess_preprocess_steps_t color. @ingroup ov_prepostprocess_c_api @param preprocess_input_steps A pointer to the ov_preprocess_preprocess_steps_t. @param colorFormat The enumerate of colorFormat. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ convert_ element_ type - @brief Convert ov_preprocess_preprocess_steps_t element type. @ingroup ov_prepostprocess_c_api @param preprocess_input_steps A pointer to the ov_preprocess_preprocess_steps_t. @param element_type preprocess input element type. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ convert_ layout - @brief Add ‘convert layout’ operation to specified layout. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param layout A point to ov_layout_t @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ crop - @brief Crop input tensor between begin and end coordinates. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param begin Pointer to begin indexes for input tensor cropping. Negative values represent counting elements from the end of input tensor @param begin_size The size of begin array @param end Pointer to end indexes for input tensor cropping. End indexes are exclusive, which means values including end edge are not included in the output slice. Negative values represent counting elements from the end of input tensor @param end_size The size of end array @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ free - @brief Release the memory allocated by ov_preprocess_preprocess_steps_t. @ingroup ov_prepostprocess_c_api @param preprocess_input_steps A pointer to the ov_preprocess_preprocess_steps_t to free memory.
- ov_
preprocess_ ⚠preprocess_ steps_ mean - @brief Add mean preprocess operation. Subtract specified value from each element of input. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param value Value to subtract from each element. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ mean_ multi_ channels - @brief Add mean preprocess operation. Subtract each channel element of input by different specified value. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param values Value array to subtract from each element. @param value_size Mean value size @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ pad - @brief Add pad preprocess operation. Extends an input tensor on edges with constants.
- ov_
preprocess_ ⚠preprocess_ steps_ resize - @brief Add resize operation to model’s dimensions. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param resize_algorithm A ov_preprocess_resizeAlgorithm instance @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ reverse_ channels - @brief Reverse channels operation. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ scale - @brief Add scale preprocess operation. Divide each element of input by specified value. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param value Scaling value @return Status code of the operation: OK(0) for success.
- ov_
preprocess_ ⚠preprocess_ steps_ scale_ multi_ channels - @brief Add scale preprocess operation. Divide each channel element of input by different specified value. @ingroup ov_prepostprocess_c_api @param preprocess_input_process_steps A pointer to ov_preprocess_preprocess_steps_t. @param values Scaling values array for each channels @param value_size Scaling value size @return Status code of the operation: OK(0) for success.
- ov_
profiling_ ⚠info_ list_ free - @brief Release the memory allocated by ov_profiling_info_list_t. @ingroup ov_infer_request_c_api @param profiling_infos A pointer to the ov_profiling_info_list_t to free memory.
- ov_
rank_ ⚠is_ dynamic - @brief Check this rank whether is dynamic @ingroup ov_rank_c_api @param rank The rank pointer that will be checked. @return bool The return value.
- ov_
remote_ ⚠context_ create_ host_ tensor - @brief This method is used to create a host tensor object friendly for the device in current context. For example, GPU context may allocate USM host memory (if corresponding extension is available), which could be more efficient than regular host memory. @ingroup ov_remote_context_c_api @param context A pointer to the ov_remote_context_t instance. @param type Defines the element type of the tensor. @param shape Defines the shape of the tensor. @param tensor Pointer to ov_tensor_t that contains host tensor. @return Status code of the operation: OK(0) for success.
- ov_
remote_ ⚠context_ create_ tensor - @brief Allocates memory tensor in device memory or wraps user-supplied memory handle using the specified tensor description and low-level device-specific parameters. Returns a pointer to the object that implements the RemoteTensor interface. @ingroup ov_remote_context_c_api @param context A pointer to the ov_remote_context_t instance. @param type Defines the element type of the tensor. @param shape Defines the shape of the tensor. @param object_args_size Size of the low-level tensor object parameters. @param remote_tensor Pointer to returned ov_tensor_t that contains remote tensor instance. @param … variadic params Contains low-level tensor object parameters. @return Status code of the operation: OK(0) for success.
- ov_
remote_ ⚠context_ free - @brief Release the memory allocated by ov_remote_context_t. @ingroup ov_remote_context_c_api @param context A pointer to the ov_remote_context_t to free memory. @return Status code of the operation: OK(0) for success.
- ov_
remote_ ⚠context_ get_ device_ name - @brief Returns name of a device on which underlying object is allocated. @ingroup ov_remote_context_c_api @param context A pointer to the ov_remote_context_t instance. @param device_name Device name will be returned. @return Status code of the operation: OK(0) for success.
- ov_
remote_ ⚠context_ get_ params - @brief Returns a string contains device-specific parameters required for low-level operations with the underlying object. Parameters include device/context handles, access flags, etc. Content of the returned map depends on a remote execution context that is currently set on the device (working scenario). One actaul example: “CONTEXT_TYPE OCL OCL_CONTEXT 0x5583b2ec7b40 OCL_QUEUE 0x5583b2e98ff0” @ingroup ov_remote_context_c_api @param context A pointer to the ov_remote_context_t instance. @param size The size of param pairs. @param params Param name:value list. @return Status code of the operation: OK(0) for success.
- ov_
remote_ ⚠tensor_ get_ device_ name - @brief Returns name of a device on which underlying object is allocated. @ingroup ov_remote_context_c_api @param remote_tensor A pointer to the remote tensor instance. @param device_name Device name will be return. @return Status code of the operation: OK(0) for success.
- ov_
remote_ ⚠tensor_ get_ params - @brief Returns a string contains device-specific parameters required for low-level operations with underlying object. Parameters include device/context/surface/buffer handles, access flags, etc. Content of the returned map depends on remote execution context that is currently set on the device (working scenario). One example: “MEM_HANDLE:0x559ff6904b00;OCL_CONTEXT:0x559ff71d62f0;SHARED_MEM_TYPE:OCL_BUFFER;” @ingroup ov_remote_context_c_api @param tensor Pointer to ov_tensor_t that contains host tensor. @param size The size of param pairs. @param params Param name:value list. @return Status code of the operation: OK(0) for success.
- ov_
shape_ ⚠create - @brief Initialize a fully shape object, allocate space for its dimensions and set its content id dims is not null. @ingroup ov_shape_c_api @param rank The rank value for this object, it should be more than 0(>0) @param dims The dimensions data for this shape object, it’s size should be equal to rank. @param shape The input/output shape object pointer. @return ov_status_e The return status code.
- ov_
shape_ ⚠free - @brief Free a shape object’s internal memory. @ingroup ov_shape_c_api @param shape The input shape object pointer. @return ov_status_e The return status code.
- ov_
shape_ ⚠to_ partial_ shape - @brief Convert shape to partial shape. @ingroup ov_partial_shape_c_api @param shape The shape pointer. @param partial_shape The partial_shape pointer. @return Status code of the operation: OK(0) for success.
- ov_
shutdown ⚠ - @brief Shut down the OpenVINO by deleting all static-duration objects allocated by the library and releasing dependent resources @ingroup ov_c_api @note This function should be used by advanced user to control unload the resources.
- ov_
tensor_ ⚠create - @brief Constructs Tensor using element type and shape. Allocate internal host storage using default allocator @ingroup ov_tensor_c_api @param type Tensor element type @param shape Tensor shape @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠create_ from_ host_ ptr - @brief Constructs Tensor using element type, shape and external host ptr. @ingroup ov_tensor_c_api @param type Tensor element type @param shape Tensor shape @param host_ptr Pointer to pre-allocated host memory @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠create_ from_ string_ array - @brief Constructs a new tensor using a string array. @ingroup ov_tensor_c_api @param string_array An array of strings @param array_size The size of the string array @param shape Tensor shape @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠data - @brief Provides an access to the underlaying host memory. @ingroup ov_tensor_c_api @param data A point to host memory. @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠free - @brief Free ov_tensor_t. @ingroup ov_tensor_c_api @param tensor A point to ov_tensor_t
- ov_
tensor_ ⚠get_ byte_ size - @brief the size of the current Tensor in bytes. @ingroup ov_tensor_c_api @param byte_size the size of the current Tensor in bytes. @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠get_ element_ type - @brief Get type for tensor. @ingroup ov_tensor_c_api @param type Tensor element type @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠get_ shape - @brief Get shape for tensor. @ingroup ov_tensor_c_api @param shape Tensor shape @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠get_ size - @brief the total number of elements (a product of all the dims or 1 for scalar). @ingroup ov_tensor_c_api @param elements_size number of elements @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠set_ shape - @brief Set new shape for tensor, deallocate/allocate if new total size is bigger than previous one. @ingroup ov_tensor_c_api @param shape Tensor shape @param tensor A point to ov_tensor_t @return Status code of the operation: OK(0) for success.
- ov_
tensor_ ⚠set_ string_ data - @brief Set string data for tensor @ingroup ov_tensor_c_api @param string_array Array of strings @param array_size Size of the array @param tensor A point to ov_tensor_t
- ov_
version_ ⚠free - @brief Release the memory allocated by ov_version_t. @ingroup ov_core_c_api @param version A pointer to the ov_version_t to free memory.
Type Aliases§
- encryption_
func - @brief encryption_func is a function pointer that encrypt or decrypt the input memory, example of this function is codec(const char* input, const size_t in_size, const char* output, size_t* out_size) This function needs to be called twice, the first call to obtain out_size (the size of output buffer), the second call to obtain output buffer. The first call output is nullptr, before the second call, the caller needs to apply for output memory based on the out_size returned by the first call. the memory of parameter output is allocated and released by the caller. @param input The pointer to the input buffer. @param in_size The size of input. @param output The pointer to the encrypted/decrypted buffer. @param out_size The size of output.
- ov_
compiled_ model_ t - @struct ov_compiled_model_t @ingroup ov_compiled_model_c_api @brief type define ov_compiled_model_t from ov_compiled_model
- ov_
core_ t - @struct ov_core_t @ingroup ov_core_c_api @brief type define ov_core_t from ov_core
- ov_
dimension_ t - @struct ov_dimension @ingroup ov_dimension_c_api @brief This is a structure interface equal to ov::Dimension
- ov_
infer_ request_ t - @struct ov_infer_request_t @ingroup ov_infer_request_c_api @brief type define ov_infer_request_t from ov_infer_request
- ov_
layout_ t - @struct ov_layout_t @ingroup ov_layout_c_api @brief type define ov_layout_t from ov_layout
- ov_
model_ t - @struct ov_model_t @ingroup ov_model_c_api @brief type define ov_model_t from ov_model
- ov_
output_ const_ port_ t - @struct ov_output_const_port_t @ingroup ov_node_c_api @brief type define ov_output_const_port_t from ov_output_const_port
- ov_
output_ port_ t - @struct ov_output_port_t @ingroup ov_node_c_api @brief type define ov_output_port_t from ov_output_port
- ov_
partial_ shape_ t - @struct ov_partial_shape
@ingroup ov_partial_shape_c_api
@brief It represents a shape that may be partially or totally dynamic.
A PartialShape may have:
Dynamic rank. (Informal notation:
?) Static rank, but dynamic dimensions on some or all axes. (Informal notation examples:{1,2,?,4},{?,?,?},{-1,-1,-1}) Static rank, and static dimensions on all axes. (Informal notation examples:{1,2,3,4},{6},{}) - ov_
preprocess_ input_ info_ t - @struct ov_preprocess_input_info_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_input_info_t from ov_preprocess_input_info
- ov_
preprocess_ input_ model_ info_ t - @struct ov_preprocess_input_model_info_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_input_model_info_t from ov_preprocess_input_model_info
- ov_
preprocess_ input_ tensor_ info_ t - @struct ov_preprocess_input_tensor_info_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_input_tensor_info_t from ov_preprocess_input_tensor_info
- ov_
preprocess_ output_ info_ t - @struct ov_preprocess_output_info_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_output_info_t from ov_preprocess_output_info
- ov_
preprocess_ output_ tensor_ info_ t - @struct ov_preprocess_output_tensor_info_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_output_tensor_info_t from ov_preprocess_output_tensor_info
- ov_
preprocess_ prepostprocessor_ t - @struct ov_preprocess_prepostprocessor_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_prepostprocessor_t from ov_preprocess_prepostprocessor
- ov_
preprocess_ preprocess_ steps_ t - @struct ov_preprocess_preprocess_steps_t @ingroup ov_prepostprocess_c_api @brief type define ov_preprocess_preprocess_steps_t from ov_preprocess_preprocess_steps
- ov_
rank_ t - @struct ov_rank_t @ingroup ov_rank_c_api @brief type define ov_rank_t from ov_dimension_t
- ov_
remote_ context_ t - ov_
tensor_ t - @struct ov_tensor_t @ingroup ov_tensor_c_api @brief type define ov_tensor_t from ov_tensor
- ov_
version_ t - @struct ov_version @ingroup ov_core_c_api @brief Represents OpenVINO version information