summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/util/concurrent/CLTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/util/concurrent/CLTask.java')
-rw-r--r--src/com/jogamp/opencl/util/concurrent/CLTask.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/com/jogamp/opencl/util/concurrent/CLTask.java b/src/com/jogamp/opencl/util/concurrent/CLTask.java
index 287dc32c..25f9fd4c 100644
--- a/src/com/jogamp/opencl/util/concurrent/CLTask.java
+++ b/src/com/jogamp/opencl/util/concurrent/CLTask.java
@@ -29,35 +29,19 @@
*/
package com.jogamp.opencl.util.concurrent;
-import com.jogamp.opencl.CLCommandQueue;
-
/**
* A task executed on a command queue.
* @author Michael Bien
*/
-public abstract class CLTask<C extends CLQueueContext, R> {
-
-
- /**
- * Creates a CLQueueContext for this task. A context may contain static resources
- * like OpenCL program binaries or pre allocated buffers. A context can be used by an group
- * of tasks identified by a common context key ({@link #getContextKey()}). This method
- * won't be called if a context was already created by an previously executed task having the
- * same context key.
- */
- public abstract C createQueueContext(CLCommandQueue queue);
+public abstract class CLTask<C extends CLQueueContext, R> implements CLPoolable<C, R> {
/**
* Returns the context key for this task. Default implementation returns {@link #getClass()}.
*/
+ @Override
public Object getContextKey() {
return getClass();
}
- /**
- * Runs the task on a queue and returns a result.
- */
- public abstract R execute(C context);
-
}