Struct ov_property_t#

struct ov_property_t#

A key/value property pair for use with the non-variadic _props API.

The value field is a const void* that holds any property value. The library interprets the value based on the key — string-valued properties pass a const char*, GPU/OCL handle properties pass the raw handle pointer, and cache-encryption callbacks pass a pointer to an ov_encryption_callbacks struct. 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 const void*, 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);

Public Members

const char *key#

Property key string (see ov_property_key_xxx constants).

const void *value#

Property value: const char* string, GPU/OCL handle, or ov_encryption_callbacks*.