Package ai.djl

Interface DeviceType


  • public interface DeviceType
    DeviceType is a class used to map the Device name to their corresponding type number.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static java.lang.String fromDeviceType​(int deviceType)
      Map device to its type number.
      static int toDeviceType​(Device device)
      Map device to its type number.
    • Method Detail

      • toDeviceType

        static int toDeviceType​(Device device)
        Map device to its type number.
        Parameters:
        device - Device to map from
        Returns:
        the number specified by engine
      • fromDeviceType

        static java.lang.String fromDeviceType​(int deviceType)
        Map device to its type number.
        Parameters:
        deviceType - the number specified by engine
        Returns:
        Device to map to