ANeuralNetworksDevice_getType

Function ANeuralNetworksDevice_getType 

Source
pub unsafe extern "C" fn ANeuralNetworksDevice_getType(
    device: *const ANeuralNetworksDevice,
    type_: *mut i32,
) -> c_int
Expand description

Get the type of a given device.

The device type can be used to help application developers to distribute Machine Learning workloads and other workloads such as graphical rendering. E.g., for an app which renders AR scenes based on real time object detection results, the developer could choose an ACCELERATOR type device for ML workloads, and reserve GPU for graphical rendering.

@param device The representation of the specified device. @param type The returned {@link DeviceTypeCode} of the specified device.

@return ANEURALNETWORKS_NO_ERROR if successful.

Available since API level 29.