From 3c6bb3cd547ad9258884c46d9cddc9432f72123e Mon Sep 17 00:00:00 2001 From: "River.Li" Date: Thu, 1 Feb 2024 11:12:38 +0800 Subject: [PATCH] [CAPI] Port PR-22579 https://github.com/openvinotoolkit/openvino/pull/22579 --- src/bindings/c/src/ov_remote_context.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bindings/c/src/ov_remote_context.cpp b/src/bindings/c/src/ov_remote_context.cpp index 68e802e256973e..f1b9d7cbd6aacf 100644 --- a/src/bindings/c/src/ov_remote_context.cpp +++ b/src/bindings/c/src/ov_remote_context.cpp @@ -20,12 +20,14 @@ const char* ov_property_key_intel_gpu_dev_object_handle = "DEV_OBJECT_HANDLE"; const char* ov_property_key_intel_gpu_va_plane = "VA_PLANE"; inline bool check_intel_gpu_property_value_is_ptr(std::string& key) { - if ((key == ov_property_key_intel_gpu_ocl_context) || (key == ov_property_key_intel_gpu_ocl_queue) || - (key == ov_property_key_intel_gpu_va_device) || (key == ov_property_key_intel_gpu_mem_handle) || - (key == ov_property_key_intel_gpu_dev_object_handle)) - return true; - else - return false; +#ifdef _WIN32 + return (key == ov_property_key_intel_gpu_ocl_context) || (key == ov_property_key_intel_gpu_ocl_queue) || + (key == ov_property_key_intel_gpu_va_device) || (key == ov_property_key_intel_gpu_mem_handle) || + (key == ov_property_key_intel_gpu_dev_object_handle); +#else + return (key == ov_property_key_intel_gpu_ocl_context) || (key == ov_property_key_intel_gpu_ocl_queue) || + (key == ov_property_key_intel_gpu_va_device) || (key == ov_property_key_intel_gpu_mem_handle); +#endif } //!< Properties of intel gpu cannot be compeletly handled by (char*) type, because it contains non-char pointer which