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
Resizable buffer of GPU memory. Can be populated on host-side.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionWriteBufferGPU
(com.jogamp.opencl.CLContext clContext) Creates Write Buffer in specified OpenCl Context with default element size set to 1protected
WriteBufferGPU
(com.jogamp.opencl.CLContext clContext, int elementSize) Creates Write Buffer in specified OpenCl Context with given element size -
Method Summary
Modifier and TypeMethodDescriptionGets data, that are currently copied to GPUabstract void
Populated buffer with desired elements.abstract void
Copies contents to GPUMethods inherited from class cz.fidentis.analyst.opencl.memory.BufferGPU
allocateBuffer, get, getClContext, getCount, getElementSize, getQueue, getSize, resize, resizeSubBuffer, rewind
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cz.fidentis.analyst.opencl.memory.CLResources
release
-
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 ContextelementSize
- element size
-
-
Method Details
-
writeToGPU
public abstract void writeToGPU()Copies contents to GPU -
putAll
Populated buffer with desired elements. Overwrites previous data and resizes itself, if needed. Is asynchronous! Make sure to call finish() method before use -
getOriginalData
Gets data, that are currently copied to GPU- Returns:
- data
-