Class NoOpMemoryMgr

    • Constructor Detail

      • NoOpMemoryMgr

        public NoOpMemoryMgr()
    • Method Detail

      • allocate

        public INDArray allocate​(boolean detached,
                                 DataType dataType,
                                 long... shape)
        Description copied from interface: SessionMemMgr
        Allocate an array with the specified datatype and shape.
        NOTE: This array should be assumed to be uninitialized - i.e., contains random values.
        Specified by:
        allocate in interface SessionMemMgr
        Parameters:
        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 array
        shape - Array shape
        Returns:
        The newly allocated (uninitialized) array
      • release

        public void release​(@NonNull
                            @NonNull INDArray array)
        Description copied from interface: SessionMemMgr
        Release the array. All arrays allocated via one of the allocate methods should be returned here once they are no longer used, and all references to them should be cleared. After calling release, anything could occur to the array - deallocated, workspace closed, reused, etc.
        Specified by:
        release in interface SessionMemMgr
        Parameters:
        array - The array that can be released