Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.atomic.AtomicBoolean |
closed |
protected Device |
device |
protected NDManager |
parent |
protected java.util.Map<java.lang.String,java.lang.ref.Reference<java.lang.AutoCloseable>> |
resources |
protected java.lang.String |
uid |
Modifier | Constructor and Description |
---|---|
protected |
BaseNDManager(NDManager parent,
Device device) |
Modifier and Type | Method and Description |
---|---|
void |
attach(java.lang.String resourceId,
java.lang.AutoCloseable resource)
|
void |
close() |
void |
debugDump(int level)
Prints information about this
NDManager and all sub-managers to the console. |
void |
detach(java.lang.String resourceId)
Detaches a
NDArray from this NDManager 's lifecycle. |
Device |
getDevice()
Returns the default
Device of this NDManager . |
NDManager |
getParentManager()
Returns the parent
NDManager . |
boolean |
isOpen()
Check if the manager is still valid.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
allocateDirect, arange, arange, arange, arange, arange, arange, arange, arange, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createCSR, createCSR, createRowSparse, createRowSparse, eye, eye, eye, eye, getEngine, invoke, invoke, linspace, linspace, linspace, linspace, load, load, newBaseManager, newBaseManager, newBaseManager, newSubManager, newSubManager, ones, ones, ones, randomMultinomial, randomMultinomial, randomNormal, randomNormal, randomNormal, randomUniform, randomUniform, zeros, zeros, zeros
protected NDManager parent
protected java.lang.String uid
protected Device device
protected java.util.Map<java.lang.String,java.lang.ref.Reference<java.lang.AutoCloseable>> resources
protected java.util.concurrent.atomic.AtomicBoolean closed
public boolean isOpen()
public NDManager getParentManager()
NDManager
.getParentManager
in interface NDManager
NDManager
public java.lang.String toString()
toString
in class java.lang.Object
public void attach(java.lang.String resourceId, java.lang.AutoCloseable resource)
NDArray
or NDManager
to this NDManager
.
Attached resource will be closed when this NDManager
is closed.
public void detach(java.lang.String resourceId)
public void close()