diff options
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) */ |