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 /test/com/jogamp/opencl | |
parent | 8cc4dacf765452fb10c3f16076b26955994f2b80 (diff) |
fixed compiler redundant-casts warnings due to language level changes in gluegen-rt.
Diffstat (limited to 'test/com/jogamp/opencl')
-rw-r--r-- | test/com/jogamp/opencl/HighLevelBindingTest.java | 4 | ||||
-rw-r--r-- | test/com/jogamp/opencl/LowLevelBindingTest.java | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/test/com/jogamp/opencl/HighLevelBindingTest.java b/test/com/jogamp/opencl/HighLevelBindingTest.java index 6b66e762..749db3a6 100644 --- a/test/com/jogamp/opencl/HighLevelBindingTest.java +++ b/test/com/jogamp/opencl/HighLevelBindingTest.java @@ -40,6 +40,7 @@ import com.jogamp.opencl.CLDevice.LocalMemType; import com.jogamp.opencl.CLDevice.Type; import com.jogamp.opencl.CLDevice.Capabilities; import java.io.IOException; +import java.io.InputStream; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.EnumSet; @@ -285,7 +286,8 @@ public class HighLevelBindingTest { out.println("max FLOPS device: " + context.getMaxFlopsDevice()); - CLProgram program = context.createProgram(getClass().getResourceAsStream("testkernels.cl")).build(); + InputStream stream = getClass().getResourceAsStream("testkernels.cl"); + CLProgram program = context.createProgram(stream).build(); CLDevice[] programDevices = program.getCLDevices(); CLDevice device = programDevices[0]; diff --git a/test/com/jogamp/opencl/LowLevelBindingTest.java b/test/com/jogamp/opencl/LowLevelBindingTest.java index 27f71554..d5ef3f50 100644 --- a/test/com/jogamp/opencl/LowLevelBindingTest.java +++ b/test/com/jogamp/opencl/LowLevelBindingTest.java @@ -228,7 +228,7 @@ public class LowLevelBindingTest { checkForError(ret); long platform = pb.get(0); - PointerBuffer properties = (PointerBuffer)PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) + PointerBuffer properties = PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM) .put(platform).put(0) // 0 terminated array .rewind(); long context = cl.clCreateContextFromType(properties, CL.CL_DEVICE_TYPE_ALL, null, null); @@ -284,7 +284,7 @@ public class LowLevelBindingTest { // Create the program - PointerBuffer lengths = (PointerBuffer)PointerBuffer.allocateDirect(1).put(programSource.length()).rewind(); + PointerBuffer lengths = PointerBuffer.allocateDirect(1).put(programSource.length()).rewind(); final long program = cl.clCreateProgramWithSource(context, 1, new String[] {programSource}, lengths, intBuffer); out.println("program id: "+program); checkError("on clCreateProgramWithSource", intBuffer.get(0)); @@ -370,8 +370,8 @@ public class LowLevelBindingTest { checkError("on clEnqueueWriteBuffer", ret); // Launch kernel - PointerBuffer gWS = (PointerBuffer) PointerBuffer.allocateDirect(1).put(globalWorkSize).rewind(); - PointerBuffer lWS = (PointerBuffer) PointerBuffer.allocateDirect(1).put(localWorkSize).rewind(); + PointerBuffer gWS = PointerBuffer.allocateDirect(1).put(globalWorkSize).rewind(); + PointerBuffer lWS = PointerBuffer.allocateDirect(1).put(localWorkSize).rewind(); ret = cl.clEnqueueNDRangeKernel(commandQueue, kernel, 1, null, gWS, lWS, 0, null, null); checkError("on clEnqueueNDRangeKernel", ret); |