Class WriteBufferGPU<T>

java.lang.Object
cz.fidentis.analyst.opencl.memory.BufferGPU<FloatBuffer>
cz.fidentis.analyst.opencl.memory.WriteBufferGPU<T>
Type Parameters:
T - Any type to be stored in buffer
All Implemented Interfaces:
CLResources
Direct Known Subclasses:
MeshTriangleBuffer, VoxelBuffer

public abstract class WriteBufferGPU<T> extends BufferGPU<FloatBuffer>
Resizable buffer of GPU memory. Can be populated on host-side.
  • Constructor Details

    • WriteBufferGPU

      public WriteBufferGPU(com.jogamp.opencl.CLContext clContext)
      Creates Write Buffer in specified OpenCl Context with default element size set to 1
      Parameters:
      clContext - OpenCl Context
    • WriteBufferGPU

      protected WriteBufferGPU(com.jogamp.opencl.CLContext clContext, int elementSize)
      Creates Write Buffer in specified OpenCl Context with given element size
      Parameters:
      clContext - OpenCl Context
      elementSize - element size
  • Method Details

    • writeToGPU

      public abstract void writeToGPU()
      Copies contents to GPU
    • putAll

      public abstract void putAll(List<T> points)
      Populated buffer with desired elements. Overwrites previous data and resizes itself, if needed. Is asynchronous! Make sure to call finish() method before use
    • getOriginalData

      public abstract List<T> getOriginalData()
      Gets data, that are currently copied to GPU
      Returns:
      data