cubecl_hip_sys

Function hipUserObjectCreate

Source
pub unsafe extern "C" fn hipUserObjectCreate(
    object_out: *mut hipUserObject_t,
    ptr: *mut c_void,
    destroy: hipHostFn_t,
    initialRefcount: c_uint,
    flags: c_uint,
) -> hipError_t
Expand description

@brief Create an instance of userObject to manage lifetime of a resource.

@param [out] object_out - pointer to instace of userobj. @param [in] ptr - pointer to pass to destroy function. @param [in] destroy - destroy callback to remove resource. @param [in] initialRefcount - reference to resource. @param [in] flags - flags passed to API. @returns #hipSuccess, #hipErrorInvalidValue @warning : This API is marked as beta, meaning, while this is feature complete, it is still open to changes and may have outstanding issues.