Interface DataBufferFactory


  • public interface DataBufferFactory
    • Method Detail

      • setAllocationMode

        void setAllocationMode​(DataBuffer.AllocationMode allocationMode)
        Setter for the allocation mode
        Parameters:
        allocationMode -
      • create

        DataBuffer create​(DataBuffer underlyingBuffer,
                          long offset,
                          long length)
        Create a databuffer wrapping another one this allows you to create a view of a buffer with a different offset and length backed by the same storage
        Parameters:
        underlyingBuffer - the underlying buffer to get the storage from
        offset - the offset to view the data as
        length - the length of the buffer
        Returns:
        the databuffer as a view
      • create

        DataBuffer create​(ByteBuffer underlyingBuffer,
                          DataType type,
                          long length,
                          long offset)
        Creates a DataBuffer from java.nio.ByteBuffer
        Parameters:
        underlyingBuffer -
        offset -
        length -
        Returns:
      • createDouble

        DataBuffer createDouble​(long offset,
                                int length)
        Create a double data buffer
        Returns:
        the new data buffer
      • createSame

        DataBuffer createSame​(DataBuffer buffer,
                              boolean init)
        This method will create new DataBuffer of the same dataType & same length
        Parameters:
        buffer -
        Returns:
      • createSame

        DataBuffer createSame​(DataBuffer buffer,
                              boolean init,
                              MemoryWorkspace workspace)
        This method will create new DataBuffer of the same dataType & same length
        Parameters:
        buffer -
        Returns:
      • createFloat

        DataBuffer createFloat​(long offset,
                               int length)
        Create a float data buffer
        Parameters:
        length - the length of the buffer
        Returns:
        the new data buffer
      • createInt

        DataBuffer createInt​(long offset,
                             int length)
        Create an int data buffer
        Parameters:
        length - the length of the data buffer
        Returns:
        the create data buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                int[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(long offset,
                               int[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long offset,
                             int[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                double[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                byte[] data,
                                int length)
        Create a double buffer
        Parameters:
        data -
        length -
        Returns:
      • createFloat

        DataBuffer createFloat​(long offset,
                               byte[] data,
                               int length)
        Create a double buffer
        Parameters:
        data -
        length -
        Returns:
      • createFloat

        DataBuffer createFloat​(long offset,
                               double[] data)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long offset,
                             double[] data)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                float[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(long offset,
                               float[] data)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long offset,
                             float[] data)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                int[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(long offset,
                               int[] data,
                               boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long offset,
                             int[] data,
                             boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                double[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(long offset,
                               double[] data,
                               boolean copy)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long offset,
                             double[] data,
                             boolean copy)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long offset,
                                float[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(long offset,
                               float[] data,
                               boolean copy)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long offset,
                             float[] data,
                             boolean copy)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long length)
        Create a double data buffer
        Returns:
        the new data buffer
      • createDouble

        DataBuffer createDouble​(long length,
                                boolean initialize)
        Create a double data buffer, with optional initialization
        Parameters:
        initialize - If true: initialize the buffer. If false: don't initialize.
        Returns:
        the new data buffer
      • createFloat

        DataBuffer createFloat​(long length)
        Create a float data buffer
        Parameters:
        length - the length of the buffer
        Returns:
        the new data buffer
      • createFloat

        DataBuffer createFloat​(long length,
                               boolean initialize)
        Create a float data buffer, with optional initialization
        Parameters:
        length - the length of the buffer
        initialize - If true: initialize the buffer. If false: don't initialize.
        Returns:
        the new data buffer
      • createInt

        DataBuffer createInt​(long length)
        Create an int data buffer
        Parameters:
        length - the length of the data buffer
        Returns:
        the create data buffer
      • createBFloat16

        DataBuffer createBFloat16​(long length)
      • createByte

        DataBuffer createByte​(long length)
      • createShort

        DataBuffer createShort​(long length)
      • createBool

        DataBuffer createBool​(long length)
      • createUShort

        DataBuffer createUShort​(long length)
      • createUInt

        DataBuffer createUInt​(long length)
      • createUByte

        DataBuffer createUByte​(long length)
      • createULong

        DataBuffer createULong​(long length)
      • createBFloat16

        DataBuffer createBFloat16​(long length,
                                  boolean initialize)
      • createByte

        DataBuffer createByte​(long length,
                              boolean initialize)
      • createShort

        DataBuffer createShort​(long length,
                               boolean initialize)
      • createBool

        DataBuffer createBool​(long length,
                              boolean initialize)
      • createUShort

        DataBuffer createUShort​(long length,
                                boolean initialize)
      • createUInt

        DataBuffer createUInt​(long length,
                              boolean initialize)
      • createUByte

        DataBuffer createUByte​(long length,
                               boolean initialize)
      • createULong

        DataBuffer createULong​(long length,
                               boolean initialize)
      • createInt

        DataBuffer createInt​(long length,
                             boolean initialize)
        Create an int data buffer, with optional initialization
        Parameters:
        length - the length of the data buffer
        initialize - If true: initialize the buffer. If false: don't initialize.
        Returns:
        the create data buffer
      • createLong

        DataBuffer createLong​(long[] data)
      • createLong

        DataBuffer createLong​(long[] data,
                              boolean copy)
      • createLong

        DataBuffer createLong​(long length)
      • createLong

        DataBuffer createLong​(long length,
                              boolean initialize)
        Create an int data buffer, with optional initialization
        Parameters:
        length - the length of the data buffer
        initialize - If true: initialize the buffer. If false: don't initialize.
        Returns:
        the create data buffer
      • createDouble

        DataBuffer createDouble​(int[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(int[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(int[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(double[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(double[] data)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(double[] data)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(float[] data)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(float[] data)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(float[] data)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(int[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(int[] data,
                               boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(int[] data,
                             boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createLong

        DataBuffer createLong​(int[] data,
                              boolean copy)
        Creates a long data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(long[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(long[] data,
                               boolean copy)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(long[] data,
                             boolean copy)
        Creates a int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(double[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(double[] data,
                                MemoryWorkspace workspace)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(double[] data,
                                boolean copy,
                                MemoryWorkspace workspace)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(double[] data,
                               boolean copy)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(double[] data,
                             boolean copy)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createDouble

        DataBuffer createDouble​(float[] data,
                                boolean copy)
        Creates a double data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createFloat

        DataBuffer createFloat​(float[] data,
                               boolean copy)
        Creates a float data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createInt

        DataBuffer createInt​(float[] data,
                             boolean copy)
        Creates an int data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • create

        DataBuffer create​(org.bytedeco.javacpp.Pointer pointer,
                          DataType type,
                          long length,
                          org.bytedeco.javacpp.indexer.Indexer indexer)
        Create a data buffer based on the given pointer, data buffer opType, and length of the buffer
        Parameters:
        pointer - the pointer to use
        type - the opType of buffer
        length - the length of the buffer
        indexer -
        Returns:
        the data buffer backed by this pointer with the given opType and length.
      • create

        DataBuffer create​(org.bytedeco.javacpp.Pointer pointer,
                          org.bytedeco.javacpp.Pointer specialPointer,
                          DataType type,
                          long length,
                          org.bytedeco.javacpp.indexer.Indexer indexer)
      • create

        DataBuffer create​(org.bytedeco.javacpp.DoublePointer doublePointer,
                          long length)
        Parameters:
        doublePointer -
        length -
        Returns:
      • create

        DataBuffer create​(org.bytedeco.javacpp.IntPointer intPointer,
                          long length)
        Parameters:
        intPointer -
        length -
        Returns:
      • create

        DataBuffer create​(org.bytedeco.javacpp.FloatPointer floatPointer,
                          long length)
        Parameters:
        floatPointer -
        length -
        Returns:
      • createHalf

        DataBuffer createHalf​(long length)
        Creates half-precision data buffer
        Parameters:
        length - length of new data buffer
        Returns:
      • createHalf

        DataBuffer createHalf​(long length,
                              boolean initialize)
        Creates half-precision data buffer
        Parameters:
        length - length of new data buffer
        initialize - true if memset should be used on allocated memory, false otherwise
        Returns:
      • createHalf

        DataBuffer createHalf​(float[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(double[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              double[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              float[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              int[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              double[] data)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              float[] data)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              int[] data)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              byte[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(int[] data,
                              boolean copy)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(float[] data)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(double[] data)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(int[] data)
        Creates a half-precision data buffer
        Parameters:
        data - the data to create the buffer from
        Returns:
        the new buffer
      • createHalf

        DataBuffer createHalf​(long offset,
                              int length)
        Creates a half-precision data buffer
        Returns:
        the new buffer
      • createUtf8Buffer

        DataBuffer createUtf8Buffer​(byte[] data,
                                    long product)