summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-06-20 22:40:29 +0200
committerMichael Bien <[email protected]>2011-06-20 22:40:29 +0200
commit2a4c30c9f0a479be370a3269aec7aa9b71939ddc (patch)
tree51d65b6f859e8f24e7b1ecdd1621875080d44905
parent16c4aaeb9002f9d79732648c1a15e9750c9de35c (diff)
utility create and init CLKernel method.
-rw-r--r--src/com/jogamp/opencl/CLProgram.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java
index ce844bf8..3fcee4a7 100644
--- a/src/com/jogamp/opencl/CLProgram.java
+++ b/src/com/jogamp/opencl/CLProgram.java
@@ -422,6 +422,19 @@ public class CLProgram extends CLObjectResource {
}
/**
+ * Creates a kernel with the specified kernel name and initializes it with the given arguments.
+ * @see CLKernel#setArgs(java.lang.Object[])
+ */
+ public CLKernel createCLKernel(String kernelName, Object... args) {
+
+ if(released) {
+ return null;
+ }
+
+ return createCLKernel(kernelName).setArgs(args);
+ }
+
+ /**
* Creates all kernels of this program and stores them a Map with the kernel name as key.
*/
public Map<String, CLKernel> createCLKernels() {