aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLMemory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/CLMemory.java')
-rw-r--r--src/com/mbien/opencl/CLMemory.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLMemory.java b/src/com/mbien/opencl/CLMemory.java
index 0c59e0c5..884744ad 100644
--- a/src/com/mbien/opencl/CLMemory.java
+++ b/src/com/mbien/opencl/CLMemory.java
@@ -91,6 +91,9 @@ public abstract class CLMemory <B extends Buffer> implements CLResource {
return sizeOfBufferElem(buffer) * buffer.capacity();
}
+ /**
+ * Returns the size of the allocated OpenCL memory.
+ */
public long getCLSize() {
PointerBuffer pb = PointerBuffer.allocateDirect(1);
int ret = cl.clGetMemObjectInfo(ID, CL_MEM_SIZE, PointerBuffer.elementSize(), pb.getBuffer(), null);