Interface CommonKernelServices

All Superinterfaces:
CLResources

public interface CommonKernelServices extends CLResources
Generic kernel operations on GPU data
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static com.jogamp.opencl.CLBuffer<FloatBuffer>
    calculateBBox(com.jogamp.opencl.CLContext clContext, com.jogamp.opencl.CLCommandQueue queue, WriteBufferGPU<javax.vecmath.Point3d> vertexBuffer)
    Calculates Bounding Box of buffer of vertices.
    static int
    getLargestInteger(com.jogamp.opencl.CLContext clContext, com.jogamp.opencl.CLCommandQueue queue, com.jogamp.opencl.CLBuffer<IntBuffer> intBuffer, int count)
    Reduces the buffer to find the largest integer.
    static int
    getNearestGreaterMultiple(int value, int groupSize)
    Returns nearest multiple of groupSize greater than value
    static void
    initializeBuffer(com.jogamp.opencl.CLContext clContext, com.jogamp.opencl.CLCommandQueue queue, com.jogamp.opencl.CLBuffer<IntBuffer> buffer, int size, int value)
    Initializes memory.

    Methods inherited from interface cz.fidentis.analyst.opencl.memory.CLResources

    release
  • Field Details

  • Method Details

    • calculateBBox

      static com.jogamp.opencl.CLBuffer<FloatBuffer> calculateBBox(com.jogamp.opencl.CLContext clContext, com.jogamp.opencl.CLCommandQueue queue, WriteBufferGPU<javax.vecmath.Point3d> vertexBuffer)
      Calculates Bounding Box of buffer of vertices.
      Parameters:
      vertexBuffer - Buffer of vertices. It is not modified during the process
      Returns:
      Buffer of 8 floats containing the bounding box
    • getLargestInteger

      static int getLargestInteger(com.jogamp.opencl.CLContext clContext, com.jogamp.opencl.CLCommandQueue queue, com.jogamp.opencl.CLBuffer<IntBuffer> intBuffer, int count)
      Reduces the buffer to find the largest integer. Wipes the buffer in the process
      Parameters:
      intBuffer - Buffer of integers
      count - Size of the buffer
      Returns:
      largest integer
    • initializeBuffer

      static void initializeBuffer(com.jogamp.opencl.CLContext clContext, com.jogamp.opencl.CLCommandQueue queue, com.jogamp.opencl.CLBuffer<IntBuffer> buffer, int size, int value)
      Initializes memory. Fills with values
      Parameters:
      buffer - GPU Buffer to be initialized
      size - Size of the buffer
      value - to fill the buffer with
    • getNearestGreaterMultiple

      static int getNearestGreaterMultiple(int value, int groupSize)
      Returns nearest multiple of groupSize greater than value
      Parameters:
      value - value
      groupSize - size of group
      Returns:
      nearest greater multiple