Commit Graph

323 Commits

Author SHA1 Message Date
Martin Kelly
c60b351ca6 drop __attribute__((aligned(X))) from cl_X defs
Currently, we add __attribute__((aligned(X))) for definitions like
cl_int, cl_short etc. This guarantees that the variable will be aligned
*at least* at an X byte boundary. We don't need to do this, for a few
reasons:

- Most of these types are fixed width (int32_t, int16_t, etc.). This
  means __attribute((aligned(X))) isn't doing anything, as the types are
  exactly the right size, so they will already be aligned to at least
  their size. float and double are not guaranteed to be any given width,
  though in practice they are almost always IEEE 754 floats and
  therefore 4 and 8 bytes respectively. If they were not 4/8 bytes, it's
  unclear that forcing 4/8 byte alignment would be good for either space
  or performance efficiency.

- Attributes don't carry over to templates, which ends up causing a
  GCC -Wignored-attributes warning in cl.hpp when we declare an
  std::vector<cl_int>. This warning is indicating that the attributes
  get dropped when put inside a template. Nothing seems to break when
  this happens, further suggesting that the attributes aren't really
  needed.

- The attributes aren't present on Windows, so if they were really
  needed, then Windows is currently broken. Again, it doesn't seem like
  anything is broken, so this is further evidence that we don't need to
  add these attributes.

See here for further reference on __attribute((aligned(X))):
https://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Type-Attributes.html
2019-02-05 17:43:36 +00:00
bashbaug
49f07d3133 small typo fix for pfn_notify 2019-01-17 18:40:56 +00:00
Ben Ashbaugh
f937adaf3a removing comments around arguments:
removed comments around arguments for CL.h
removed comments around arguments for cl_ext.h
removed comments around arguments for cl_ext_intel.h
removed comments around arguments for cl_dx9_media_sharing_intel.h
removed comments around arguments for cl_egl.h, cl_gl.h, and cl_gl_ext.h
removed comments around arguments for cl_va_api_media_sharing_intel.h
whitespace cleanup
2019-01-17 18:40:56 +00:00
James Price
1da98fd0ce Use __vector instead of vector to fix altivec builds
Patch taken from Debian khronos-opencl-headers package:
https://sources.debian.org/patches/khronos-opencl-headers/1.2-svn26009-1/use__vector.patch/
2019-01-15 17:36:57 +00:00
James Price
8de2a5c3f7 Fix clCreateFromGLBuffer error code result type 2019-01-14 10:44:49 +00:00
Nagy-Egri Máté Ferenc
2d041a0a1d Fixed w4201 triggering with MSVC in /W4 /Za builds 2018-12-11 21:43:42 +00:00
bashbaug
03490c3f8c add suffixed enums for cl_khr_mipmap_image 2018-10-31 13:58:02 -07:00
James Price
5ddbb13966 Remove all Apple specific content from headers
These various deltas made it extremely difficult to work with non-Apple
implementations of OpenCL on macOS. Apple always shipped their own
versions of the headers anyway, and now that Apple have officially
deprecated OpenCL on their platforms there is no reason to keep these
deltas.

Fixes https://github.com/KhronosGroup/OpenCL-Headers/issues/31 as well
as a few other unreported issues.
2018-10-23 16:52:38 +01:00
Khronos Group Webmaster
d516924569
Create CODE_OF_CONDUCT.md 2018-10-10 15:50:24 -04:00
Jon Leech
40c5d226c7
Merge pull request #30 from kpet/master
Add enums for cl_arm_get_core_id
2018-08-13 08:52:58 -07:00
Kevin Petit
a749dc6b85 Add enums for cl_arm_get_core_id
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2018-08-13 16:00:22 +01:00
Kevin Petit
4ff68adbdd Rename CL_IMPORT_TYPE_SECURE_ARM
...to the final CL_IMPORT_TYPE_PROTECTED_ARM name.

The extension spec hasn't been released publicly yet.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2018-08-01 12:42:17 +01:00
Umair Ahmed
320d7189b3 Add CL_DEVICE_DOUBLE_FP_CONFIG
Note that "cl.h" defines the macro only for OpenCL 1.2 or greater since  
"cl_khr_fp64" was made a core-optional feature from OpenCL 1.2 onwards.  
This creates an issue when users targeting OpenCL 1.1 or lower try to query  
the device for double precision support using the macro.  

This change fixes this issue by adding the macro in "cl_ext.h" for OpenCL 1.1 or lower.
2018-07-11 16:43:22 +01:00
Umair Ahmed
4d33894367 remove CL_DEVICE_HALF_FP_CONFIG
"cl_khr_fp16" is still included as an extension in higher OpenCL versions unlike "cl_khr_fp64"  
which is an optional-core feature from OpenCL 1.2. Hence remove the above defined macro  
as it is already defined in "cl_ext.h"
2018-07-11 16:43:22 +01:00
bashbaug
990202be02 added clSetCommandQueueProperty to unified headers 2018-07-03 14:09:00 -07:00
Ben Ashbaugh
de26592167 Unified Headers
This commit switches from version-specific OpenCL headers to
unified OpenCL headers that can work with any OpenCL version.
See README.md for details.
2018-05-14 14:08:28 -07:00
Sreelakshmi Haridas
e986688daf Added following Qualcomm extensions:
- cl_qcom_ext_host_ptr_iocoherent
- cl_qcom_android_native_buffer_host_ptr
2018-03-13 11:42:34 -06:00
Pierre Moreau
b5c3680df1 Add cl_khr_il_program to OpenCL 1.2 and 2.0 headers 2018-02-21 10:14:25 +00:00
Timmy Liu
eb0ef60f5f Merge branch 'cl_khr_create_command_queue' into 'master'
added cl_khr_create_command_queue

See merge request opencl/headers!44
2018-01-25 09:58:46 +00:00
bashbaug
6bb42f31d4 added cl_khr_create_command_queue 2018-01-17 07:32:37 -08:00
James Price
f039db6764 Use correctly rounded decimal mathematical constants
Discussed at length in GitHub issue #17.
2017-07-18 18:54:27 +01:00
James Price
eb3d1cfd72 Shorten CL_DBL_MAX for Visual Studio to fix token overflow 2017-06-29 16:35:38 +01:00
Jakub Szuppe
65159b2dd2 Anon structs supported in C11 2017-06-27 17:53:08 +01:00
Martin Kelly
dfebb69971 add LICENSE file
Having an explicit LICENSE file can be useful for packaging (e.g.
programitically determining the license), for displaying the license on github,
and for quickly seeing the licensing at a glance.
2017-06-27 17:50:25 +01:00
James Price
3dad3346d7 Fix typo in comment
s/cl_kernel_arg_type_qualifer/cl_kernel_arg_type_qualifier/
2017-06-17 11:22:10 +01:00
James Price
ec2566b59d Merge branch 'pr_mv_headers_to_CL_subdir' into 'master'
Move headers to CL subdir

Closes #11

See merge request !41
2017-05-16 19:50:17 +00:00
Jakub Szuppe
2d4cc61840 Move OpenCL 2.2 headers to opencl22/CL 2017-05-16 12:46:02 +02:00
Jakub Szuppe
2da7dad53e Move OpenCL 2.1 headers to opencl21/CL 2017-05-16 12:45:46 +02:00
Jakub Szuppe
57cc45410b Move OpenCL 2.0 headers to opencl20/CL 2017-05-16 12:45:35 +02:00
Jakub Szuppe
75f1fba0fd Move OpenCL 1.2 headers to opencl12/CL 2017-05-16 12:45:10 +02:00
Jakub Szuppe
397cb28cfc Move OpenCL 1.1 headers to opencl11/CL 2017-05-16 12:44:35 +02:00
Jakub Szuppe
56eda020bd Move OpenCL 1.0 headers to opencl10/CL 2017-05-16 12:43:59 +02:00
James Price
4ec2d2dd04 Merge branch 'cl_khr_subgroups_fix' into 'master'
Renamed cl_khr_sub_groups -> cl_khr_subgroups to be consistent with the spec

Closes #9

See merge request !39
2017-04-19 13:43:47 +00:00
bashbaug
f0c16fcc37 Renamed cl_khr_sub_groups -> cl_khr_subgroups to be consistent with the spec 2017-04-18 16:44:48 -07:00
James Price
9ae898295d Remove duplicate ARM extension definition
Commit 057956c introduced this extension twice for 2.0.
2017-04-18 16:25:41 +01:00
James Price
f7c23e5984 Merge branch 'named_barrier_rename' into 'master'
Rename cl_khr_sub_group_named_barrier to cl_khr_subgroup_named_barrier

See merge request !36
2017-04-18 14:21:48 +00:00
=
81bdafab1a cl_khr_sub_group_named_barrier -> cl_khr_subgroup_named_barrier 2017-04-04 14:58:16 -07:00
Kevin Petit
1f54ec407b Merge 2.2 headers into opencl22/
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2017-02-23 15:28:11 +00:00
Kevin Petit
1708879150 Merge 2.0 headers into opencl20/
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2017-02-23 15:27:39 +00:00
Kevin Petit
534e3c6833 Merge 1.2 headers into opencl12/
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2017-02-23 15:27:09 +00:00
Kevin Petit
3fd85ae310 Merge 1.1 headers into opencl11/
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2017-02-23 15:26:37 +00:00
Kevin Petit
86e0798420 Merge 1.0 headers into opencl10/
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2017-02-23 15:26:07 +00:00
Kevin Petit
559546b21a Move 2.1 headers to opencl21/
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2017-02-23 15:24:46 +00:00
neheb
cccf88b1e8 Fix -Wundef warning under Ubuntu 14.04 2017-02-13 23:15:45 +00:00
neheb
15ad3a0a65 Fix -Wundef warning under Ubuntu 14.04 2017-02-13 23:12:35 +00:00
neheb
d4cc397547 Fix -Wundef warning under Ubuntu 14.04 2017-02-13 23:11:45 +00:00
neheb
bf0f43b76f Fix -Wundef warning under Ubuntu 14.04 2017-02-13 23:09:07 +00:00
bashbaug
a47a77ba32 header updates for cl_intel_planar_yuv
header updates for cl_intel_device_side_avc_motion_estimation
2017-02-13 22:32:57 +00:00
bashbaug
8488b1320b header updates for cl_intel_planar_yuv
header updates for cl_intel_device_side_avc_motion_estimation
2017-02-13 22:32:37 +00:00
bashbaug
ad5a3ac55f header updates for cl_intel_planar_yuv
header updates for cl_intel_device_side_avc_motion_estimation
2017-02-13 22:31:11 +00:00