public interface AffinityManager
Modifier and Type | Interface and Description |
---|---|
static class |
AffinityManager.Location |
Modifier and Type | Method and Description |
---|---|
void |
allowCrossDeviceAccess(boolean reallyAllow)
This method allows to block cross-device access.
|
void |
attachThreadToDevice(long threadId,
Integer deviceId)
This method attaches specified thread (by Id) to specified device
|
void |
attachThreadToDevice(Thread thread,
Integer deviceId)
This method attaches specified thread to specified device
|
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 specified threadId
|
Integer |
getDeviceForThread(Thread thread)
This method returns deviceId for specified 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 |
touch(DataBuffer buffer)
Utility method, to associate INDArray with specific device (backend-specific)
|
void |
touch(INDArray array)
Utility method, to associate INDArray with specific device (backend-specific)
|
void |
unsafeSetDevice(Integer deviceId)
This method forces specific device for current thread.
|
Integer getDeviceForCurrentThread()
Integer getDeviceForThread(Thread thread)
thread
- Integer getDeviceForThread(long threadId)
threadId
- Integer getDeviceForArray(INDArray array)
array
- void attachThreadToDevice(Thread thread, Integer deviceId)
thread
- deviceId
- void attachThreadToDevice(long threadId, Integer deviceId)
threadId
- java ID of the threaddeviceId
- int getNumberOfDevices()
void touch(INDArray array)
array
- void touch(DataBuffer buffer)
buffer
- INDArray replicateToDevice(Integer deviceId, INDArray array)
deviceId
- target deviceIdarray
- INDArray to replicateDataBuffer replicateToDevice(Integer deviceId, DataBuffer buffer)
deviceId
- target deviceIdbuffer
- void tagLocation(INDArray array, AffinityManager.Location location)
location
- void tagLocation(DataBuffer buffer, AffinityManager.Location location)
location
- void ensureLocation(INDArray array, AffinityManager.Location location)
array
- location
- AffinityManager.Location getActiveLocation(INDArray array)
array
- void unsafeSetDevice(Integer deviceId)
deviceId
- boolean isCrossDeviceAccessSupported()
void allowCrossDeviceAccess(boolean reallyAllow)
reallyAllow
- Copyright © 2017. All rights reserved.