Commit Graph

242 Commits

Author SHA1 Message Date
John Plate
eea2ab6219
Fixes for usage of macro CL_API_ENTRY (#162) 2021-04-14 23:20:44 -07:00
Ben Ashbaugh
23710f1b99
cl_intel_command_queue_families extension (#155) 2021-02-21 00:15:52 -05:00
Milkey Mouse
ac0bf07a6c
Update default OpenCL version in README (#160)
Since commit 9fac4e9, OpenCL 3.0, not 2.0 has been the default version
if CL_TARGET_OPENCL_VERSION is not defined.
2021-02-20 23:26:35 -05:00
Kévin Petit
9d46d9580c
Replace uses of CL_EXT_{PRE,SUF}FIX* with CL_API_{PRE,SUF}FIX* (#158)
Contributes to #153

Signed-off-by: Kévin Petit <kevin.petit@arm.com>
2021-02-19 22:12:38 +00:00
Ben Ashbaugh
d1b936b72b
do not include cl_gl_ext.h from opencl.h (#159) 2021-02-16 21:50:34 -05:00
Ben Ashbaugh
95d1b3fb54
move cl_khr_gl_event to cl_gl.h (#156) 2021-02-16 15:32:41 -05:00
Ben Ashbaugh
f74fc79147
Add testing for cl_d3d10.h, cl_d3d11.h, and cl_dx9_media_sharing.h (#123)
* Add testing for cl_d3d10.h, cl_d3d11.h, and cl_dx9_media_sharing.h

* add a test for cl_dx9_media_sharing_intel.h
2021-02-16 15:19:03 -05:00
Kévin Petit
4a70f93bfc
Add definitions for cl_arm_import_memory_android_hardware_buffer v1.1.0 (#157)
Signed-off-by: Einar Hov <einar.hov@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I91b3738d389b1cada65869d6ac990ceca8381746
2021-02-15 12:43:08 -08:00
Kévin Petit
d0d6457792
Add support for user-supplied prefix/suffix in function declarations (#154)
This change adds the ability for a user of the headers to pass
prefixes or suffixes to be used in the function prototypes via
(respectively) CL_API_PREFIX_USER and CL_API_SUFFIX_USER.

This can be used to pass additional attributes (e.g. to use
weak symbols).

Signed-off-by: Kévin Petit <kpet@free.fr>
2021-02-15 20:35:49 +00:00
Brice Videau
18eaa39c9c
Move cl_icd_layer.h from OpenCL-ICD-Loader to OpenCL-Headers. (#148)
* Move cl_icd_layer.h from OpenCL-ICD-Loader to OpenCL-Headers.

* Added test for cl_icd_layer.h single inclusion.

* Added missing test_cl_icd_layer.h.c file.

* Changed include guard to non reserved identifier.

* Renamed cl_icd_layer.h to cl_layer.h.

* Fix tests and guard.
2021-02-11 15:16:32 -08:00
Kévin Petit
2378fb98e7
Add definitions for cl_arm_controlled_kernel_termination (#152)
* Add definitions for cl_arm_controlled_kernel_termination

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I8802d7ef06b619814f898b5215f3592886a744bf

* Break cl_command_termination_reason_arm enum into separate definitions

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I109b45a222736a5d5346f44ea42e90271a1c79fe

* Add cl_device_controlled_termination_capabilities_arm

Change-Id: Ic5a0f40e96a0ac03eddca2a4eed26756ce5130ec
2021-02-11 08:30:08 -08:00
Kévin Petit
c271d3cd13
Add definitions for cl_arm_scheduling_controls v0.3.0 (#151)
Change-Id: I90bb9c47bf8aaa8f6499cd8eae33858dda50672f
Signed-off-by: Neil Hickey <neil.hickey@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-02-09 20:53:44 -08:00
Kévin Petit
6ddf40b51b
Remove unused CL_EXTENSION_WEAK_LINK definition (#150)
Signed-off-by: Kévin Petit <kevin.petit@arm.com>
2021-02-03 15:11:06 -08:00
Ben Ashbaugh
fb6807bfc9
move Intel extensions into common files (#129)
* move Intel extensions into common files

* switch from #warning to #pragma message

Using #warning will cause projects with warnings as errors enabled
to stop building.

* add back testing for cl_ext_intel.h
2021-01-29 00:00:42 +00:00
Kévin Petit
dc461719e5
Add definitions for cl_arm_scheduling_controls v0.2.0 (#147)
Signed-off-by: Oualid Khelifi <oualid.khelifi@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-01-12 10:06:17 -08:00
Jon Leech
7edca72746
Update apt package list in CI before running cmake (#143)
* Update apt before it's invoked by cmake
2020-12-19 22:25:02 +00:00
Ben Ashbaugh
c57ba81c46 re-enable format string warning in CI 2020-12-09 11:53:44 -05:00
Ben Ashbaugh
0885415c0f use PRId64 and PRIu64 when printing 64-bit values 2020-12-09 11:53:44 -05:00
Ben Ashbaugh
cc54363c8c fix test format string warnings 2020-12-09 11:53:44 -05:00
Ben Ashbaugh
8c8faa3bc1 fix origin argument names for rect functions 2020-12-09 11:52:47 -05:00
James Price
1f0eb1131b
Enable GitHub Actions for pull requests (#141) 2020-12-09 08:51:59 -08:00
Jeremy Kemp
3259391929
Added definitions for cl_img_generate_mipmap. (#135)
Accompanies KhronosGroup/OpenCL-Docs#489
2020-11-27 21:55:01 -08:00
Jeremy Kemp
c65949121e
Added missing define for cl_img_use_gralloc_ptr. (#134) 2020-11-27 21:47:01 -08:00
Jeremy Kemp
ee1eff645f
Use the alignment attribute under Integrity OS. (#131) 2020-11-27 21:44:14 -08:00
Nagy-Egri Máté Ferenc
006fc6797e
Comprehensive CMake Package Config support (#107)
* Add CMake Packaging + CI For Package

* Uniform formatting

* Explicit compiler detection

* Simplify exported target name

* Changed include dir to SYSTEM BEFORE

* Remove travis

* Initial Github Actions yaml

* Fix CWD

* Remove CWD from YAML

* MSVC warning flags

* Fix CWD for CTest invocations

* Relative CWD

* runner.workspace

* enable tests in build

* Move to C flags

* Enable testing in CI

* GCC warnings

* Don't meddle with compiler flags in CMake

* C2059: syntax error: 'bad suffix on number'

* C4001: nonstd ext 'single line comment' was used

* /wd4001

* /wd4001 again

* Remove Za builds of cl_icd_h.c

* Fix oeprator precedence

* Refrain from altering global state

* Add C_STANDARD to GCC build

* Add 32-bit and 64-bit matrix dims

* Change -march to -m

* Try adding host

* install gcc-multilib

* Add GCC 8 & 9 multilib

* Install GCC multilib conditionally

* Add note on Windows C versions incoming

* Add INCRMENTAL to silence notice on full link

* Experiment with disabling

* Initial MacOS config

* Add ninja to MacOS build

* Fix nproc

* nproc -> sysctl

* Xcode

* cmd -> bash

* which gcc-9

* Actual GCC invocation

* Check gcc if symlink

* follow link

* Obtain env

* Cleanup

* Re-enable Windows and Linux

* Check pkgconfig

* Syntax fix

* INSTALL_PREFIX to PREFIX_PATH

* Use CONFIG

* Added bare and SDK consumption

* Fix bare target

* Fix test for unsued variable

* Add missing semi-colons

* Rework SDK emulation

* Fix indentation

* Fix build path for SDK consumption

* Add Windows consumption test

* MacOS

* Fix indentation

* Enable MacOS

* CMAKE_INSTALL_PREFIX >> CMAKE_PREFIX_PATH

* Fix install

* Install Release on Windows

* Re-enable Linux and Windows

* Added C99 builds

* Removed pkgconfig.c duplication

* Fix out-of-sync target in readme

* Added policy to make readme sample work

* match up paths in readme samples

* Homogenize target names

* Remove all warnings from sample readme

Co-authored-by: sL1pKn07 <sl1pkn07@gmail.com>
2020-11-24 19:18:58 +01:00
Jeremy Kemp
b7cad4bbf9
Added definitions for cl_img_mem_properties. (#136)
Accompanies KhronosGroup/OpenCL-Docs#491
2020-11-20 13:40:27 -08:00
Ben Ashbaugh
9fac4e9866 switch the default version for the OpenCL headers to OpenCL 3.0 2020-10-14 16:36:27 +01:00
Ben Ashbaugh
b316a57d5b
re-enable anonymous unions by default (#125) 2020-10-07 09:56:12 -07:00
Nagy-Egri Máté Ferenc
d65bcc5123
Avoid anon structs when MSVC uses /Za (#116)
* Avoid anon structs when MSVC uses /Za

* Add popping warning for /Za builds

* reuse __CL_HAS_ANON_STRUCT__

* refine MSVC flags

* Fix preprocessor predicates

* Remove MSVC warning C4224

* Remove MSVC warning C4244

* Revamp warning flags based on compilers

* Guard system headers from warnings of extensions

* Remove commented code

* Remove redundant checks of _WIN32

* Rename param instead of comment
2020-09-30 08:32:57 +02:00
Ben Ashbaugh
9d17180a33
update APIs and enums for cl_intel_unified_shared_memory for rev Q (#108)
Specifically, adds the API for clMemBlockingFreeINTEL.
2020-09-27 14:49:57 -07:00
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