diff options
author | Michael Bien <[email protected]> | 2011-02-08 21:28:56 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-02-08 21:28:56 +0100 |
commit | 8e915ca25ddea1258a7c8db3e35e3a660d40775f (patch) | |
tree | 9c1bb39621bbbab75ea75d2115ac4e103d5079a2 /src | |
parent | 3ed09af3cf9322001d959d13672f6446ddaca643 (diff) |
improved javadoc.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/jogamp/opencl/CLPlatform.java | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java index 6658f00..1db3dcf 100644 --- a/src/com/jogamp/opencl/CLPlatform.java +++ b/src/com/jogamp/opencl/CLPlatform.java @@ -56,7 +56,32 @@ import static com.jogamp.opencl.CLException.*; import static com.jogamp.opencl.CL.*; /** - * CLPlatfrorm representing an OpenCL installation (e.g. graphics driver). + * CLPlatfrorm representing a OpenCL implementation (e.g. graphics driver). + * + * optional eager initialization: + * <p><pre> + * try{ + * CLPlatform.initialize(); + * }catch(JogampRuntimeException ex) { + * throw new RuntimeException("could not load Java OpenCL Binding"); + * } + * </pre></p> + * + * Example initialization: + * <p><pre> + * CLPlatform platform = CLPlatform.getDefault(type(GPU)); + * + * if(platform == null) { + * throw new RuntimeException("please update your graphics drivers"); + * } + * + * CLContext context = CLContext.create(platform.getMaxFlopsDevice()); + * try { + * // use it + * }finally{ + * context.release(); + * } + * </pre></p> * * @author Michael Bien * @see #initialize() |