From 7c83da1d2e3e8d122e562408a63a13928cc97c83 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Mon, 22 Feb 2010 12:47:41 +0100 Subject: several small refactorings, api and javadoc improvements. added automatically generated specialized CLExceptions for each known OpenCL error. added get/set Properties to CLCommandQueue. --- src/com/mbien/opencl/CLKernel.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/com/mbien/opencl/CLKernel.java') 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. */ -- cgit v1.2.3