Class NDArrayBase

java.lang.Object
org.apache.tvm.TVMValue
org.apache.tvm.NDArrayBase
Direct Known Subclasses:
NDArray

public class NDArrayBase extends TVMValue
Base class of NDArray. To handle callback array. Only deep-copy supported.
  • Field Details

    • handle

      protected final long handle
    • isView

      protected final boolean isView
  • Method Details

    • asNDArray

      public NDArrayBase asNDArray()
      Overrides:
      asNDArray in class TVMValue
    • copyTo

      public NDArrayBase copyTo(NDArrayBase target)
      Copy array to target.
      Parameters:
      target - The target array to be copied, must have same shape as this array.
      Returns:
      target
    • release

      public void release()
      Release the NDArray memory.

      We highly recommend you to do this manually since the GC strategy is lazy.

      Overrides:
      release in class TVMValue
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable