From e081f13ca50353a7a9c34438a2f81d38e03e88a7 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Mon, 8 Mar 2010 17:08:03 +0100 Subject: introduced gl package and moved all interoperability functionality into it. --- src/com/mbien/opencl/CLMemory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/com/mbien/opencl/CLMemory.java') diff --git a/src/com/mbien/opencl/CLMemory.java b/src/com/mbien/opencl/CLMemory.java index 275f39ff..8bebea4c 100644 --- a/src/com/mbien/opencl/CLMemory.java +++ b/src/com/mbien/opencl/CLMemory.java @@ -52,6 +52,10 @@ public abstract class CLMemory extends CLObject implements CL throw new RuntimeException("Unexpected buffer type " + buffer.getClass().getName()); } + protected static CL getCL(CLContext context) { + return context.cl; + } + /** * Returns a new instance of CLMemory pointing to the same CLResource but using a different Buffer. */ @@ -250,7 +254,7 @@ public abstract class CLMemory extends CLObject implements CL return null; } - static int flagsToInt(Mem[] flags) { + public static int flagsToInt(Mem[] flags) { int clFlags = 0; if (flags != null) { for (int i = 0; i < flags.length; i++) { -- cgit v1.2.3