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, ulike
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dup, ulike
public INDArray allocate(boolean detached, DataType dataType, long... shape)
SessionMemMgr
allocate
in interface SessionMemMgr
detached
- 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)
SessionMemMgr
SessionMemMgr.allocate(boolean, DataType, long...)
but from a LongShapeDescriptor insteadallocate
in interface SessionMemMgr
public void release(@NonNull @NonNull INDArray array)
SessionMemMgr
release
in interface SessionMemMgr
array
- The array that can be releasedpublic void close()
SessionMemMgr
close
in interface Closeable
close
in interface AutoCloseable
close
in interface SessionMemMgr
Copyright © 2020. All rights reserved.