summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/demos/hellojocl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-27 18:55:09 +0100
committerMichael Bien <[email protected]>2009-10-27 18:55:09 +0100
commite15fbc28ae250f3f944c4061d28ef7c41799d2de (patch)
tree51662be32399fae2c0cc0aad19790934d415c5ca /src/com/mbien/opencl/demos/hellojocl
parent6c29892fbed50b05a4332facbe2325a71a44e263 (diff)
generified CLBuffer.
Diffstat (limited to 'src/com/mbien/opencl/demos/hellojocl')
-rw-r--r--src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java b/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java
index 9d71ed9..58cb5e9 100644
--- a/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java
+++ b/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java
@@ -33,9 +33,9 @@ public class HelloJOCL {
CLProgram program = context.createProgram(HelloJOCL.class.getResourceAsStream("VectorAdd.cl")).build();
- CLBuffer clBufferA = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, READ_ONLY);
- CLBuffer clBufferB = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, READ_ONLY);
- CLBuffer clBufferC = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, WRITE_ONLY);
+ CLBuffer<ByteBuffer> clBufferA = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, READ_ONLY);
+ CLBuffer<ByteBuffer> clBufferB = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, READ_ONLY);
+ CLBuffer<ByteBuffer> clBufferC = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, WRITE_ONLY);
out.println("used device memory: "
+ (clBufferA.buffer.capacity()+clBufferB.buffer.capacity()+clBufferC.buffer.capacity())/1000000 +"MB");