summaryrefslogtreecommitdiffstats
path: root/test/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'test/com/jogamp')
-rw-r--r--test/com/jogamp/opencl/HighLevelBindingTest.java4
-rw-r--r--test/com/jogamp/opencl/LowLevelBindingTest.java8
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);