public abstract class BasicAffinityManager extends Object implements AffinityManager
AffinityManager.Location| Constructor and Description |
|---|
BasicAffinityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
allowCrossDeviceAccess(boolean reallyAllow)
This method allows to block cross-device access.
|
void |
ensureLocation(INDArray array,
AffinityManager.Location location)
This method propagates given INDArray to specified location
|
AffinityManager.Location |
getActiveLocation(INDArray array)
This method returns last-updated location for the given INDArray
|
Integer |
getDeviceForArray(INDArray array)
This method returns id of current device for a given INDArray
|
Integer |
getDeviceForCurrentThread()
This method returns deviceId for current thread
|
Integer |
getDeviceForThread(long threadId)
This method returns deviceId for a given thread
|
int |
getNumberOfDevices()
This method returns number of available devices
|
boolean |
isCrossDeviceAccessSupported()
This method returns TRUE if cross-device access is allowed on this system
|
DataBuffer |
replicateToDevice(Integer deviceId,
DataBuffer buffer)
This method replicates given DataBuffer, and places it to target device.
|
INDArray |
replicateToDevice(Integer deviceId,
INDArray array)
This method replicates given INDArray, and places it to target device.
|
void |
tagLocation(DataBuffer buffer,
AffinityManager.Location location)
This method tags specific DataBuffer as "recent" on specified location
|
void |
tagLocation(INDArray array,
AffinityManager.Location location)
This method tags specific INDArray as "recent" on specified location
|
void |
unsafeSetDevice(Integer deviceId)
This method forces specific device for current thread.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittouch, touchpublic Integer getDeviceForCurrentThread()
AffinityManagergetDeviceForCurrentThread in interface AffinityManagerpublic Integer getDeviceForThread(long threadId)
AffinityManagergetDeviceForThread in interface AffinityManagerpublic Integer getDeviceForArray(INDArray array)
AffinityManagergetDeviceForArray in interface AffinityManagerpublic int getNumberOfDevices()
AffinityManagergetNumberOfDevices in interface AffinityManagerpublic INDArray replicateToDevice(Integer deviceId, INDArray array)
replicateToDevice in interface AffinityManagerdeviceId - target deviceIdarray - INDArray to replicatepublic DataBuffer replicateToDevice(Integer deviceId, DataBuffer buffer)
replicateToDevice in interface AffinityManagerdeviceId - target deviceIdbuffer - public void tagLocation(INDArray array, AffinityManager.Location location)
AffinityManagertagLocation in interface AffinityManagerpublic void tagLocation(DataBuffer buffer, AffinityManager.Location location)
AffinityManagertagLocation in interface AffinityManagerpublic void unsafeSetDevice(Integer deviceId)
AffinityManagerunsafeSetDevice in interface AffinityManagerpublic void ensureLocation(INDArray array, AffinityManager.Location location)
AffinityManagerensureLocation in interface AffinityManagerpublic boolean isCrossDeviceAccessSupported()
AffinityManagerisCrossDeviceAccessSupported in interface AffinityManagerpublic void allowCrossDeviceAccess(boolean reallyAllow)
AffinityManagerallowCrossDeviceAccess in interface AffinityManagerpublic AffinityManager.Location getActiveLocation(INDArray array)
AffinityManagergetActiveLocation in interface AffinityManagerCopyright © 2021. All rights reserved.