summaryrefslogtreecommitdiffstats
path: root/test/com/mbien/opencl/CLBufferTest.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-22 12:47:41 +0100
committerMichael Bien <[email protected]>2010-02-22 12:47:41 +0100
commit7c83da1d2e3e8d122e562408a63a13928cc97c83 (patch)
tree78957152423cc8b3623feae6b7376e047b0d04ae /test/com/mbien/opencl/CLBufferTest.java
parentb014104bc4d2c7b05767bf5364b8b972474850d1 (diff)
several small refactorings, api and javadoc improvements.
added automatically generated specialized CLExceptions for each known OpenCL error. added get/set Properties to CLCommandQueue.
Diffstat (limited to 'test/com/mbien/opencl/CLBufferTest.java')
-rw-r--r--test/com/mbien/opencl/CLBufferTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/com/mbien/opencl/CLBufferTest.java b/test/com/mbien/opencl/CLBufferTest.java
index f768c5ae..39f85a75 100644
--- a/test/com/mbien/opencl/CLBufferTest.java
+++ b/test/com/mbien/opencl/CLBufferTest.java
@@ -33,7 +33,7 @@ public class CLBufferTest {
// fill only first read buffer -> we will copy the payload to the second later.
fillBuffer(clBufferA.buffer, 12345);
- CLCommandQueue queue = context.getCLDevices()[0].createCommandQueue();
+ CLCommandQueue queue = context.getDevices()[0].createCommandQueue();
// asynchronous write of data to GPU device, blocking read later to get the computed results back.
queue.putWriteBuffer(clBufferA, false) // write A
@@ -62,7 +62,7 @@ public class CLBufferTest {
// fill only first read buffer -> we will copy the payload to the second later.
fillBuffer(buffer, 12345);
- CLCommandQueue queue = context.getCLDevices()[0].createCommandQueue();
+ CLCommandQueue queue = context.getDevices()[0].createCommandQueue();
Mem[] bufferConfig = new Mem[] {Mem.COPY_BUFFER, Mem.USE_BUFFER};
@@ -78,11 +78,11 @@ public class CLBufferTest {
.putReadBuffer(clBufferB, true) // read B
.finish();
- assertEquals(2, context.getCLMemoryObjects().size());
+ assertEquals(2, context.getMemoryObjects().size());
clBufferA.release();
- assertEquals(1, context.getCLMemoryObjects().size());
+ assertEquals(1, context.getMemoryObjects().size());
clBufferB.release();
- assertEquals(0, context.getCLMemoryObjects().size());
+ assertEquals(0, context.getMemoryObjects().size());
// uploading worked when a==b.
out.println("validating computed results...");
@@ -121,7 +121,7 @@ public class CLBufferTest {
clBufferB = context.createByteBuffer(sizeInBytes, Mem.READ_WRITE, Mem.USE_BUFFER);
}
- CLCommandQueue queue = context.getCLDevices()[0].createCommandQueue();
+ CLCommandQueue queue = context.getDevices()[0].createCommandQueue();
// fill only first buffer -> we will copy the payload to the second later.
ByteBuffer mappedBufferA = queue.putMapBuffer(clBufferA, Map.READ_WRITE, true);