diff options
author | Michael Bien <[email protected]> | 2010-01-18 15:24:29 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-01-18 15:24:29 +0100 |
commit | 09ac312a0645bd0d9adff580f29f20382dfbf8c9 (patch) | |
tree | 52e121e8c366c797f34008244243dd896cc1e88a /test/com/mbien | |
parent | c4aeea288271f57b3c8640a8cd4ba87d1c331814 (diff) |
introduced CLMemory as superclass for all memory objects.
added CLImage, CLImage2d and CLImage3d.
Diffstat (limited to 'test/com/mbien')
-rw-r--r-- | test/com/mbien/opencl/CLBufferTest.java | 8 | ||||
-rw-r--r-- | test/com/mbien/opencl/CLConcurrencyTest.java | 2 | ||||
-rw-r--r-- | test/com/mbien/opencl/HighLevelBindingTest.java | 14 | ||||
-rw-r--r-- | test/com/mbien/opencl/LowLevelBindingTest.java | 1 |
4 files changed, 13 insertions, 12 deletions
diff --git a/test/com/mbien/opencl/CLBufferTest.java b/test/com/mbien/opencl/CLBufferTest.java index 5395ef6f..c6b87290 100644 --- a/test/com/mbien/opencl/CLBufferTest.java +++ b/test/com/mbien/opencl/CLBufferTest.java @@ -1,6 +1,6 @@ package com.mbien.opencl; -import com.mbien.opencl.CLBuffer.Mem; +import com.mbien.opencl.CLMemory.Mem; import com.sun.opengl.util.BufferUtil; import java.nio.ByteBuffer; import org.junit.Test; @@ -77,11 +77,11 @@ public class CLBufferTest { .putReadBuffer(clBufferB, true) // read B .finish(); - assertEquals(2, context.getCLBuffers().size()); + assertEquals(2, context.getCLMemoryObjects().size()); clBufferA.release(); - assertEquals(1, context.getCLBuffers().size()); + assertEquals(1, context.getCLMemoryObjects().size()); clBufferB.release(); - assertEquals(0, context.getCLBuffers().size()); + assertEquals(0, context.getCLMemoryObjects().size()); // uploading worked when a==b. out.println("validating computed results..."); diff --git a/test/com/mbien/opencl/CLConcurrencyTest.java b/test/com/mbien/opencl/CLConcurrencyTest.java index dfaa4e49..bcd290ad 100644 --- a/test/com/mbien/opencl/CLConcurrencyTest.java +++ b/test/com/mbien/opencl/CLConcurrencyTest.java @@ -1,6 +1,6 @@ package com.mbien.opencl; -import com.mbien.opencl.CLBuffer.Mem; +import com.mbien.opencl.CLMemory.Mem; import java.io.IOException; import java.nio.ByteBuffer; import org.junit.Test; diff --git a/test/com/mbien/opencl/HighLevelBindingTest.java b/test/com/mbien/opencl/HighLevelBindingTest.java index 84c2a33b..d28dd042 100644 --- a/test/com/mbien/opencl/HighLevelBindingTest.java +++ b/test/com/mbien/opencl/HighLevelBindingTest.java @@ -1,6 +1,6 @@ package com.mbien.opencl; -import com.mbien.opencl.CLBuffer.Mem; +import com.mbien.opencl.CLMemory.Mem; import com.mbien.opencl.CLCommandQueue.Mode; import com.mbien.opencl.CLDevice.FPConfig; import java.io.IOException; @@ -169,17 +169,17 @@ public class HighLevelBindingTest { out.print(dest.getInt()+", "); out.println("...; "+dest.remaining()/SIZEOF_INT + " more"); - assertTrue(3 == context.getCLBuffers().size()); + assertTrue(3 == context.getCLMemoryObjects().size()); clBufferA.release(); - assertTrue(2 == context.getCLBuffers().size()); + assertTrue(2 == context.getCLMemoryObjects().size()); - assertTrue(2 == context.getCLBuffers().size()); + assertTrue(2 == context.getCLMemoryObjects().size()); clBufferB.release(); - assertTrue(1 == context.getCLBuffers().size()); + assertTrue(1 == context.getCLMemoryObjects().size()); - assertTrue(1 == context.getCLBuffers().size()); + assertTrue(1 == context.getCLMemoryObjects().size()); clBufferC.release(); - assertTrue(0 == context.getCLBuffers().size()); + assertTrue(0 == context.getCLMemoryObjects().size()); assertTrue(1 == context.getCLPrograms().size()); diff --git a/test/com/mbien/opencl/LowLevelBindingTest.java b/test/com/mbien/opencl/LowLevelBindingTest.java index 94b86e71..f8021851 100644 --- a/test/com/mbien/opencl/LowLevelBindingTest.java +++ b/test/com/mbien/opencl/LowLevelBindingTest.java @@ -186,6 +186,7 @@ public class LowLevelBindingTest { int ret = CL.CL_SUCCESS; int[] intArray = new int[1]; + //TODO properties not allowed to be null long context = cl.clCreateContextFromType(null, CL.CL_DEVICE_TYPE_ALL, null, null, null); out.println("context handle: "+context); |