summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLKernel.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/CLKernel.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/CLKernel.java')
-rw-r--r--src/com/mbien/opencl/CLKernel.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index eb817f14..a8c1ff10 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -91,6 +91,11 @@ public class CLKernel implements CLResource, Cloneable {
return this;
}
+ public CLKernel rewind() {
+ argIndex = 0;
+ return this;
+ }
+
public CLKernel setArg(int argumentIndex, CLMemory<?> value) {
setArgument(argumentIndex, CPU.is32Bit()?4:8, wrap(value.ID));
return this;
@@ -157,6 +162,10 @@ public class CLKernel implements CLResource, Cloneable {
this.force32BitArgs = force;
return this;
}
+
+ public CLProgram getProgram() {
+ return program;
+ }
/**
* @see #setForce32BitArgs(boolean)
@@ -181,11 +190,6 @@ public class CLKernel implements CLResource, Cloneable {
return buffer.putLong(value).rewind();
}
- public CLKernel rewind() {
- argIndex = 0;
- return this;
- }
-
/**
* Releases all resources of this kernel from its context.
*/