From a5efe050242d1d6a45e03fcac1763ff90877e322 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sat, 2 Jan 2010 00:15:55 +0100 Subject: introduced CLGLContext, refactored dependencies, cleanup in opencl code. --- resources/clImplCustomCode.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'resources/clImplCustomCode.java') diff --git a/resources/clImplCustomCode.java b/resources/clImplCustomCode.java index 91b1fb4..cffe9a7 100644 --- a/resources/clImplCustomCode.java +++ b/resources/clImplCustomCode.java @@ -51,3 +51,14 @@ /** Entry point to C language function: int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); */ private native int clBuildProgram1(long program, int devices, Object deviceList, String options, BuildProgramCallback cb, Object userData); + + private final static void convert32To64(long[] values) { + if(values.length%2 == 1) { + values[values.length-1] = values[values.length/2]>>>32; + } + for (int i = values.length - 1 - values.length%2; i >= 0; i-=2) { + long temp = values[i/2]; + values[i-1] = temp>>>32; + values[i ] = temp & 0x00000000FFFFFFFFL; + } + } -- cgit v1.2.3