Commit Graph

212 Commits

Author SHA1 Message Date
Ben Ashbaugh
069189f519
header changes for cl_intel_mem_force_host_memory (#114) 2020-09-22 20:29:57 +01:00
Kévin Petit
1b2a1850f4
Add definitions for cl_ext_cxx_for_opencl (#109)
Specification in https://github.com/KhronosGroup/OpenCL-Docs/pull/399

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-09-02 13:33:56 -07:00
Kévin Petit
e8ca48d46c
Add definitions for cl_arm_scheduling_controls (#110)
Specification in https://github.com/KhronosGroup/OpenCL-Docs/pull/423

Signed-off-by: Plamen Petkov <plamen.petkov@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-08-30 22:14:26 -07:00
Mikhail Lychkov
d8bb3220d4
Add cl_intel_create_buffer_with_properties and cl_intel_mem_channel_property extensions (#106)
* Add cl_intel_create_buffer_with_properties extension function

Spec:
https://github.com/KhronosGroup/OpenCL-Docs/blob/master/extensions/cl_intel_create_buffer_with_properties.asciidoc

This extension allows OpenCL 1.x and 2.x devices to support the
clCreateBufferWithProperties API that was added in OpenCL 3.0. This allows older
OpenCL implementations to support other optional extensions or features that use
the clCreateBufferWithProperties API to specify additional buffer properties,
without recreating the API that is already part of OpenCL 3.0.

Signed-off-by: Mikhail Lychkov <mikhail.lychkov@intel.com>

* Add CL_MEM_CHANNEL_INTEL property enum

It's done to align with:
https://github.com/KhronosGroup/OpenCL-Docs/blob/master/extensions/cl_intel_mem_channel_property.asciidoc

Signed-off-by: Mikhail Lychkov <mikhail.lychkov@intel.com>

Co-authored-by: Viktoria Maksimova <viktoria.maksimova@intel.com>
2020-08-11 07:50:35 -07:00
Ben Ashbaugh
879576679f add cl_api prefix for clSetContextDestructorCallback 2020-07-29 20:08:30 +01:00
Ben Ashbaugh
14ff4add11 update ICD dispatch table with clSetContextDestructorCallback 2020-07-29 20:08:30 +01:00
Ben Ashbaugh
dab00ce959 deprecate clSetProgramReleaseCallback 2020-07-29 20:08:30 +01:00
Ben Ashbaugh
d3d0bef90a add CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 2020-07-29 20:08:30 +01:00
Ben Ashbaugh
030cc1c20f add clSetContextDestructorCallback 2020-07-29 20:08:30 +01:00
Kévin Petit
3471ac0330
Introduce cl_properties type (#97)
Matching specification change made in https://github.com/KhronosGroup/OpenCL-Docs/pull/352

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-07-20 09:38:07 -07:00
Ben Ashbaugh
d082d42065 switch device enqueue boolean query to capabilities query 2020-07-20 16:48:51 +01:00
pkubaj
d7283be010
Fix build of dependent software with clang (#93)
When using clang, altivec.h inclusion is taken care of by clang with -maltivec / -mno-altivec. Users shouldn't directly include it, it breaks compilation.
2020-06-19 12:26:49 -07:00
Ben Ashbaugh
b04034a17e
add APIs and enums for cl_intel_unified_shared_memory (#65)
* add APIs and enums for cl_intel_unified_shared_memory

* remove CL_MEM_ALLOC_DEFAULT_INTEL

This value is not in the latest rev of the spec.

* add aliases for cl_mem_migration_flags

Fixes compilation pre-OpenCL 1.2, where cl_mem_migration_flags is not defined.

* for now, remove aliases to cl_mem_migration_flags

Instead of adding aliases to cl_mem_migration_flags and associated
enums, restrict the clEnqueueMigrateMemINTEL API to OpenCL 1.2 or
newer, which satisfies all current use-cases.

If needed, the aliases can be re-introduced at a later date, since
adding them does not change the ABI.
2020-06-09 10:49:23 -07:00
Einar Hov
dbb17cd93e
Add cl_khr_device_uuid definitions (#91)
Signed-off-by: Einar Hov <einar.hov@arm.com>
2020-06-03 11:43:29 -07:00
James Price
5cc337c890
Add cl_half.h header (#60)
* Add cl_half.h header

* Make shared utility for handling {over,under}flow

* Include stdint.h

* Prefix all new functions with cl_half_

* Address Windows warnings

* Refactor lsb_pos calculation

* Avoid leading double-underscore in header guard

* Update license

* Add tests for cl_half.h
2020-05-12 12:04:29 +01:00
XZiar
59182a8228
add tokens for cl_amd_device_attribute_query (#90) 2020-05-11 20:43:14 -07:00
Kévin Petit
94bbd1f347
Add Windows CI using Travis (#82)
Fixes #80

Signed-off-by: Kévin Petit <kpet@free.fr>
2020-05-04 08:40:13 -07:00
Ben Ashbaugh
3f7c1f77f8
update headers for OpenCL 3.0 (#88)
* update headers for OpenCL 3.0

* update tests for OpenCL 3.0 headers
2020-04-28 15:12:19 -07:00
Kévin Petit
0f87a32ae1
Add cl_khr_extended_versioning macro (#85)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-04-22 13:41:09 -07:00
Alastair Murray
70a018cac5
Synchronize experimental enum etc with cl.xml (#83) 2020-04-13 14:39:42 -07:00
fodinabor
c0a0805609
Include the DirectX sharing headers from CL/cl_icd.h. (#81) 2020-04-02 11:57:31 +01:00
Ben Ashbaugh
daa2fd2ce5 add missing error code CL_CONTEXT_TERMINATED_KHR 2020-03-27 13:46:53 +00:00
James Price
35deb7576b
Change license to Apache 2.0 (#76) 2020-03-25 00:52:39 -07:00
Ewan Crawford
9dde5da9c3
Add enum value for cl_khronos_vendor_id (#71)
Enum value depends on OpenCL spec change in https://github.com/KhronosGroup/OpenCL-Docs/pull/203
Including platform vendor IDs in the headers matches the convention of
Vulkan.
2020-03-22 15:36:01 -07:00
Ewan Crawford
1433509c84
Experimental enum cl_khronos_vendor_id (#75)
Represents non-PCIe Khronos vendor IDs returned from
`CL_DEVICE_VENDOR_ID`.
2020-03-22 15:35:08 -07:00
Ben Ashbaugh
9824efd0ec experimental enums for language queries 2020-03-12 18:18:41 +00:00
Ben Ashbaugh
357a9808c8 add experimental enum CL_COMMAND_SVM_MIGRATE_MEM 2020-03-12 18:15:32 +00:00
Ben Ashbaugh
5964db454c move two subgroup queries from cl_kernel_info to cl_kernel_sub_group_info 2020-03-12 18:11:57 +00:00
Ben Ashbaugh
96f5bde690
add experimental enums (#70)
* add experimental enums

* use enum range reserved for cl_device_info
remove duplicated bitfields for atomic capabilities
add bitfields to experimental definitions

* add one more experimental enum

* adjust enum assignment to avoid collisions with extended versioning
2020-02-18 17:54:44 +00:00
Kévin Petit
debfc8a8b1
Add CL_IMPORT_DMA_BUF_DATA_CONSISTENCY_WITH_HOST_ARM definition (#72)
...and cleanup a comment.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-02-14 14:11:57 -08:00
James Price
b758718456 Add tests and Travis CI config (#64)
* Add tests and Travis CI config

The tests are copied from OpenCL-CTS. A small amount of additional
CMake work will be needed to test on Windows as well.

* Use non-system include paths for tests

* Add more header tests
2020-01-23 12:21:48 +00:00
Kévin Petit
4ba6f9bee8
Add definitions for cl_arm_import_memory_android_hardware_buffer (#61)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-16 14:44:16 +00:00
James Price
c84c8106f7 Add version guards to ICD declarations (#63)
This allows the cl_icd.h header to be included when
CL_TARGET_OPENCL_VERSION is defined to something other than the most
recent version.
2020-01-16 14:44:02 +00:00
Kévin Petit
de78569cf6 Add cl_khr_extended_versioning definitions (#59)
* Add cl_khr_extended_versioning definitions

Signed-off-by: Einar Hov <einar.hov@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>

* Fix definition of CL_VERSION_MAJOR_KHR

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-01-09 10:16:03 -08:00
Kévin Petit
464adbaa76 Add API function pointer and ICD dispatch table definitions (#50)
...so that implementations (and others) can use definitions
straight from the headers instead of mirroring them.

The definitions come from https://github.com/KhronosGroup/OpenCL-ICD-Loader
with the following name changes:

- function pointers are now prefixed with 'cl_api_'
- the dispatch table type is now 'cl_icd_dispatch'

Contributes to https://github.com/KhronosGroup/OpenCL-ICD-Loader/issues/72

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-12-16 14:25:23 -08:00
Kévin Petit
0d5f18c6e7
Add definitions for cl_arm_job_slot_selection (#52)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-08-06 17:33:11 +01:00
Nuno Fachada
c5a4bbeabb Fix _cl_image_desc for OpenCL 1.2 compatibility 2019-05-03 07:04:04 +01:00
Kévin Petit
745c724b4a
Simplify the definition of deprecation prefixes/suffixes (#45)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2019-04-12 11:16:04 +01:00
bashbaug
49b601ba14 added suffixed enums for cl_khr_image2d_from_buffer 2019-03-12 10:47:20 -07:00
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