Class AbstractTF_Buffer

java.lang.Object
org.bytedeco.javacpp.Pointer
org.tensorflow.internal.c_api.AbstractTF_Buffer
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
TF_Buffer

@Properties(inherit=tensorflow.class) public abstract class AbstractTF_Buffer extends Pointer
  • Constructor Details

    • AbstractTF_Buffer

      public AbstractTF_Buffer(Pointer p)
  • Method Details

    • newBuffer

      public static TF_Buffer newBuffer()
      Calls TF_NewBuffer(), and registers a deallocator.
      Returns:
      TF_Buffer created. Do not call TF_DeleteBuffer() on it.
    • newBufferFromString

      public static TF_Buffer newBufferFromString(Message proto)
      Returns newBufferFromString(new BytePointer(proto.toByteArray())), or null if proto is null or empty.
    • newBufferFromString

      public static TF_Buffer newBufferFromString(Pointer proto)
      Calls TF_NewBufferFromString(), and registers a deallocator.
      Returns:
      TF_Buffer created, or null if proto is null or empty. Do not call TF_DeleteBuffer() on it.
    • copyData

      public byte[] copyData()
      Returns a copy of the data in a Java array
      Throws:
      IndexOutOfBoundsException - if too large.
    • dataAsByteBuffer

      public ByteBuffer dataAsByteBuffer()
      Returns the data of this buffer as a ByteBuffer
      Throws:
      IndexOutOfBoundsException - if too large.
    • delete

      public void delete()
      Calls the deallocator, if registered, otherwise has no effect.