Interface MemoryStrategy


  • public interface MemoryStrategy
    • Method Detail

      • setData

        void setData​(DataBuffer buffer,
                     int offset,
                     int stride,
                     int length)
        Set the data for the buffer
        Parameters:
        buffer - the buffer to set
        offset - the offset to start at
        stride - the stride to sue
        length - the length to go till
      • setData

        void setData​(DataBuffer buffer,
                     int offset)
        Parameters:
        buffer -
        offset -
      • copyToHost

        Object copyToHost​(DataBuffer copy,
                          int offset)
        Copy data to native or gpu
        Parameters:
        copy - the buffer to copy
        Returns:
        a pointer representing the copied data
      • alloc

        Object alloc​(DataBuffer buffer,
                     int stride,
                     int offset,
                     int length)
        Allocate memory for the given buffer
        Parameters:
        buffer - the buffer to allocate for
        stride - the stride
        offset - the offset used for the buffer on allocation
        length - length
      • free

        void free​(DataBuffer buffer,
                  int offset,
                  int length)
        Free the buffer wrt the allocation strategy
        Parameters:
        buffer - the buffer to free
        offset - the offset to free
        length - the length to free