aboutsummaryrefslogtreecommitdiffstats
path: root/resources/clImplCustomCode.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-02 00:15:55 +0100
committerMichael Bien <[email protected]>2010-01-02 00:15:55 +0100
commita5efe050242d1d6a45e03fcac1763ff90877e322 (patch)
treeb8135791915083d1e36b383a182f2973927c8ead /resources/clImplCustomCode.java
parent72203a5d1f8896463ded10d1b21ca116621d1900 (diff)
introduced CLGLContext, refactored dependencies, cleanup in opencl code.
Diffstat (limited to 'resources/clImplCustomCode.java')
-rw-r--r--resources/clImplCustomCode.java11
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;
+ }
+ }