diff options
author | Michael Bien <[email protected]> | 2011-02-27 02:07:37 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-02-27 02:07:37 +0100 |
commit | 61d365bd7c352262bff711b3954731e7928c203f (patch) | |
tree | 38e4ebe7b19e80ca090090b6d722b0086df129a8 /src/com/jogamp/opencl/CLProgram.java | |
parent | ca1dee15d86d5c6327b3ffb6f4c85c6a5621e621 (diff) |
code review using findbugs
keyset iterations, typos, @Override, synchronization, varargs
Diffstat (limited to 'src/com/jogamp/opencl/CLProgram.java')
-rw-r--r-- | src/com/jogamp/opencl/CLProgram.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java index 3cb63003..544df117 100644 --- a/src/com/jogamp/opencl/CLProgram.java +++ b/src/com/jogamp/opencl/CLProgram.java @@ -96,10 +96,10 @@ public class CLProgram extends CLObject implements CLResource { PointerBuffer lengths = PointerBuffer.allocateDirect(binaries.size()); int i = 0; - Set<CLDevice> keys = binaries.keySet(); - for (CLDevice device : keys) { + for (Map.Entry<CLDevice, byte[]> entry : binaries.entrySet()) { - byte[] bytes = binaries.get(device); + byte[] bytes = entry.getValue(); + CLDevice device = entry.getKey(); devices.put(device.ID); lengths.put(bytes.length); @@ -337,6 +337,7 @@ public class CLProgram extends CLObject implements CLResource { BuildProgramCallback callback = null; if(listener != null) { callback = new BuildProgramCallback() { + @Override public void buildFinished(long cl_program) { buildLock.unlock(); listener.buildFinished(CLProgram.this); @@ -446,6 +447,7 @@ public class CLProgram extends CLObject implements CLResource { /** * Releases this program with its kernels. */ + @Override public void release() { releaseKernels(); |