public abstract class BasicAffinityManager extends Object implements AffinityManager
AffinityManager.Location
Constructor and Description |
---|
BasicAffinityManager() |
Modifier and Type | Method and Description |
---|---|
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
|
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
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
touch, touch
public Integer getDeviceForCurrentThread()
AffinityManager
getDeviceForCurrentThread
in interface AffinityManager
public Integer getDeviceForThread(Thread thread)
AffinityManager
getDeviceForThread
in interface AffinityManager
public Integer getDeviceForThread(long threadId)
AffinityManager
getDeviceForThread
in interface AffinityManager
public void attachThreadToDevice(Thread thread, Integer deviceId)
AffinityManager
attachThreadToDevice
in interface AffinityManager
public void attachThreadToDevice(long threadId, Integer deviceId)
AffinityManager
attachThreadToDevice
in interface AffinityManager
threadId
- java ID of the threadpublic Integer getDeviceForArray(INDArray array)
AffinityManager
getDeviceForArray
in interface AffinityManager
public int getNumberOfDevices()
AffinityManager
getNumberOfDevices
in interface AffinityManager
public INDArray replicateToDevice(Integer deviceId, INDArray array)
replicateToDevice
in interface AffinityManager
deviceId
- target deviceIdarray
- INDArray to replicatepublic DataBuffer replicateToDevice(Integer deviceId, DataBuffer buffer)
replicateToDevice
in interface AffinityManager
deviceId
- target deviceIdbuffer
- public void tagLocation(INDArray array, AffinityManager.Location location)
AffinityManager
tagLocation
in interface AffinityManager
public void tagLocation(DataBuffer buffer, AffinityManager.Location location)
AffinityManager
tagLocation
in interface AffinityManager
Copyright © 2017. All Rights Reserved.