diff options
author | Michael Bien <[email protected]> | 2009-10-23 00:24:47 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-10-23 00:24:47 +0200 |
commit | 6c29892fbed50b05a4332facbe2325a71a44e263 (patch) | |
tree | e9c2cc205e50e7bdda81ad0157a5026313be58ff /src/com/mbien | |
parent | 3b01a2b95fb27293e8959f2a85870204be02fdad (diff) |
static imports.
Diffstat (limited to 'src/com/mbien')
-rw-r--r-- | src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java b/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java index b9b07c2..9d71ed9 100644 --- a/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java +++ b/src/com/mbien/opencl/demos/hellojocl/HelloJOCL.java @@ -1,7 +1,6 @@ package com.mbien.opencl.demos.hellojocl; import com.mbien.opencl.CLBuffer; -import com.mbien.opencl.CLBuffer.MEM; import com.mbien.opencl.CLCommandQueue; import com.mbien.opencl.CLContext; import com.mbien.opencl.CLKernel; @@ -12,6 +11,7 @@ import java.util.Random; import static java.lang.System.*; import static com.sun.gluegen.runtime.BufferFactory.*; +import static com.mbien.opencl.CLBuffer.Mem.*; /** * Hello Java OpenCL example. Adds all elements of buffer A to buffer B @@ -33,9 +33,9 @@ public class HelloJOCL { CLProgram program = context.createProgram(HelloJOCL.class.getResourceAsStream("VectorAdd.cl")).build(); - CLBuffer clBufferA = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, MEM.READ_ONLY); - CLBuffer clBufferB = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, MEM.READ_ONLY); - CLBuffer clBufferC = context.createBuffer(globalWorkSize*SIZEOF_FLOAT, MEM.WRITE_ONLY); + 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); out.println("used device memory: " + (clBufferA.buffer.capacity()+clBufferB.buffer.capacity()+clBufferC.buffer.capacity())/1000000 +"MB"); @@ -72,7 +72,7 @@ public class HelloJOCL { out.print(clBufferC.buffer.getFloat() + ", "); out.println("...; " + clBufferC.buffer.remaining()/SIZEOF_FLOAT + " more"); - System.out.println("computation took: "+(time/1000000)+"ms"); + out.println("computation took: "+(time/1000000)+"ms"); } |