Package ai.djl
Class Device.MultiDevice
java.lang.Object
ai.djl.Device
ai.djl.Device.MultiDevice
- Enclosing class:
- Device
A combined
Device
representing the composition of multiple other devices.-
Nested Class Summary
Nested classes/interfaces inherited from class ai.djl.Device
Device.MultiDevice, Device.Type
-
Field Summary
Fields inherited from class ai.djl.Device
deviceId, deviceType
-
Constructor Summary
ConstructorsConstructorDescriptionMultiDevice
(Device... devices) Constructs aDevice.MultiDevice
from sub devices.MultiDevice
(String deviceType, int startInclusive, int endExclusive) Constructs aDevice.MultiDevice
with a range of new devices.MultiDevice
(List<Device> devices) Constructs aDevice.MultiDevice
from sub devices. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the sub devices if present (such as aDevice.MultiDevice
), otherwise this.int
hashCode()
toString()
Methods inherited from class ai.djl.Device
cpu, fromName, fromName, getDeviceId, getDeviceType, gpu, gpu, isGpu, of
-
Constructor Details
-
MultiDevice
Constructs aDevice.MultiDevice
with a range of new devices.- Parameters:
deviceType
- the type of the sub-devicesstartInclusive
- the start (inclusive) of the devices rangeendExclusive
- the end (exclusive) of the devices range
-
MultiDevice
Constructs aDevice.MultiDevice
from sub devices.- Parameters:
devices
- the sub devices
-
MultiDevice
Constructs aDevice.MultiDevice
from sub devices.- Parameters:
devices
- the sub devices
-
-
Method Details
-
getDevices
Returns the sub devices if present (such as aDevice.MultiDevice
), otherwise this.- Overrides:
getDevices
in classDevice
- Returns:
- the sub devices if present (such as a
Device.MultiDevice
), otherwise this.
-
equals
-
hashCode
public int hashCode() -
toString
-