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.MultiDevicefrom sub devices.MultiDevice(String deviceType, int startInclusive, int endExclusive) Constructs aDevice.MultiDevicewith a range of new devices.MultiDevice(List<Device> devices) Constructs aDevice.MultiDevicefrom sub devices. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the sub devices if present (such as aDevice.MultiDevice), otherwise this.inthashCode()toString()Methods inherited from class ai.djl.Device
cpu, fromName, fromName, getDeviceId, getDeviceType, gpu, gpu, isGpu, of
-
Constructor Details
-
MultiDevice
Constructs aDevice.MultiDevicewith 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.MultiDevicefrom sub devices.- Parameters:
devices- the sub devices
-
MultiDevice
Constructs aDevice.MultiDevicefrom sub devices.- Parameters:
devices- the sub devices
-
-
Method Details
-
getDevices
Returns the sub devices if present (such as aDevice.MultiDevice), otherwise this.- Overrides:
getDevicesin classDevice- Returns:
- the sub devices if present (such as a
Device.MultiDevice), otherwise this.
-
equals
-
hashCode
public int hashCode() -
toString
-