aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-06-19 22:55:15 +0200
committerMichael Bien <[email protected]>2011-06-19 22:55:15 +0200
commit3016f4fe04dcabdd82d2475a7c23d3b47e1c8766 (patch)
treef9c03cca77f65dea6094c156ad7e8edb70b2f389 /test
parent826dacffbae941a35a7cc74515751ddb1d5711a2 (diff)
CLKernel short setters, setArgs(Object... values) for convenient initialization.
Diffstat (limited to 'test')
-rw-r--r--test/com/jogamp/opencl/CLProgramTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/com/jogamp/opencl/CLProgramTest.java b/test/com/jogamp/opencl/CLProgramTest.java
index 4d3b0cf..d083c77 100644
--- a/test/com/jogamp/opencl/CLProgramTest.java
+++ b/test/com/jogamp/opencl/CLProgramTest.java
@@ -270,7 +270,7 @@ public class CLProgramTest {
@Test
public void kernelTest() {
- String source = "__attribute__((reqd_work_group_size(1, 1, 1))) kernel void foo(float a, int b) { }\n";
+ String source = "__attribute__((reqd_work_group_size(1, 1, 1))) kernel void foo(float a, int b, short c) { }\n";
CLContext context = CLContext.create();
@@ -297,13 +297,16 @@ public class CLProgramTest {
kernel.putArg(2);
assertEquals(2, kernel.position());
+
+ kernel.putArg((short)3);
+ assertEquals(3, kernel.position());
try{
kernel.putArg(3);
fail("exception not thrown");
}catch (IndexOutOfBoundsException expected){ }
- assertEquals(2, kernel.position());
+ assertEquals(3, kernel.position());
assertEquals(0, kernel.rewind().position());
}finally{