Interface CommonKernelServices
- All Superinterfaces:
CLResources
Generic kernel operations on GPU data
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic 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 ofgroupSize
greater thanvalue
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
-
MAX_GROUP_SIZE
static final int MAX_GROUP_SIZE- See Also:
-
WARP_GROUP_SIZE
static final int WARP_GROUP_SIZE- See Also:
-
-
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 integerscount
- 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 initializedsize
- Size of the buffervalue
- to fill the buffer with
-
getNearestGreaterMultiple
static int getNearestGreaterMultiple(int value, int groupSize) Returns nearest multiple ofgroupSize
greater thanvalue
- Parameters:
value
- valuegroupSize
- size of group- Returns:
- nearest greater multiple
-