diff options
author | Michael Bien <[email protected]> | 2010-04-24 22:52:59 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-04-24 22:52:59 +0200 |
commit | 1be089aa2acaeef8670a5b19e7c2d08e7c87cb94 (patch) | |
tree | 7603ab625577ade69b8a2b135615e05378b659cf /resources | |
parent | 7674ff2b486ee8d0ad6a7457431024b58a1b927a (diff) |
clGetExtensionFunctionAddress returns now a long.
Diffstat (limited to 'resources')
-rw-r--r-- | resources/cl-impl.cfg | 5 | ||||
-rw-r--r-- | resources/clImplCustomCode.java | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/resources/cl-impl.cfg b/resources/cl-impl.cfg index a404398f..34753eb7 100644 --- a/resources/cl-impl.cfg +++ b/resources/cl-impl.cfg @@ -32,8 +32,9 @@ ForceProcAddressGen clGetGLTextureInfo ForceProcAddressGen clIcdGetPlatformIDsKHR Unignore clGetExtensionFunctionAddress -#AccessControl clGetExtensionFunctionAddress PACKAGE_PRIVATE -ArgumentIsString clGetExtensionFunctionAddress 0 +RenameJavaMethod clGetExtensionFunctionAddress clGetExtensionFunctionAddressImpl +AccessControl clGetExtensionFunctionAddressImpl PRIVATE +ArgumentIsString clGetExtensionFunctionAddressImpl 0 #append to generated c files CustomCCode #include <CL/cl.h> diff --git a/resources/clImplCustomCode.java b/resources/clImplCustomCode.java index fab3a724..9edbd575 100644 --- a/resources/clImplCustomCode.java +++ b/resources/clImplCustomCode.java @@ -118,6 +118,16 @@ private native java.nio.ByteBuffer clEnqueueMapImage0(long command_queue, long image, int blocking_map, long map_flags, Object origin, int origin_byte_offset, Object range, int range_byte_offset, Object image_row_pitch, int image_row_pitch_byte_offset, Object image_slice_pitch, int image_slice_pitch_byte_offset, int num_events_in_wait_list, Object event_wait_list, int event_wait_list_byte_offset, Object event, int event_byte_offset, Object errcode_ret, int errcode_ret_byte_offset); + public long clGetExtensionFunctionAddress(String name) { + ByteBuffer res = clGetExtensionFunctionAddressImpl(name); + if(Platform.is32Bit()) { + return res.getInt(); + }else{ + return res.getLong(); + } + } + +/* private static void convert32To64(long[] values) { if(values.length%2 == 1) { values[values.length-1] = values[values.length/2]>>>32; @@ -128,3 +138,4 @@ values[i ] = temp & 0x00000000FFFFFFFFL; } } +*/
\ No newline at end of file |