public class NoOpMemoryMgr extends AbstractMemoryMgr implements SessionMemMgr
| Constructor and Description |
|---|
NoOpMemoryMgr() |
| Modifier and Type | Method and Description |
|---|---|
INDArray |
allocate(boolean detached,
DataType dataType,
long... shape)
Allocate an array with the specified datatype and shape.
NOTE: This array should be assumed to be uninitialized - i.e., contains random values. |
INDArray |
allocate(boolean detached,
LongShapeDescriptor descriptor)
As per
SessionMemMgr.allocate(boolean, DataType, long...) but from a LongShapeDescriptor instead |
void |
close()
Close the session memory manager and clean up any memory / resources, if any
|
void |
release(@NonNull INDArray array)
Release the array.
|
dup, ulikeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdup, ulikepublic INDArray allocate(boolean detached, DataType dataType, long... shape)
SessionMemMgrallocate in interface SessionMemMgrdetached - If true: the array is safe to return outside of the SameDiff session run (for example, the array
is one that may be returned to the user)dataType - Datatype of the returned arrayshape - Array shapepublic INDArray allocate(boolean detached, LongShapeDescriptor descriptor)
SessionMemMgrSessionMemMgr.allocate(boolean, DataType, long...) but from a LongShapeDescriptor insteadallocate in interface SessionMemMgrpublic void release(@NonNull
@NonNull INDArray array)
SessionMemMgrrelease in interface SessionMemMgrarray - The array that can be releasedpublic void close()
SessionMemMgrclose in interface Closeableclose in interface AutoCloseableclose in interface SessionMemMgrCopyright © 2021. All rights reserved.