diff options
author | Michael Bien <[email protected]> | 2010-02-22 12:47:41 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-02-22 12:47:41 +0100 |
commit | 7c83da1d2e3e8d122e562408a63a13928cc97c83 (patch) | |
tree | 78957152423cc8b3623feae6b7376e047b0d04ae /src/com/mbien/opencl/CLPlatform.java | |
parent | b014104bc4d2c7b05767bf5364b8b972474850d1 (diff) |
several small refactorings, api and javadoc improvements.
added automatically generated specialized CLExceptions for each known OpenCL error.
added get/set Properties to CLCommandQueue.
Diffstat (limited to 'src/com/mbien/opencl/CLPlatform.java')
-rw-r--r-- | src/com/mbien/opencl/CLPlatform.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/mbien/opencl/CLPlatform.java b/src/com/mbien/opencl/CLPlatform.java index c3b1a1f2..687cf130 100644 --- a/src/com/mbien/opencl/CLPlatform.java +++ b/src/com/mbien/opencl/CLPlatform.java @@ -2,7 +2,6 @@ package com.mbien.opencl; import com.mbien.opencl.impl.CLImpl; import com.sun.gluegen.runtime.PointerBuffer; -import com.sun.gluegen.runtime.ProcAddressHelper; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; @@ -77,11 +76,20 @@ public final class CLPlatform { /** * Returns the low level binding interface to the OpenCL APIs. */ - public static CL getLowLevelBinding() { + public static CL getLowLevelCLInterface() { return cl; } /** + * Hint to allow the implementation to release the resources allocated by the OpenCL compiler. + * Calls to {@link CLProgram#build()} after unloadCompiler will reload the compiler if necessary. + */ + public static void unloadCompiler() { + int ret = cl.clUnloadCompiler(); + checkForError(ret, "error while sending unload compiler hint"); + } + + /** * Lists all physical devices available on this platform. * @see #listCLDevices(com.mbien.opencl.CLDevice.Type) */ |