@@ -2515,8 +2515,12 @@ typedef enum ur_mem_type_t {
25152515///////////////////////////////////////////////////////////////////////////////
25162516/// @brief Memory Information type
25172517typedef enum ur_mem_info_t {
2518- UR_MEM_INFO_SIZE = 0, ///< [size_t] actual size of of memory object in bytes
2519- UR_MEM_INFO_CONTEXT = 1, ///< [::ur_context_handle_t] context in which the memory object was created
2518+ UR_MEM_INFO_SIZE = 0, ///< [size_t] actual size of of memory object in bytes
2519+ UR_MEM_INFO_CONTEXT = 1, ///< [::ur_context_handle_t] context in which the memory object was created
2520+ UR_MEM_INFO_REFERENCE_COUNT = 2, ///< [uint32_t] Reference count of the memory object.
2521+ ///< The reference count returned should be considered immediately stale.
2522+ ///< It is unsuitable for general use in applications. This feature is
2523+ ///< provided for identifying memory leaks.
25202524 /// @cond
25212525 UR_MEM_INFO_FORCE_UINT32 = 0x7fffffff
25222526 /// @endcond
@@ -2650,6 +2654,7 @@ typedef struct ur_image_desc_t {
26502654/// - ::UR_RESULT_ERROR_INVALID_CONTEXT
26512655/// - ::UR_RESULT_ERROR_INVALID_VALUE
26522656/// - ::UR_RESULT_ERROR_INVALID_IMAGE_FORMAT_DESCRIPTOR
2657+ /// + `pImageDesc && UR_STRUCTURE_TYPE_IMAGE_DESC != pImageDesc->stype`
26532658/// + `pImageDesc && UR_MEM_TYPE_IMAGE1D_ARRAY < pImageDesc->type`
26542659/// + `pImageDesc && pImageDesc->numMipLevel != 0`
26552660/// + `pImageDesc && pImageDesc->numSamples != 0`
@@ -2990,7 +2995,7 @@ urMemImageCreateWithNativeHandle(
29902995/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
29912996/// + `NULL == hMemory`
29922997/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
2993- /// + `::UR_MEM_INFO_CONTEXT < propName`
2998+ /// + `::UR_MEM_INFO_REFERENCE_COUNT < propName`
29942999/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
29953000/// + If `propName` is not supported by the adapter.
29963001/// - ::UR_RESULT_ERROR_INVALID_SIZE
0 commit comments