diff options
author | Michael Bien <[email protected]> | 2011-02-13 13:57:31 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-02-13 13:57:31 +0100 |
commit | e4f978fef8c2805413190f356f9101f6cd3a56cc (patch) | |
tree | 3419bbe81a1b51f3653383094c53918779ef5fd4 /src/com | |
parent | 8cc4dacf765452fb10c3f16076b26955994f2b80 (diff) |
fixed compiler redundant-casts warnings due to language level changes in gluegen-rt.
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/jogamp/opencl/CLBuffer.java | 3 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLCommandQueue.java | 6 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLContext.java | 2 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLDevice.java | 2 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLEventList.java | 1 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLProgram.java | 2 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLContext.java | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/src/com/jogamp/opencl/CLBuffer.java b/src/com/jogamp/opencl/CLBuffer.java index d1cb5670..fed7db11 100644 --- a/src/com/jogamp/opencl/CLBuffer.java +++ b/src/com/jogamp/opencl/CLBuffer.java @@ -102,7 +102,7 @@ public class CLBuffer<B extends Buffer> extends CLMemory<B> { B slice = null; if(buffer != null) { - slice = (B)Buffers.slice(buffer, offset, size); + slice = Buffers.slice(buffer, offset, size); int elemSize = Buffers.sizeOfBufferElem(buffer); offset *= elemSize; size *= elemSize; @@ -141,6 +141,7 @@ public class CLBuffer<B extends Buffer> extends CLMemory<B> { /** * Returns the list of subbuffers. */ + @SuppressWarnings("unchecked") public List<CLSubBuffer<B>> getSubBuffers() { if(childs == null) { return Collections.EMPTY_LIST; diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java index a9955797..15fd1480 100644 --- a/src/com/jogamp/opencl/CLCommandQueue.java +++ b/src/com/jogamp/opencl/CLCommandQueue.java @@ -1693,7 +1693,7 @@ public class CLCommandQueue extends CLObject implements CLResource { } private static PointerBuffer copy2NIO(PointerBuffer buffer, long a) { - return (PointerBuffer) buffer.put(2, a).position(2); + return buffer.put(2, a).position(2); } // private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b) { @@ -1705,11 +1705,11 @@ public class CLCommandQueue extends CLObject implements CLResource { // } private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b) { - return (PointerBuffer) ((PointerBuffer)buffer.position(1)).put(a).put(b).position(1); + return buffer.position(1).put(a).put(b).position(1); } private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b, long c) { - return (PointerBuffer) ((PointerBuffer)buffer.rewind()).put(a).put(b).put(c).rewind(); + return buffer.rewind().put(a).put(b).put(c).rewind(); } private static String toStr(PointerBuffer buffer) { diff --git a/src/com/jogamp/opencl/CLContext.java b/src/com/jogamp/opencl/CLContext.java index 240f6d00..a5f4e52e 100644 --- a/src/com/jogamp/opencl/CLContext.java +++ b/src/com/jogamp/opencl/CLContext.java @@ -236,7 +236,7 @@ public class CLContext extends CLObject implements CLResource { throw new RuntimeException("no OpenCL installation found"); } - return (PointerBuffer)PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) + return PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) .put(platform.ID).put(0) // 0 terminated array .rewind(); } diff --git a/src/com/jogamp/opencl/CLDevice.java b/src/com/jogamp/opencl/CLDevice.java index 8d45a116..fd1d93f3 100644 --- a/src/com/jogamp/opencl/CLDevice.java +++ b/src/com/jogamp/opencl/CLDevice.java @@ -354,7 +354,7 @@ public final class CLDevice extends CLObject { } /** - * Returns the maximal allocatable memory on this device. + * Returns the largest allocatable size of a {@link CLBuffer} on this device. */ @CLProperty("CL_DEVICE_MAX_MEM_ALLOC_SIZE") public long getMaxMemAllocSize() { diff --git a/src/com/jogamp/opencl/CLEventList.java b/src/com/jogamp/opencl/CLEventList.java index c20a1f82..03a6f838 100644 --- a/src/com/jogamp/opencl/CLEventList.java +++ b/src/com/jogamp/opencl/CLEventList.java @@ -82,6 +82,7 @@ public final class CLEventList implements CLResource, AutoCloseable, Iterable<CL /** * @deprecated use {@link #release()} instead. */ + @Deprecated public final void close() throws Exception { release(); } diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java index 323e9b34..3cb63003 100644 --- a/src/com/jogamp/opencl/CLProgram.java +++ b/src/com/jogamp/opencl/CLProgram.java @@ -75,7 +75,7 @@ public class CLProgram extends CLObject implements CLResource { IntBuffer status = newDirectIntBuffer(1); - PointerBuffer length = (PointerBuffer)PointerBuffer.allocateDirect(1).put(0, src.length()); + PointerBuffer length = PointerBuffer.allocateDirect(1).put(0, src.length()); String[] srcArray = new String[] {src}; // Create the program diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java index fc3d34aa..c220fcfc 100644 --- a/src/com/jogamp/opencl/gl/CLGLContext.java +++ b/src/com/jogamp/opencl/gl/CLGLContext.java @@ -197,7 +197,7 @@ public final class CLGLContext extends CLContext { throw new RuntimeException("unsupported GLContext: "+glContext); } - return (PointerBuffer)properties.put(0).rewind(); // 0 terminated array + return properties.put(0).rewind(); // 0 terminated array } // Buffers |