diff --git a/src/bindings/c/include/openvino/c/ov_infer_request.h b/src/bindings/c/include/openvino/c/ov_infer_request.h index bb33a5c1628..c11a6776ae3 100644 --- a/src/bindings/c/include/openvino/c/ov_infer_request.h +++ b/src/bindings/c/include/openvino/c/ov_infer_request.h @@ -159,7 +159,7 @@ OPENVINO_C_API(void) ov_infer_request_free(ov_infer_request_t* infer_request); * @return Status code of the operation: OK(0) for success. */ OPENVINO_C_API(ov_status_e) -ov_infer_request_get_profiling_info(ov_infer_request_t* infer_request, ov_profiling_info_list_t* profiling_infos); +ov_infer_request_get_profiling_info(const ov_infer_request_t* infer_request, ov_profiling_info_list_t* profiling_infos); /** * @brief Release the memory allocated by ov_profiling_info_list_t. diff --git a/src/bindings/c/include/openvino/c/ov_layout.h b/src/bindings/c/include/openvino/c/ov_layout.h index aea9cfc70f1..0e57ece653d 100644 --- a/src/bindings/c/include/openvino/c/ov_layout.h +++ b/src/bindings/c/include/openvino/c/ov_layout.h @@ -44,6 +44,6 @@ OPENVINO_C_API(void) ov_layout_free(ov_layout_t* layout); * @param layout will be converted. * @return string that describes the layout content. */ -OPENVINO_C_API(const char*) ov_layout_to_string(ov_layout_t* layout); +OPENVINO_C_API(const char*) ov_layout_to_string(const ov_layout_t* layout); /** @} */ // end of Layout diff --git a/src/bindings/c/include/openvino/c/ov_model.h b/src/bindings/c/include/openvino/c/ov_model.h index 2e3c1e51eb0..2fb754c5e3e 100644 --- a/src/bindings/c/include/openvino/c/ov_model.h +++ b/src/bindings/c/include/openvino/c/ov_model.h @@ -127,7 +127,7 @@ ov_model_reshape_single_input(const ov_model_t* model, const ov_partial_shape_t */ OPENVINO_C_API(ov_status_e) ov_model_reshape_by_port_indexes(const ov_model_t* model, - size_t* port_indexes, + const size_t* port_indexes, const ov_partial_shape_t* partial_shape, size_t size); diff --git a/src/bindings/c/include/openvino/c/ov_partial_shape.h b/src/bindings/c/include/openvino/c/ov_partial_shape.h index 479ca553527..c20c8261e56 100644 --- a/src/bindings/c/include/openvino/c/ov_partial_shape.h +++ b/src/bindings/c/include/openvino/c/ov_partial_shape.h @@ -54,7 +54,7 @@ typedef struct ov_partial_shape { * @return Status code of the operation: OK(0) for success. */ OPENVINO_C_API(ov_status_e) -ov_partial_shape_create(int64_t rank, ov_dimension_t* dims, ov_partial_shape_t* partial_shape_obj); +ov_partial_shape_create(const int64_t rank, const ov_dimension_t* dims, ov_partial_shape_t* partial_shape_obj); /** * @brief Initialze a partial shape with dynamic rank and dynamic dimension. @@ -71,7 +71,9 @@ ov_partial_shape_create(int64_t rank, ov_dimension_t* dims, ov_partial_shape_t* * @return Status code of the operation: OK(0) for success. */ OPENVINO_C_API(ov_status_e) -ov_partial_shape_create_dynamic(ov_rank_t rank, ov_dimension_t* dims, ov_partial_shape_t* partial_shape_obj); +ov_partial_shape_create_dynamic(const ov_rank_t rank, + const ov_dimension_t* dims, + ov_partial_shape_t* partial_shape_obj); /** * @brief Initialize a partial shape with static rank and static dimension. @@ -84,7 +86,7 @@ ov_partial_shape_create_dynamic(ov_rank_t rank, ov_dimension_t* dims, ov_partial * @return Status code of the operation: OK(0) for success. */ OPENVINO_C_API(ov_status_e) -ov_partial_shape_create_static(int64_t rank, int64_t* dims, ov_partial_shape_t* partial_shape_obj); +ov_partial_shape_create_static(const int64_t rank, const int64_t* dims, ov_partial_shape_t* partial_shape_obj); /** * @brief Release internal memory allocated in partial shape. diff --git a/src/bindings/c/include/openvino/c/ov_prepostprocess.h b/src/bindings/c/include/openvino/c/ov_prepostprocess.h index 6a768cc8009..4a677e6bd8c 100644 --- a/src/bindings/c/include/openvino/c/ov_prepostprocess.h +++ b/src/bindings/c/include/openvino/c/ov_prepostprocess.h @@ -293,7 +293,7 @@ OPENVINO_C_API(void) ov_preprocess_output_info_free(ov_preprocess_output_info_t* * @return Status code of the operation: OK(0) for success. */ OPENVINO_C_API(ov_status_e) -ov_preprocess_output_info_get_tensor_info(ov_preprocess_output_info_t* preprocess_output_info, +ov_preprocess_output_info_get_tensor_info(const ov_preprocess_output_info_t* preprocess_output_info, ov_preprocess_output_tensor_info_t** preprocess_output_tensor_info); /** @@ -322,7 +322,7 @@ ov_preprocess_output_set_element_type(ov_preprocess_output_tensor_info_t* prepro * @return Status code of the operation: OK(0) for success. */ OPENVINO_C_API(ov_status_e) -ov_preprocess_input_info_get_model_info(ov_preprocess_input_info_t* preprocess_input_info, +ov_preprocess_input_info_get_model_info(const ov_preprocess_input_info_t* preprocess_input_info, ov_preprocess_input_model_info_t** preprocess_input_model_info); /** diff --git a/src/bindings/c/include/openvino/c/ov_rank.h b/src/bindings/c/include/openvino/c/ov_rank.h index ce918ce0a2f..7ff186367da 100644 --- a/src/bindings/c/include/openvino/c/ov_rank.h +++ b/src/bindings/c/include/openvino/c/ov_rank.h @@ -10,7 +10,6 @@ #pragma once -#include "openvino/c/ov_common.h" #include "openvino/c/ov_dimension.h" typedef ov_dimension_t ov_rank_t; diff --git a/src/bindings/c/include/openvino/c/ov_shape.h b/src/bindings/c/include/openvino/c/ov_shape.h index bf975cab35d..3f62e4184fd 100644 --- a/src/bindings/c/include/openvino/c/ov_shape.h +++ b/src/bindings/c/include/openvino/c/ov_shape.h @@ -29,7 +29,7 @@ typedef struct { * @param shape The input/output shape object pointer. * @return ov_status_e The return status code. */ -OPENVINO_C_API(ov_status_e) ov_shape_create(int64_t rank, int64_t* dims, ov_shape_t* shape); +OPENVINO_C_API(ov_status_e) ov_shape_create(const int64_t rank, const int64_t* dims, ov_shape_t* shape); /** * @brief Free a shape object's internal memory. diff --git a/src/bindings/c/src/ov_infer_request.cpp b/src/bindings/c/src/ov_infer_request.cpp index e337fa7a53c..fbb0f3b67bc 100644 --- a/src/bindings/c/src/ov_infer_request.cpp +++ b/src/bindings/c/src/ov_infer_request.cpp @@ -144,7 +144,7 @@ ov_status_e ov_infer_request_set_callback(ov_infer_request_t* infer_request, con return ov_status_e::OK; } -ov_status_e ov_infer_request_get_profiling_info(ov_infer_request_t* infer_request, +ov_status_e ov_infer_request_get_profiling_info(const ov_infer_request_t* infer_request, ov_profiling_info_list_t* profiling_infos) { if (!infer_request || !profiling_infos) { return ov_status_e::INVALID_C_PARAM; diff --git a/src/bindings/c/src/ov_layout.cpp b/src/bindings/c/src/ov_layout.cpp index 8de8900aa43..d77cc80ff8f 100644 --- a/src/bindings/c/src/ov_layout.cpp +++ b/src/bindings/c/src/ov_layout.cpp @@ -24,7 +24,7 @@ void ov_layout_free(ov_layout_t* layout) { delete layout; } -const char* ov_layout_to_string(ov_layout_t* layout) { +const char* ov_layout_to_string(const ov_layout_t* layout) { if (!layout) { return str_to_char_array("Error: null layout!"); } diff --git a/src/bindings/c/src/ov_model.cpp b/src/bindings/c/src/ov_model.cpp index 69d217f76ee..d1362d8dc79 100644 --- a/src/bindings/c/src/ov_model.cpp +++ b/src/bindings/c/src/ov_model.cpp @@ -153,7 +153,7 @@ ov_status_e ov_model_reshape(const ov_model_t* model, } ov_status_e ov_model_reshape_by_port_indexes(const ov_model_t* model, - size_t* port_indexes, + const size_t* port_indexes, const ov_partial_shape_t* partial_shapes, size_t size) { if (!model || !port_indexes || !partial_shapes || size < 1) { diff --git a/src/bindings/c/src/ov_partial_shape.cpp b/src/bindings/c/src/ov_partial_shape.cpp index 7b7f00dc66b..400a7d046b8 100644 --- a/src/bindings/c/src/ov_partial_shape.cpp +++ b/src/bindings/c/src/ov_partial_shape.cpp @@ -14,7 +14,9 @@ inline bool check_dimension(const ov_dimension_t* dims, int64_t size) { return true; } -ov_status_e ov_partial_shape_create(int64_t rank, ov_dimension_t* dims, ov_partial_shape_t* partial_shape_obj) { +ov_status_e ov_partial_shape_create(const int64_t rank, + const ov_dimension_t* dims, + ov_partial_shape_t* partial_shape_obj) { if (!partial_shape_obj || rank <= 0 || !dims || !check_dimension(dims, rank)) { return ov_status_e::INVALID_C_PARAM; } @@ -30,8 +32,8 @@ ov_status_e ov_partial_shape_create(int64_t rank, ov_dimension_t* dims, ov_parti return ov_status_e::OK; } -ov_status_e ov_partial_shape_create_dynamic(ov_rank_t rank, - ov_dimension_t* dims, +ov_status_e ov_partial_shape_create_dynamic(const ov_rank_t rank, + const ov_dimension_t* dims, ov_partial_shape_t* partial_shape_obj) { if (!partial_shape_obj || rank.min < -1 || rank.max < -1 || rank.min > rank.max) { return ov_status_e::INVALID_C_PARAM; @@ -57,7 +59,9 @@ ov_status_e ov_partial_shape_create_dynamic(ov_rank_t rank, return ov_status_e::OK; } -ov_status_e ov_partial_shape_create_static(int64_t rank, int64_t* dims, ov_partial_shape_t* partial_shape_obj) { +ov_status_e ov_partial_shape_create_static(const int64_t rank, + const int64_t* dims, + ov_partial_shape_t* partial_shape_obj) { if (!partial_shape_obj || rank < 0 || !dims) { return ov_status_e::INVALID_C_PARAM; } diff --git a/src/bindings/c/src/ov_prepostprocess.cpp b/src/bindings/c/src/ov_prepostprocess.cpp index 278e5e8845d..e4f02c7705e 100644 --- a/src/bindings/c/src/ov_prepostprocess.cpp +++ b/src/bindings/c/src/ov_prepostprocess.cpp @@ -303,7 +303,7 @@ void ov_preprocess_output_info_free(ov_preprocess_output_info_t* preprocess_outp } ov_status_e ov_preprocess_output_info_get_tensor_info( - ov_preprocess_output_info_t* preprocess_output_info, + const ov_preprocess_output_info_t* preprocess_output_info, ov_preprocess_output_tensor_info_t** preprocess_output_tensor_info) { if (!preprocess_output_info || !preprocess_output_tensor_info) { return ov_status_e::INVALID_C_PARAM; @@ -337,7 +337,7 @@ ov_status_e ov_preprocess_output_set_element_type(ov_preprocess_output_tensor_in return ov_status_e::OK; } -ov_status_e ov_preprocess_input_info_get_model_info(ov_preprocess_input_info_t* preprocess_input_info, +ov_status_e ov_preprocess_input_info_get_model_info(const ov_preprocess_input_info_t* preprocess_input_info, ov_preprocess_input_model_info_t** preprocess_input_model_info) { if (!preprocess_input_info || !preprocess_input_model_info) { return ov_status_e::INVALID_C_PARAM; diff --git a/src/bindings/c/src/ov_shape.cpp b/src/bindings/c/src/ov_shape.cpp index 1356e2b1b55..e0328c160aa 100644 --- a/src/bindings/c/src/ov_shape.cpp +++ b/src/bindings/c/src/ov_shape.cpp @@ -5,7 +5,7 @@ #include "common.h" -inline bool check_shape_dimension(const int64_t* dims, int64_t size) { +inline bool check_shape_dimension(const int64_t* dims, const int64_t size) { for (auto i = 0; i < size; i++) { if (dims[i] < 0) { return false; @@ -14,7 +14,7 @@ inline bool check_shape_dimension(const int64_t* dims, int64_t size) { return true; } -ov_status_e ov_shape_create(int64_t rank, int64_t* dims, ov_shape_t* shape) { +ov_status_e ov_shape_create(const int64_t rank, const int64_t* dims, ov_shape_t* shape) { if (!shape || rank <= 0 || (dims && !check_shape_dimension(dims, rank))) { return ov_status_e::INVALID_C_PARAM; }