Class GPUMemoryPool.InternalMemory<D>

java.lang.Object
org.boxutil.units.standard.GPUMemoryPool.InternalMemory<D>
All Implemented Interfaces:
Comparable<GPUMemory<D>>, GPUMemory<D>
Enclosing class:
GPUMemoryPool<T extends GPUMemoryPool.InternalMemory<D>,D>

public static class GPUMemoryPool.InternalMemory<D> extends Object implements GPUMemory<D>
Do not forget override the GPUMemory.meta() if you need.
  • Field Details

    • _index

      protected int _index
    • address

      protected long address
    • size

      protected long size
    • ref

      protected final AtomicInteger ref
  • Constructor Details

    • InternalMemory

      public InternalMemory(D meta, long address, long size, int index, boolean isFree)
  • Method Details

    • reference

      public int reference()
      Specified by:
      reference in interface GPUMemory<D>
    • address

      public long address()
      Description copied from interface: GPUMemory
      The corresponding offset on GPU object memory, without reserved space of memory pool.
      Specified by:
      address in interface GPUMemory<D>
    • size

      public long size()
      Description copied from interface: GPUMemory
      The corresponding length on GPU object memory.
      Specified by:
      size in interface GPUMemory<D>
    • _getIndex

      public int _getIndex()
    • _setIndex

      public void _setIndex(int value)
    • _indexIncrement

      public void _indexIncrement()
    • _indexDecrement

      public void _indexDecrement()
    • _indexAdd

      public void _indexAdd(int value)
    • _indexSub

      public void _indexSub(int value)
    • _setAddress

      public void _setAddress(long value)
    • _setSize

      public void _setSize(long value)
    • _setRef

      public void _setRef(int value)
    • _refIncrement

      public void _refIncrement()
    • _refDecrement

      public void _refDecrement()
    • afterAddressChanged

      public void afterAddressChanged()
    • afterSizeChanged

      public void afterSizeChanged()
    • afterAllocatedFromFree

      public void afterAllocatedFromFree(D meta)
    • afterSplitFrom

      public void afterSplitFrom(GPUMemoryPool.InternalMemory<D> src)
    • afterFree

      public void afterFree()