diff options
author | Wade Walker <[email protected]> | 2015-04-22 19:33:55 -0500 |
---|---|---|
committer | Wade Walker <[email protected]> | 2015-11-08 14:05:27 -0600 |
commit | 2cef8bb275deb1e003c9c4b0e911cdc0195970d7 (patch) | |
tree | bfee9c73ea93634db33e510ea83bf3f08f416c8f /make | |
parent | baef9bd212f6f7c24185254ba1755d3d83c057f9 (diff) |
Upgrade OpenCL headers to standard Khronos version 1.1
They were previously a pre-release version of 1.1 that had some manual
changes and upgrades. This moves to the canonical versions downloaded
from khronos.org.
Diffstat (limited to 'make')
-rw-r--r-- | make/build.xml | 4 | ||||
-rw-r--r-- | make/config/cl-common.cfg | 1 | ||||
-rw-r--r-- | make/stub_includes/CL11/cl.h (renamed from make/stub_includes/CL_orig/cl.h) | 2 | ||||
-rw-r--r-- | make/stub_includes/CL11/cl_ext.h (renamed from make/stub_includes/CL_orig/cl_ext.h) | 110 | ||||
-rw-r--r-- | make/stub_includes/CL11/cl_gl.h (renamed from make/stub_includes/CL_orig/cl_gl.h) | 0 | ||||
-rw-r--r-- | make/stub_includes/CL11/cl_gl_ext.h (renamed from make/stub_includes/CL_orig/cl_gl_ext.h) | 4 | ||||
-rw-r--r-- | make/stub_includes/CL11/cl_platform.h (renamed from make/stub_includes/CL_orig/cl_platform.h) | 94 | ||||
-rw-r--r-- | make/stub_includes/CL11/opencl.h | 54 |
8 files changed, 176 insertions, 93 deletions
diff --git a/make/build.xml b/make/build.xml index 459f1a2c..6f889476 100644 --- a/make/build.xml +++ b/make/build.xml @@ -178,7 +178,7 @@ <!-- Directories used for OpenCL header file preprocessing. --> <property name="etc.build.dir" value="${build}/etc" /> - <property name="headers.orig" value="${stub.includes}/CL_orig" /> + <property name="headers.orig" value="${stub.includes}/CL11" /> <property name="headers.dest" value="${gen.includes}/CL" /> <!-- The headers from which Java files are generated --> @@ -186,7 +186,7 @@ <include name="${gen.includes.dir}"/> </dirset> <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes.dir}"> - <include name="CL_orig/**" /> + <include name="CL11/**" /> <include name="GL3/**" /> </fileset> <fileset id="stub.includes.dependencies.fileset.2" dir="${gen.includes.dir}"> diff --git a/make/config/cl-common.cfg b/make/config/cl-common.cfg index 74478bb9..2310d2b5 100644 --- a/make/config/cl-common.cfg +++ b/make/config/cl-common.cfg @@ -127,5 +127,6 @@ TagNativeBinding true # platform dependent extensions Ignore .*APPLE.* +Ignore .*QCOM.* Ignore nanf diff --git a/make/stub_includes/CL_orig/cl.h b/make/stub_includes/CL11/cl.h index 4f21afe5..4355e740 100644 --- a/make/stub_includes/CL_orig/cl.h +++ b/make/stub_includes/CL11/cl.h @@ -959,7 +959,7 @@ clEnqueueTask(cl_command_queue /* command_queue */, extern CL_API_ENTRY cl_int CL_API_CALL clEnqueueNativeKernel(cl_command_queue /* command_queue */, - void (*user_func)(void *), + void (CL_CALLBACK *user_func)(void *), void * /* args */, size_t /* cb_args */, cl_uint /* num_mem_objects */, diff --git a/make/stub_includes/CL_orig/cl_ext.h b/make/stub_includes/CL11/cl_ext.h index 7310fd2b..4bfcec46 100644 --- a/make/stub_includes/CL_orig/cl_ext.h +++ b/make/stub_includes/CL11/cl_ext.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008-2010 The Khronos Group Inc. + * Copyright (c) 2008-2013 The Khronos Group Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the @@ -21,7 +21,7 @@ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. ******************************************************************************/ -/* $Revision: 14835 $ on $Date: 2011-05-26 11:32:00 -0700 (Thu, 26 May 2011) $ */ +/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */ /* cl_ext.h contains OpenCL extensions which don't have external */ /* (OpenGL, D3D) dependencies. */ @@ -34,10 +34,10 @@ extern "C" { #endif #ifdef __APPLE__ - #include <OpenCL/cl.h> + #include <OpenCL/cl.h> #include <AvailabilityMacros.h> #else - #include <CL/cl.h> + #include <CL/cl.h> #endif /* cl_khr_fp64 extension - no extension #define since it has no functions */ @@ -64,7 +64,7 @@ extern "C" { * before using. */ #define cl_APPLE_SetMemObjectDestructor 1 -cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */, +cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */, void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; @@ -130,12 +130,16 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)( #define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005 #define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006 - /********************************* * cl_amd_device_attribute_query * *********************************/ #define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 +/********************************* +* cl_arm_printf extension +*********************************/ +#define CL_PRINTF_CALLBACK_ARM 0x40B0 +#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1 #ifdef CL_VERSION_1_1 /*********************************** @@ -200,41 +204,65 @@ typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)( #define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0) #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0) #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1) - - /* cl_ext_atomic_counters_32 and cl_ext_atomic_counters_64 extensions - * no extension #define since they have no functions - */ - #define CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT 0x4032 - - /*********************************** - * cl_ext_migrate_memobject extension definitions - ***********************************/ - #define cl_ext_migrate_memobject 1 - - typedef cl_bitfield cl_mem_migration_flags_ext; - - #define CL_MIGRATE_MEM_OBJECT_HOST_EXT 0x1 - - #define CL_COMMAND_MIGRATE_MEM_OBJECT_EXT 0x4040 - - extern CL_API_ENTRY cl_int CL_API_CALL - clEnqueueMigrateMemObjectEXT( cl_command_queue /* command_queue */, - cl_uint /* num_mem_objects */, - const cl_mem * /* mem_objects */, - cl_mem_migration_flags_ext /* flags */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - (CL_API_CALL *clEnqueueMigrateMemObjectEXT_fn)( cl_command_queue /* command_queue */, - cl_uint /* num_mem_objects */, - const cl_mem * /* mem_objects */, - cl_mem_migration_flags_ext /* flags */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1; - + +/********************************* +* cl_qcom_ext_host_ptr extension +*********************************/ + +#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29) + +#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0 +#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1 +#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2 +#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3 +#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4 +#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5 +#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6 +#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7 + +typedef cl_uint cl_image_pitch_info_qcom; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetDeviceImageInfoQCOM(cl_device_id device, + size_t image_width, + size_t image_height, + const cl_image_format *image_format, + cl_image_pitch_info_qcom param_name, + size_t param_value_size, + void *param_value, + size_t *param_value_size_ret); + +typedef struct _cl_mem_ext_host_ptr +{ + /* Type of external memory allocation. */ + /* Legal values will be defined in layered extensions. */ + cl_uint allocation_type; + + /* Host cache policy for this external memory allocation. */ + cl_uint host_cache_policy; + +} cl_mem_ext_host_ptr; + +/********************************* +* cl_qcom_ion_host_ptr extension +*********************************/ + +#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8 + +typedef struct _cl_mem_ion_host_ptr +{ + /* Type of external memory allocation. */ + /* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */ + cl_mem_ext_host_ptr ext_host_ptr; + + /* ION file descriptor */ + int ion_filedesc; + + /* Host pointer to the ION allocated memory */ + void* ion_hostptr; + +} cl_mem_ion_host_ptr; + #endif /* CL_VERSION_1_1 */ #ifdef __cplusplus diff --git a/make/stub_includes/CL_orig/cl_gl.h b/make/stub_includes/CL11/cl_gl.h index 3b4fe069..3b4fe069 100644 --- a/make/stub_includes/CL_orig/cl_gl.h +++ b/make/stub_includes/CL11/cl_gl.h diff --git a/make/stub_includes/CL_orig/cl_gl_ext.h b/make/stub_includes/CL11/cl_gl_ext.h index fbf8b326..26e47821 100644 --- a/make/stub_includes/CL_orig/cl_gl_ext.h +++ b/make/stub_includes/CL11/cl_gl_ext.h @@ -21,7 +21,7 @@ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. **********************************************************************************/ -/* $Revision: 14826 $ on $Date: 2011-05-26 07:40:43 -0700 (Thu, 26 May 2011) $ */ +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ /* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */ /* OpenGL dependencies. */ @@ -41,7 +41,7 @@ extern "C" { /* * For each extension, follow this template - * cl_VEN_extname extension */ + * /* cl_VEN_extname extension */ /* #define cl_VEN_extname 1 * ... define new types, if any * ... define new tokens, if any diff --git a/make/stub_includes/CL_orig/cl_platform.h b/make/stub_includes/CL11/cl_platform.h index 2dbbb9d7..31e63abb 100644 --- a/make/stub_includes/CL_orig/cl_platform.h +++ b/make/stub_includes/CL11/cl_platform.h @@ -21,7 +21,7 @@ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. **********************************************************************************/ -/* $Revision: 14829 $ on $Date: 2011-05-26 08:22:50 -0700 (Thu, 26 May 2011) $ */ +/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */ #ifndef __CL_PLATFORM_H #define __CL_PLATFORM_H @@ -235,7 +235,7 @@ typedef double cl_double __attribute__((aligned(8))); #define CL_M_SQRT2_F 1.41421353816986f #define CL_M_SQRT1_2_F 0.70710676908493f -#if (defined( __GNUC__ ) || defined( __IBMC__ )) +#if defined( __GNUC__ ) #define CL_HUGE_VALF __builtin_huge_valf() #define CL_HUGE_VAL __builtin_huge_val() #define CL_NAN __builtin_nanf( "" ) @@ -396,7 +396,7 @@ typedef unsigned int cl_GLenum; #endif /* Define alignment keys */ -#if (defined( __GNUC__ ) || defined( __IBMC__ )) +#if defined( __GNUC__ ) #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) #elif defined( _WIN32) && (_MSC_VER) /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ @@ -406,14 +406,14 @@ typedef unsigned int cl_GLenum; #define CL_ALIGNED(_x) /* Don't warn if we're in GlueGen's preprocessor; it doesn't have compiler defines set */ #elif defined( __GLUEGEN__ ) - #define CL_ALIGNED(_x) + #define CL_ALIGNED(_x) #else - #warning "Need to implement some method to align data here" - #define CL_ALIGNED(_x) + #warning Need to implement some method to align data here + #define CL_ALIGNED(_x) #endif /* Indicate whether .xyzw, .s0123 and .hi.lo are supported */ -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) /* .xyzw and .s0123...{f|F} are supported */ #define CL_HAS_NAMED_VECTOR_FIELDS 1 /* .hi and .lo are supported */ @@ -426,7 +426,7 @@ typedef unsigned int cl_GLenum; typedef union { cl_char CL_ALIGNED(2) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_char x, y; }; __extension__ struct{ cl_char s0, s1; }; __extension__ struct{ cl_char lo, hi; }; @@ -439,7 +439,7 @@ typedef union typedef union { cl_char CL_ALIGNED(4) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_char x, y, z, w; }; __extension__ struct{ cl_char s0, s1, s2, s3; }; __extension__ struct{ cl_char2 lo, hi; }; @@ -458,7 +458,7 @@ typedef cl_char4 cl_char3; typedef union { cl_char CL_ALIGNED(8) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_char x, y, z, w; }; __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_char4 lo, hi; }; @@ -477,7 +477,7 @@ typedef union typedef union { cl_char CL_ALIGNED(16) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_char8 lo, hi; }; @@ -501,7 +501,7 @@ typedef union typedef union { cl_uchar CL_ALIGNED(2) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uchar x, y; }; __extension__ struct{ cl_uchar s0, s1; }; __extension__ struct{ cl_uchar lo, hi; }; @@ -514,7 +514,7 @@ typedef union typedef union { cl_uchar CL_ALIGNED(4) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uchar x, y, z, w; }; __extension__ struct{ cl_uchar s0, s1, s2, s3; }; __extension__ struct{ cl_uchar2 lo, hi; }; @@ -533,7 +533,7 @@ typedef cl_uchar4 cl_uchar3; typedef union { cl_uchar CL_ALIGNED(8) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uchar x, y, z, w; }; __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_uchar4 lo, hi; }; @@ -552,7 +552,7 @@ typedef union typedef union { cl_uchar CL_ALIGNED(16) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_uchar8 lo, hi; }; @@ -576,7 +576,7 @@ typedef union typedef union { cl_short CL_ALIGNED(4) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_short x, y; }; __extension__ struct{ cl_short s0, s1; }; __extension__ struct{ cl_short lo, hi; }; @@ -589,7 +589,7 @@ typedef union typedef union { cl_short CL_ALIGNED(8) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_short x, y, z, w; }; __extension__ struct{ cl_short s0, s1, s2, s3; }; __extension__ struct{ cl_short2 lo, hi; }; @@ -608,7 +608,7 @@ typedef cl_short4 cl_short3; typedef union { cl_short CL_ALIGNED(16) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_short x, y, z, w; }; __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_short4 lo, hi; }; @@ -627,7 +627,7 @@ typedef union typedef union { cl_short CL_ALIGNED(32) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_short8 lo, hi; }; @@ -651,7 +651,7 @@ typedef union typedef union { cl_ushort CL_ALIGNED(4) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ushort x, y; }; __extension__ struct{ cl_ushort s0, s1; }; __extension__ struct{ cl_ushort lo, hi; }; @@ -664,7 +664,7 @@ typedef union typedef union { cl_ushort CL_ALIGNED(8) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ushort x, y, z, w; }; __extension__ struct{ cl_ushort s0, s1, s2, s3; }; __extension__ struct{ cl_ushort2 lo, hi; }; @@ -683,7 +683,7 @@ typedef cl_ushort4 cl_ushort3; typedef union { cl_ushort CL_ALIGNED(16) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ushort x, y, z, w; }; __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_ushort4 lo, hi; }; @@ -702,7 +702,7 @@ typedef union typedef union { cl_ushort CL_ALIGNED(32) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_ushort8 lo, hi; }; @@ -725,7 +725,7 @@ typedef union typedef union { cl_int CL_ALIGNED(8) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_int x, y; }; __extension__ struct{ cl_int s0, s1; }; __extension__ struct{ cl_int lo, hi; }; @@ -738,7 +738,7 @@ typedef union typedef union { cl_int CL_ALIGNED(16) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_int x, y, z, w; }; __extension__ struct{ cl_int s0, s1, s2, s3; }; __extension__ struct{ cl_int2 lo, hi; }; @@ -757,7 +757,7 @@ typedef cl_int4 cl_int3; typedef union { cl_int CL_ALIGNED(32) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_int x, y, z, w; }; __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_int4 lo, hi; }; @@ -776,7 +776,7 @@ typedef union typedef union { cl_int CL_ALIGNED(64) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_int8 lo, hi; }; @@ -800,7 +800,7 @@ typedef union typedef union { cl_uint CL_ALIGNED(8) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uint x, y; }; __extension__ struct{ cl_uint s0, s1; }; __extension__ struct{ cl_uint lo, hi; }; @@ -813,7 +813,7 @@ typedef union typedef union { cl_uint CL_ALIGNED(16) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uint x, y, z, w; }; __extension__ struct{ cl_uint s0, s1, s2, s3; }; __extension__ struct{ cl_uint2 lo, hi; }; @@ -832,7 +832,7 @@ typedef cl_uint4 cl_uint3; typedef union { cl_uint CL_ALIGNED(32) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uint x, y, z, w; }; __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_uint4 lo, hi; }; @@ -851,7 +851,7 @@ typedef union typedef union { cl_uint CL_ALIGNED(64) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_uint8 lo, hi; }; @@ -874,7 +874,7 @@ typedef union typedef union { cl_long CL_ALIGNED(16) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_long x, y; }; __extension__ struct{ cl_long s0, s1; }; __extension__ struct{ cl_long lo, hi; }; @@ -887,7 +887,7 @@ typedef union typedef union { cl_long CL_ALIGNED(32) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_long x, y, z, w; }; __extension__ struct{ cl_long s0, s1, s2, s3; }; __extension__ struct{ cl_long2 lo, hi; }; @@ -906,7 +906,7 @@ typedef cl_long4 cl_long3; typedef union { cl_long CL_ALIGNED(64) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_long x, y, z, w; }; __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_long4 lo, hi; }; @@ -925,7 +925,7 @@ typedef union typedef union { cl_long CL_ALIGNED(128) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_long8 lo, hi; }; @@ -949,7 +949,7 @@ typedef union typedef union { cl_ulong CL_ALIGNED(16) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ulong x, y; }; __extension__ struct{ cl_ulong s0, s1; }; __extension__ struct{ cl_ulong lo, hi; }; @@ -962,7 +962,7 @@ typedef union typedef union { cl_ulong CL_ALIGNED(32) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ulong x, y, z, w; }; __extension__ struct{ cl_ulong s0, s1, s2, s3; }; __extension__ struct{ cl_ulong2 lo, hi; }; @@ -981,7 +981,7 @@ typedef cl_ulong4 cl_ulong3; typedef union { cl_ulong CL_ALIGNED(64) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ulong x, y, z, w; }; __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_ulong4 lo, hi; }; @@ -1000,7 +1000,7 @@ typedef union typedef union { cl_ulong CL_ALIGNED(128) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_ulong8 lo, hi; }; @@ -1025,7 +1025,7 @@ typedef union typedef union { cl_float CL_ALIGNED(8) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_float x, y; }; __extension__ struct{ cl_float s0, s1; }; __extension__ struct{ cl_float lo, hi; }; @@ -1038,7 +1038,7 @@ typedef union typedef union { cl_float CL_ALIGNED(16) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_float x, y, z, w; }; __extension__ struct{ cl_float s0, s1, s2, s3; }; __extension__ struct{ cl_float2 lo, hi; }; @@ -1057,7 +1057,7 @@ typedef cl_float4 cl_float3; typedef union { cl_float CL_ALIGNED(32) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_float x, y, z, w; }; __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_float4 lo, hi; }; @@ -1076,7 +1076,7 @@ typedef union typedef union { cl_float CL_ALIGNED(64) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_float8 lo, hi; }; @@ -1100,7 +1100,7 @@ typedef union typedef union { cl_double CL_ALIGNED(16) s[2]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_double x, y; }; __extension__ struct{ cl_double s0, s1; }; __extension__ struct{ cl_double lo, hi; }; @@ -1113,7 +1113,7 @@ typedef union typedef union { cl_double CL_ALIGNED(32) s[4]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_double x, y, z, w; }; __extension__ struct{ cl_double s0, s1, s2, s3; }; __extension__ struct{ cl_double2 lo, hi; }; @@ -1132,7 +1132,7 @@ typedef cl_double4 cl_double3; typedef union { cl_double CL_ALIGNED(64) s[8]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_double x, y, z, w; }; __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; }; __extension__ struct{ cl_double4 lo, hi; }; @@ -1151,7 +1151,7 @@ typedef union typedef union { cl_double CL_ALIGNED(128) s[16]; -#if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ ) +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) __extension__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; __extension__ struct{ cl_double8 lo, hi; }; diff --git a/make/stub_includes/CL11/opencl.h b/make/stub_includes/CL11/opencl.h new file mode 100644 index 00000000..26a63899 --- /dev/null +++ b/make/stub_includes/CL11/opencl.h @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +#ifndef __OPENCL_H +#define __OPENCL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __APPLE__ + +#include <OpenCL/cl.h> +#include <OpenCL/cl_gl.h> +#include <OpenCL/cl_gl_ext.h> +#include <OpenCL/cl_ext.h> + +#else + +#include <CL/cl.h> +#include <CL/cl_gl.h> +#include <CL/cl_gl_ext.h> +#include <CL/cl_ext.h> + +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_H */ + |