ANeuralNetworksDevice_getVersion

Function ANeuralNetworksDevice_getVersion 

Source
pub unsafe extern "C" fn ANeuralNetworksDevice_getVersion(
    device: *const ANeuralNetworksDevice,
    version: *mut *const c_char,
) -> c_int
Expand description

Get the version of the driver implementation of the specified device.

It’s the responsibility of the driver implementor to insure that this version string uniquely distinguishes this implementation from all previous implementations.

This version string must not be confused with the feature level which is solely defined by {@link ANeuralNetworksDevice_getFeatureLevel}. There is no implicit ordering of the versions. For example, it is not possible to filter all drivers older than a certain version.

Application developers may use this version string to avoid or prefer specific driver implementations. For example, an application may want to do so because: - A specific version of the driver does not provide the required performance, perhaps because of a performance regression. - A specific version of the driver has a bug or returns results that don’t match the minimum precision requirement for the application.

@param device The representation of the specified device. @param version The returned version string of the driver for the specified device. The string will be in UTF-8 and will be null-terminated. For devices with feature level 28 or lower, “UNKNOWN” will be returned. The version string will remain valid for the duration of the application.

@return ANEURALNETWORKS_NO_ERROR if successful.

Available since API level 29.