Struct ov_property_t#
-
struct ov_property_t#
A key/value property pair for use with the non-variadic
_propsAPI.The
valuefield is aconstvoid* that holds any property value. The library interprets the value based on thekey— string-valued properties pass aconstchar*, GPU/OCL handle properties pass the raw handle pointer, and cache-encryption callbacks pass a pointer to anov_encryption_callbacksstruct. This mirrors the existing variadic API where the key determines the expected argument type. The struct size is exactly two pointers (16 bytes on 64-bit) and will never change, making it fully ABI-stable across library versions.In C all pointer types implicitly convert to
constvoid*, so no casts are needed:ov_encryption_callbacks cb = {my_encrypt, my_decrypt}; ov_property_t props[] = { {ov_property_key_hint_performance_mode, "LATENCY"}, // const char* → const void* {ov_property_key_num_streams, "4"}, {ov_property_key_cache_encryption_callbacks, &cb}, // struct pointer → const void* }; ov_core_compile_model_from_file_props(core, "model.xml", "CPU", 3, props, &cm); // GPU context with a raw OCL handle (any pointer → const void*): ov_property_t ctx_props[] = { {ov_property_key_intel_gpu_context_type, "OCL"}, {ov_property_key_intel_gpu_ocl_context, ocl_context_ptr}, }; ov_core_create_context_props(core, "GPU", 2, ctx_props, &ctx);