diff options
author | Michael Bien <[email protected]> | 2011-05-09 17:30:19 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-05-09 17:30:19 +0200 |
commit | 1c38b7ef96910260b64843214279ac4683005609 (patch) | |
tree | d0d2c38da50a94e13f7ed2c90db0f44a1b678ae4 /src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java | |
parent | c59bc50229181ab9cb0e5012d7bb5caf2faa781f (diff) |
added submitAll() utility method
junit test now covering queue contexts switching
improved javadoc.
Diffstat (limited to 'src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java')
-rw-r--r-- | src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java b/src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java index 64fdfbcd..58f389bf 100644 --- a/src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java +++ b/src/com/jogamp/opencl/util/concurrent/CLQueueContextFactory.java @@ -5,9 +5,10 @@ package com.jogamp.opencl.util.concurrent; import com.jogamp.opencl.CLCommandQueue; import com.jogamp.opencl.CLProgram; +import com.jogamp.opencl.util.concurrent.CLQueueContext.CLSimpleQueueContext; /** - * + * Creates {@link CLQueueContext}s. * @author Michael Bien */ public abstract class CLQueueContextFactory<C extends CLQueueContext> { @@ -27,7 +28,11 @@ public abstract class CLQueueContextFactory<C extends CLQueueContext> { return new CLSimpleContextFactory(source); } - public static class CLSimpleContextFactory extends CLQueueContextFactory<CLQueueContext.CLSimpleQueueContext> { + /** + * Creates {@link CLSimpleQueueContext}s containing a precompiled program. + * @author Michael Bien + */ + public static class CLSimpleContextFactory extends CLQueueContextFactory<CLSimpleQueueContext> { private final String source; @@ -36,9 +41,9 @@ public abstract class CLQueueContextFactory<C extends CLQueueContext> { } @Override - public CLQueueContext.CLSimpleQueueContext setup(CLCommandQueue queue, CLQueueContext old) { + public CLSimpleQueueContext setup(CLCommandQueue queue, CLQueueContext old) { CLProgram program = queue.getContext().createProgram(source).build(queue.getDevice()); - return new CLQueueContext.CLSimpleQueueContext(queue, program); + return new CLSimpleQueueContext(queue, program); } } |