diff options
author | Michael Bien <[email protected]> | 2010-01-02 00:15:55 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-01-02 00:15:55 +0100 |
commit | a5efe050242d1d6a45e03fcac1763ff90877e322 (patch) | |
tree | b8135791915083d1e36b383a182f2973927c8ead /resources/clImplCustomCode.java | |
parent | 72203a5d1f8896463ded10d1b21ca116621d1900 (diff) |
introduced CLGLContext, refactored dependencies, cleanup in opencl code.
Diffstat (limited to 'resources/clImplCustomCode.java')
-rw-r--r-- | resources/clImplCustomCode.java | 11 |
1 files changed, 11 insertions, 0 deletions
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: <code> int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); </code> */ 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; + } + } |