summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLMemory.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-22 12:47:41 +0100
committerMichael Bien <[email protected]>2010-02-22 12:47:41 +0100
commit7c83da1d2e3e8d122e562408a63a13928cc97c83 (patch)
tree78957152423cc8b3623feae6b7376e047b0d04ae /src/com/mbien/opencl/CLMemory.java
parentb014104bc4d2c7b05767bf5364b8b972474850d1 (diff)
several small refactorings, api and javadoc improvements.
added automatically generated specialized CLExceptions for each known OpenCL error. added get/set Properties to CLCommandQueue.
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);