Package org.nd4j.linalg.util
Class DeviceLocalNDArray
- java.lang.Object
-
- org.nd4j.linalg.util.DeviceLocal<INDArray>
-
- org.nd4j.linalg.util.DeviceLocalNDArray
-
public class DeviceLocalNDArray extends DeviceLocal<INDArray>
-
-
Field Summary
-
Fields inherited from class org.nd4j.linalg.util.DeviceLocal
backingMap, delayedArray, delayedMode, lastSettledDevice, locksMap, updatesMap
-
-
Constructor Summary
Constructors Constructor Description DeviceLocalNDArray()
DeviceLocalNDArray(boolean delayedMode)
DeviceLocalNDArray(INDArray array)
DeviceLocalNDArray(INDArray array, boolean delayedMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
broadcast(INDArray array)
This method duplicates array, and stores it to all devices PLEASE NOTE: this method is NOT atomic, so you must be sure no other threads are using this instance during the updateINDArray
get()
This method returns object local to current deviceIdvoid
update(@NonNull INDArray array)
This method updates PLEASE NOTE: this method is NOT atomic, so you must be sure no other threads are using this instance during the update-
Methods inherited from class org.nd4j.linalg.util.DeviceLocal
clear, get, set, set
-
-
-
-
Method Detail
-
get
@Nullable public INDArray get()
This method returns object local to current deviceId- Overrides:
get
in classDeviceLocal<INDArray>
- Returns:
-
broadcast
public void broadcast(INDArray array)
This method duplicates array, and stores it to all devices PLEASE NOTE: this method is NOT atomic, so you must be sure no other threads are using this instance during the update- Parameters:
array
-
-
update
public void update(@NonNull @NonNull INDArray array)
This method updates PLEASE NOTE: this method is NOT atomic, so you must be sure no other threads are using this instance during the update- Parameters:
array
-
-
-