summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLContext.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-21 17:17:21 +0200
committerMichael Bien <[email protected]>2009-10-21 17:17:21 +0200
commitfe1e2739bf7596bc488de977166603edd18c41fb (patch)
tree6e847eec358365efa98cc74d2a843f5c6e6cfb38 /src/com/mbien/opencl/CLContext.java
parentabe0135b4457d4c4ff722b0f39a47cad6c178f7e (diff)
added CopyBuffer implementation to CLCommandQueue and and test method to HighLevelBindingTest.
Diffstat (limited to 'src/com/mbien/opencl/CLContext.java')
-rw-r--r--src/com/mbien/opencl/CLContext.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLContext.java b/src/com/mbien/opencl/CLContext.java
index db32a446..76fbc2ee 100644
--- a/src/com/mbien/opencl/CLContext.java
+++ b/src/com/mbien/opencl/CLContext.java
@@ -1,5 +1,6 @@
package com.mbien.opencl;
+import com.sun.gluegen.runtime.BufferFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -104,6 +105,10 @@ public final class CLContext {
return buffer;
}
+ public CLBuffer createBuffer(int flags, int size) {
+ return createBuffer(flags, BufferFactory.newDirectByteBuffer(size));
+ }
+
CLCommandQueue createCommandQueue(CLDevice device, long properties) {
CLCommandQueue queue = new CLCommandQueue(this, device, properties);