summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLKernel.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-29 14:36:19 +0100
committerMichael Bien <[email protected]>2010-01-29 14:36:19 +0100
commit2015fa5cd47b9be234f30e4b98d06b83486e4fb2 (patch)
treea03a73f6875e06ebdf8a910d939556ee139a9cb2 /src/com/mbien/opencl/CLKernel.java
parentb0102cab5062eb8cb06329bff457d4dd5b9d0099 (diff)
splitted CLImageFormat into CLImageFormat and (generated) CLImageFormatImpl.
refactored CLProgram kernel creation code. updated tests.
Diffstat (limited to 'src/com/mbien/opencl/CLKernel.java')
-rw-r--r--src/com/mbien/opencl/CLKernel.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index 5e7330e7..cb03cf8e 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -19,7 +19,7 @@ import static com.mbien.opencl.CL.*;
* <code>kernel</code> function."
* @author Michael Bien
*/
-public class CLKernel implements CLResource {
+public class CLKernel implements CLResource/*, Cloneable*/ {
public final long ID;
public final String name;
@@ -129,7 +129,7 @@ public class CLKernel implements CLResource {
private final void setArgument(int argumentIndex, int size, Buffer value) {
if(argumentIndex >= numArgs || argumentIndex < 0) {
throw new IndexOutOfBoundsException("kernel "+ toString() +" has "+numArgs+
- " arguments, can not set argument number "+argumentIndex);
+ " arguments, can not set argument with index "+argumentIndex);
}
if(!program.isExecutable()) {
throw new IllegalStateException("can not set program" +
@@ -201,12 +201,13 @@ public class CLKernel implements CLResource {
hash = 43 * hash + (this.program != null ? this.program.hashCode() : 0);
return hash;
}
-
- CLKernel copy() {
- int[] err = new int[1];
- long newID = cl.clCreateKernel(program.ID, name, err, 0);
- checkForError(err[0], "can not copy kernel");
- return new CLKernel(program, newID);
- }
+
+ /**
+ * Returns a new instance of this kernel.
+ */
+// @Override
+// public CLKernel clone() {
+// return program.createCLKernel(name);
+// }
}