SNAPKITTYWEST commited on
Commit
a8baeed
·
verified ·
1 Parent(s): eb34bea

October 2026 main drop: mirror from GitHub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +6 -0
  2. .github/workflows/ci.yml +62 -0
  3. .gitignore +1 -0
  4. Cargo.lock +260 -0
  5. Cargo.toml +13 -0
  6. LICENSE +171 -0
  7. OpenCL-SDK-v2025.07.23-Win-x64/bin/OpenCL.dll +0 -0
  8. OpenCL-SDK-v2025.07.23-Win-x64/bin/OpenCL.pdb +3 -0
  9. OpenCL-SDK-v2025.07.23-Win-x64/bin/clinfo.exe +3 -0
  10. OpenCL-SDK-v2025.07.23-Win-x64/bin/cllayerinfo.exe +0 -0
  11. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Context.h +50 -0
  12. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Context.hpp +19 -0
  13. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Detail.hpp +84 -0
  14. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Device.hpp +21 -0
  15. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Error.h +88 -0
  16. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Error.hpp +70 -0
  17. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/ErrorCodes.h +5 -0
  18. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Event.h +13 -0
  19. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Event.hpp +21 -0
  20. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/File.h +55 -0
  21. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/File.hpp +36 -0
  22. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/InteropContext.hpp +18 -0
  23. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/OpenCLUtilsCpp_Export.h +43 -0
  24. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/OpenCLUtils_Export.h +43 -0
  25. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Platform.hpp +16 -0
  26. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Utils.h +11 -0
  27. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Utils.hpp +15 -0
  28. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl.h +1920 -0
  29. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl2.hpp +18 -0
  30. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_d3d10.h +268 -0
  31. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_d3d11.h +270 -0
  32. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_dx9_media_sharing.h +386 -0
  33. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_dx9_media_sharing_intel.h +18 -0
  34. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_egl.h +185 -0
  35. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_ext.h +0 -0
  36. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_ext_intel.h +19 -0
  37. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_function_types.h +1184 -0
  38. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_gl.h +421 -0
  39. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_gl_ext.h +18 -0
  40. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_half.h +440 -0
  41. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_icd.h +342 -0
  42. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_layer.h +125 -0
  43. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_platform.h +1407 -0
  44. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_va_api_media_sharing_intel.h +220 -0
  45. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_version.h +81 -0
  46. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/opencl.h +32 -0
  47. OpenCL-SDK-v2025.07.23-Win-x64/include/CL/opencl.hpp +0 -0
  48. OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCL.lib +0 -0
  49. OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLExt.lib +3 -0
  50. OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLUtils.lib +0 -0
.gitattributes CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ OpenCL-SDK-v2025.07.23-Win-x64/bin/OpenCL.pdb filter=lfs diff=lfs merge=lfs -text
37
+ OpenCL-SDK-v2025.07.23-Win-x64/bin/clinfo.exe filter=lfs diff=lfs merge=lfs -text
38
+ OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLExt.lib filter=lfs diff=lfs merge=lfs -text
39
+ OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLUtilsCpp.lib filter=lfs diff=lfs merge=lfs -text
40
+ OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLUtilsCppd.lib filter=lfs diff=lfs merge=lfs -text
41
+ OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLUtilsd.lib filter=lfs diff=lfs merge=lfs -text
.github/workflows/ci.yml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ rust:
18
+ name: Rust (fmt, clippy, tests on PoCL)
19
+ runs-on: ubuntu-24.04
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - name: Install OpenCL (PoCL CPU device)
23
+ run: |
24
+ sudo apt-get update
25
+ sudo apt-get install -y --no-install-recommends pocl-opencl-icd ocl-icd-opencl-dev clinfo
26
+ clinfo -l
27
+ - uses: dtolnay/rust-toolchain@stable
28
+ with:
29
+ components: rustfmt, clippy
30
+ - uses: Swatinem/rust-cache@v2
31
+ - run: cargo fmt --check
32
+ - run: cargo clippy --all-targets -- -D warnings
33
+ # Serial: PoCL 5.0 can abort (pocl_release_dlhandle_cache assertion) when
34
+ # several OpenCL contexts are released from different threads at once.
35
+ - run: cargo test
36
+ env:
37
+ RUST_TEST_THREADS: "1"
38
+ - run: cargo run --quiet
39
+
40
+ msrv:
41
+ name: Rust 1.85 (rust-version)
42
+ runs-on: ubuntu-24.04
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+ - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ocl-icd-opencl-dev
46
+ - uses: dtolnay/rust-toolchain@1.85
47
+ - run: cargo build --all-targets --locked
48
+
49
+ bit-accelerator:
50
+ name: bit_accelerator (lint, simulation, Why3)
51
+ runs-on: ubuntu-24.04
52
+ defaults:
53
+ run:
54
+ working-directory: bit_accelerator
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - name: Install tools
58
+ run: |
59
+ sudo apt-get update
60
+ sudo apt-get install -y --no-install-recommends iverilog verilator why3 z3
61
+ why3 config detect
62
+ - run: make test
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ /target
Cargo.lock ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "autocfg"
7
+ version = "1.5.0"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
10
+
11
+ [[package]]
12
+ name = "bitflags"
13
+ version = "1.3.2"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
16
+
17
+ [[package]]
18
+ name = "cl-sys"
19
+ version = "0.4.3"
20
+ source = "registry+https://github.com/rust-lang/crates.io-index"
21
+ checksum = "4febd824a957638c066180fbf72b2bed5bcee33740773f3dc59fe91f0a3e6595"
22
+ dependencies = [
23
+ "libc",
24
+ ]
25
+
26
+ [[package]]
27
+ name = "crossbeam"
28
+ version = "0.8.4"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8"
31
+ dependencies = [
32
+ "crossbeam-channel",
33
+ "crossbeam-deque",
34
+ "crossbeam-epoch",
35
+ "crossbeam-queue",
36
+ "crossbeam-utils",
37
+ ]
38
+
39
+ [[package]]
40
+ name = "crossbeam-channel"
41
+ version = "0.5.15"
42
+ source = "registry+https://github.com/rust-lang/crates.io-index"
43
+ checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
44
+ dependencies = [
45
+ "crossbeam-utils",
46
+ ]
47
+
48
+ [[package]]
49
+ name = "crossbeam-deque"
50
+ version = "0.8.6"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
53
+ dependencies = [
54
+ "crossbeam-epoch",
55
+ "crossbeam-utils",
56
+ ]
57
+
58
+ [[package]]
59
+ name = "crossbeam-epoch"
60
+ version = "0.9.18"
61
+ source = "registry+https://github.com/rust-lang/crates.io-index"
62
+ checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
63
+ dependencies = [
64
+ "crossbeam-utils",
65
+ ]
66
+
67
+ [[package]]
68
+ name = "crossbeam-queue"
69
+ version = "0.3.12"
70
+ source = "registry+https://github.com/rust-lang/crates.io-index"
71
+ checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"
72
+ dependencies = [
73
+ "crossbeam-utils",
74
+ ]
75
+
76
+ [[package]]
77
+ name = "crossbeam-utils"
78
+ version = "0.8.21"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
81
+
82
+ [[package]]
83
+ name = "enum_primitive"
84
+ version = "0.1.1"
85
+ source = "registry+https://github.com/rust-lang/crates.io-index"
86
+ checksum = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180"
87
+ dependencies = [
88
+ "num-traits 0.1.43",
89
+ ]
90
+
91
+ [[package]]
92
+ name = "futures"
93
+ version = "0.1.31"
94
+ source = "registry+https://github.com/rust-lang/crates.io-index"
95
+ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678"
96
+
97
+ [[package]]
98
+ name = "gpu"
99
+ version = "0.1.0"
100
+ dependencies = [
101
+ "ocl",
102
+ ]
103
+
104
+ [[package]]
105
+ name = "libc"
106
+ version = "0.2.183"
107
+ source = "registry+https://github.com/rust-lang/crates.io-index"
108
+ checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
109
+
110
+ [[package]]
111
+ name = "nodrop"
112
+ version = "0.1.14"
113
+ source = "registry+https://github.com/rust-lang/crates.io-index"
114
+ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
115
+
116
+ [[package]]
117
+ name = "num-complex"
118
+ version = "0.4.6"
119
+ source = "registry+https://github.com/rust-lang/crates.io-index"
120
+ checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
121
+ dependencies = [
122
+ "num-traits 0.2.19",
123
+ ]
124
+
125
+ [[package]]
126
+ name = "num-traits"
127
+ version = "0.1.43"
128
+ source = "registry+https://github.com/rust-lang/crates.io-index"
129
+ checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
130
+ dependencies = [
131
+ "num-traits 0.2.19",
132
+ ]
133
+
134
+ [[package]]
135
+ name = "num-traits"
136
+ version = "0.2.19"
137
+ source = "registry+https://github.com/rust-lang/crates.io-index"
138
+ checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
139
+ dependencies = [
140
+ "autocfg",
141
+ ]
142
+
143
+ [[package]]
144
+ name = "ocl"
145
+ version = "0.19.7"
146
+ source = "registry+https://github.com/rust-lang/crates.io-index"
147
+ checksum = "4297afb442d411793e4e24ee5a2977d15b6c95c743418f1c0ce0a2397d7ec8a3"
148
+ dependencies = [
149
+ "futures",
150
+ "nodrop",
151
+ "num-traits 0.2.19",
152
+ "ocl-core",
153
+ "qutex",
154
+ "thiserror",
155
+ ]
156
+
157
+ [[package]]
158
+ name = "ocl-core"
159
+ version = "0.11.5"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "c145dd9f205b86611a5df15eb89517417b03005441cf6cec245c65a4b9248c52"
162
+ dependencies = [
163
+ "bitflags",
164
+ "cl-sys",
165
+ "enum_primitive",
166
+ "num-complex",
167
+ "num-traits 0.2.19",
168
+ "ocl-core-vector",
169
+ "rustc_version",
170
+ "thiserror",
171
+ ]
172
+
173
+ [[package]]
174
+ name = "ocl-core-vector"
175
+ version = "0.1.1"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ checksum = "f562279e046ca160aeed5eaf6f7c4eb9fa56cb8fd9d038dbdbf56225caeb8074"
178
+ dependencies = [
179
+ "num-traits 0.2.19",
180
+ ]
181
+
182
+ [[package]]
183
+ name = "proc-macro2"
184
+ version = "1.0.106"
185
+ source = "registry+https://github.com/rust-lang/crates.io-index"
186
+ checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
187
+ dependencies = [
188
+ "unicode-ident",
189
+ ]
190
+
191
+ [[package]]
192
+ name = "quote"
193
+ version = "1.0.45"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
196
+ dependencies = [
197
+ "proc-macro2",
198
+ ]
199
+
200
+ [[package]]
201
+ name = "qutex"
202
+ version = "0.2.6"
203
+ source = "registry+https://github.com/rust-lang/crates.io-index"
204
+ checksum = "11778238e7d8b0e3ca62033fdc69e01ef5cdb08809cdc2398b2ce5ec873a1757"
205
+ dependencies = [
206
+ "crossbeam",
207
+ "futures",
208
+ ]
209
+
210
+ [[package]]
211
+ name = "rustc_version"
212
+ version = "0.4.1"
213
+ source = "registry+https://github.com/rust-lang/crates.io-index"
214
+ checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
215
+ dependencies = [
216
+ "semver",
217
+ ]
218
+
219
+ [[package]]
220
+ name = "semver"
221
+ version = "1.0.27"
222
+ source = "registry+https://github.com/rust-lang/crates.io-index"
223
+ checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
224
+
225
+ [[package]]
226
+ name = "syn"
227
+ version = "2.0.117"
228
+ source = "registry+https://github.com/rust-lang/crates.io-index"
229
+ checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
230
+ dependencies = [
231
+ "proc-macro2",
232
+ "quote",
233
+ "unicode-ident",
234
+ ]
235
+
236
+ [[package]]
237
+ name = "thiserror"
238
+ version = "1.0.69"
239
+ source = "registry+https://github.com/rust-lang/crates.io-index"
240
+ checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
241
+ dependencies = [
242
+ "thiserror-impl",
243
+ ]
244
+
245
+ [[package]]
246
+ name = "thiserror-impl"
247
+ version = "1.0.69"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
250
+ dependencies = [
251
+ "proc-macro2",
252
+ "quote",
253
+ "syn",
254
+ ]
255
+
256
+ [[package]]
257
+ name = "unicode-ident"
258
+ version = "1.0.24"
259
+ source = "registry+https://github.com/rust-lang/crates.io-index"
260
+ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
Cargo.toml ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [package]
2
+ name = "gpu"
3
+ version = "0.1.0"
4
+ edition = "2024"
5
+ rust-version = "1.85"
6
+ description = "Composable element-wise OpenCL kernels over canonical u8 Boolean buffers"
7
+ repository = "https://github.com/SNAPKITTYAGENT9NOVA/rust-opencl-gpu"
8
+ license-file = "LICENSE"
9
+ readme = "README.md"
10
+ publish = false
11
+
12
+ [dependencies]
13
+ ocl = "0.19"
LICENSE ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SNAPKITTY BIT HARDWARE SOURCE LICENSE
2
+
3
+ Version 1.0
4
+
5
+ Copyright © 2026 SnapKitty Collective. All rights reserved.
6
+
7
+ 1. Definitions
8
+
9
+ “Software” means software distributed with this project.
10
+
11
+ “Hardware” means RTL, HDL, netlists, hardware descriptions, circuit descriptions, formal specifications, verification artifacts, and other hardware-design materials contained in this project.
12
+
13
+ “Core” means the bit-string accelerator implementation and its directly derived hardware implementations.
14
+
15
+ “Licensee” means any person or organization exercising rights granted by this License.
16
+
17
+ “Modified Core” means a modified or derivative version of the Core.
18
+
19
+ 2. Copyright Permission
20
+
21
+ Subject to the terms of this License, SnapKitty Collective grants Licensee a worldwide, non-exclusive, royalty-free license to:
22
+
23
+ - use the Hardware;
24
+ - study the Hardware;
25
+ - reproduce the Hardware;
26
+ - modify the Hardware;
27
+ - create derivative works;
28
+ - compile, synthesize, simulate, and manufacture products incorporating the Hardware;
29
+ - use the Hardware commercially.
30
+
31
+ 3. Commercial Use
32
+
33
+ Commercial use is expressly permitted.
34
+
35
+ Licensee may:
36
+
37
+ - manufacture integrated circuits;
38
+ - manufacture FPGA implementations;
39
+ - manufacture ASIC implementations;
40
+ - sell hardware incorporating the Core;
41
+ - license products incorporating the Core;
42
+ - provide commercial services using the Core;
43
+ - integrate the Core into commercial systems.
44
+
45
+ No additional royalty is owed to SnapKitty Collective solely because the Core is used commercially.
46
+
47
+ 4. Modification and Redistribution
48
+
49
+ Modified versions of the Core may be created.
50
+
51
+ If a Modified Core is distributed publicly, the distributor must:
52
+
53
+ 1. preserve this License;
54
+ 2. retain existing copyright notices;
55
+ 3. identify material modifications;
56
+ 4. provide the corresponding modified Core source;
57
+ 5. provide the same rights granted by this License for the Modified Core.
58
+
59
+ A distributor may not impose additional restrictions that prevent recipients from exercising the rights granted by this License.
60
+
61
+ 5. Proprietary Systems
62
+
63
+ Use of the Core inside a larger system does not require the larger system to be licensed under this License.
64
+
65
+ A proprietary product may contain or interface with the Core.
66
+
67
+ For example:
68
+
69
+ Proprietary Product
70
+ │
71
+ ├── Proprietary Logic
72
+ ├── Proprietary Firmware
73
+ ├── Proprietary Software
74
+ │
75
+ └── SnapKitty Bit Accelerator
76
+ │
77
+ └── licensed under this License
78
+
79
+ Only the Core and Modified Core remain subject to the source-sharing requirements of this License.
80
+
81
+ 6. Generated Hardware
82
+
83
+ Synthesis products generated from the Core, including:
84
+
85
+ - FPGA bitstreams;
86
+ - ASIC netlists;
87
+ - gate-level representations;
88
+ - placed-and-routed designs;
89
+ - manufactured chips;
90
+
91
+ may be commercially distributed.
92
+
93
+ Distribution of a generated hardware artifact does not by itself require distribution of unrelated proprietary portions of the containing system.
94
+
95
+ 7. Attribution
96
+
97
+ Redistributions of the Core must preserve reasonable attribution to:
98
+
99
+ SnapKitty Collective
100
+
101
+ Copyright notices and this License must remain included with source distributions.
102
+
103
+ 8. Patent Grant
104
+
105
+ Each contributor grants Licensee a worldwide, non-exclusive, royalty-free patent license to make, have made, use, sell, offer for sale, import, and otherwise transfer the Core, but only for patent claims necessarily infringed by that contributor's contribution to the Core.
106
+
107
+ If Licensee initiates patent litigation alleging that the Core itself infringes a patent, the patent license granted to that Licensee under this section terminates as of the date the litigation is initiated.
108
+
109
+ 9. No Trademark License
110
+
111
+ This License does not grant permission to use:
112
+
113
+ SnapKitty
114
+ SnapKitty Collective
115
+ SnapKitty West
116
+
117
+ or associated trademarks, logos, or branding except as reasonably necessary to identify the origin of the licensed work.
118
+
119
+ 10. No Warranty
120
+
121
+ THE HARDWARE AND SOFTWARE ARE PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OR NON-INFRINGEMENT.
122
+
123
+ LICENSEE ASSUMES ALL RISK ASSOCIATED WITH THE USE, SYNTHESIS, MANUFACTURE, DEPLOYMENT, AND OPERATION OF THE HARDWARE.
124
+
125
+ 11. Limitation of Liability
126
+
127
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING FROM USE OF THE HARDWARE OR SOFTWARE.
128
+
129
+ 12. No Certification
130
+
131
+ Use of this Hardware does not imply that SnapKitty Collective certifies:
132
+
133
+ - manufactured chips;
134
+ - FPGA implementations;
135
+ - safety-critical systems;
136
+ - security properties;
137
+ - regulatory compliance;
138
+ - performance characteristics;
139
+ - suitability for any particular application.
140
+
141
+ 13. License Termination
142
+
143
+ The rights granted under this License terminate automatically if Licensee materially violates its terms.
144
+
145
+ Rights are reinstated automatically if the violation is cured within thirty (30) days after discovery or notification of the violation.
146
+
147
+ Termination does not terminate licenses already properly granted to recipients who are not themselves in violation of this License.
148
+
149
+ 14. Entire License
150
+
151
+ This License constitutes the complete license governing the Core unless a separate written agreement expressly supersedes it.
152
+
153
+ Nothing in this License limits rights that Licensee may have independently under applicable copyright, patent, or other law.
154
+
155
+ ---
156
+
157
+ SNAPKITTY BIT HARDWARE SOURCE LICENSE v1.0
158
+
159
+ Commercial use: PERMITTED
160
+
161
+ Modification: PERMITTED
162
+
163
+ Commercial manufacturing: PERMITTED
164
+
165
+ FPGA/ASIC implementation: PERMITTED
166
+
167
+ Commercial sale: PERMITTED
168
+
169
+ Modified Core redistribution: SOURCE + SAME LICENSE REQUIRED
170
+
171
+ Larger proprietary systems: PERMITTED
OpenCL-SDK-v2025.07.23-Win-x64/bin/OpenCL.dll ADDED
Binary file (78.8 kB). View file
 
OpenCL-SDK-v2025.07.23-Win-x64/bin/OpenCL.pdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:638eb62f1e3834f528fd20e35a9facb405b8d53539b348ec99ec5427997ada78
3
+ size 1970176
OpenCL-SDK-v2025.07.23-Win-x64/bin/clinfo.exe ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85e7eb915dfad37603a5a811f190ae3bfc19d4a3131125f4a08dad12c1d2c1df
3
+ size 123904
OpenCL-SDK-v2025.07.23-Win-x64/bin/cllayerinfo.exe ADDED
Binary file (67.6 kB). View file
 
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Context.h ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtils_Export.h"
5
+
6
+ // OpenCL includes
7
+ #include <CL/cl.h>
8
+
9
+ // STL includes
10
+ #include <time.h>
11
+
12
+ UTILS_EXPORT
13
+ cl_context cl_util_get_context(const cl_uint plat_id, const cl_uint dev_id,
14
+ const cl_device_type type, cl_int* const error);
15
+ UTILS_EXPORT
16
+ cl_device_id cl_util_get_device(const cl_uint plat_id, const cl_uint dev_id,
17
+ const cl_device_type type, cl_int* const error);
18
+
19
+ UTILS_EXPORT
20
+ cl_int cl_util_print_device_info(const cl_device_id device);
21
+
22
+ UTILS_EXPORT
23
+ char* cl_util_get_device_info(const cl_device_id device,
24
+ const cl_device_info info, cl_int* const error);
25
+ UTILS_EXPORT
26
+ char* cl_util_get_platform_info(const cl_platform_id platform,
27
+ const cl_platform_info info,
28
+ cl_int* const error);
29
+
30
+ // build program and show log if build is not successful
31
+ UTILS_EXPORT
32
+ cl_int cl_util_build_program(const cl_program pr, const cl_device_id dev,
33
+ const char* const opt);
34
+
35
+ #define GET_CURRENT_TIMER(time) \
36
+ struct timespec time; \
37
+ timespec_get(&time, TIME_UTC); \
38
+ { \
39
+ }
40
+
41
+ #define TIMER_DIFFERENCE(dt, time1, time2) \
42
+ { \
43
+ dt = (time2.tv_sec - time1.tv_sec) * 1000000000 \
44
+ + (time2.tv_nsec - time1.tv_nsec); \
45
+ }
46
+
47
+ #define START_TIMER GET_CURRENT_TIMER(start_timer1)
48
+ #define STOP_TIMER(dt) \
49
+ GET_CURRENT_TIMER(stop_timer2) \
50
+ TIMER_DIFFERENCE(dt, start_timer1, stop_timer2)
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Context.hpp ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL SDK includes
4
+ #include "OpenCLUtilsCpp_Export.h"
5
+
6
+ #include <CL/Utils/Error.hpp>
7
+
8
+ // OpenCL includes
9
+ #include <CL/opencl.hpp>
10
+
11
+ namespace cl {
12
+ namespace util {
13
+ Context UTILSCPP_EXPORT get_context(cl_uint plat_id, cl_uint dev_id,
14
+ cl_device_type type,
15
+ cl_int* error = nullptr);
16
+
17
+ void UTILSCPP_EXPORT print_device_info(const cl::Device& device);
18
+ }
19
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Detail.hpp ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // STL includes
4
+ #include <stddef.h>
5
+ #include <utility> // std::forward, std::integer_sequence
6
+ #include <tuple> // std::tuple, std::get
7
+ #include <initializer_list> // std::initializer_list
8
+
9
+ namespace cl {
10
+ namespace util {
11
+ namespace detail {
12
+ // Borrowed from:
13
+ // https://www.fluentcpp.com/2019/03/05/for_each_arg-applying-a-function-to-each-argument-of-a-function-in-cpp/
14
+ template <class F, class... Args> F for_each_arg(F f, Args&&... args)
15
+ {
16
+ (void)std::initializer_list<int>{ (
17
+ (void)f(std::forward<Args>(args)), 0)... };
18
+ return f;
19
+ }
20
+
21
+ namespace impl {
22
+ // Borrowed from: https://stackoverflow.com/a/16387374/1476661
23
+ template <typename T, typename F, int... Is>
24
+ void for_each_in_tuple(T&& t, F&& f,
25
+ std::integer_sequence<int, Is...>)
26
+ {
27
+ auto l = {
28
+ (std::forward<F>(f)(std::get<Is>(std::forward<T>(t))), 0)...
29
+ };
30
+ (void)l;
31
+ }
32
+ }
33
+ template <typename... Ts, typename F>
34
+ void for_each_in_tuple(std::tuple<Ts...> const& t, F&& f)
35
+ {
36
+ impl::for_each_in_tuple(
37
+ t, std::forward<F>(f),
38
+ std::make_integer_sequence<int, sizeof...(Ts)>());
39
+ }
40
+
41
+ namespace impl {
42
+ // Borrowed from
43
+ // https://codereview.stackexchange.com/questions/193420/apply-a-function-to-each-element-of-a-tuple-map-a-tuple
44
+ template <class F, typename Tuple, std::size_t... Is>
45
+ auto transform_tuple(Tuple&& t, F&& f, std::index_sequence<Is...>)
46
+ {
47
+ return std::make_tuple(std::forward<F>(f)(std::get<Is>(t))...);
48
+ }
49
+ }
50
+ template <class F, typename... Args>
51
+ auto transform_tuple(const std::tuple<Args...>& t, F&& f)
52
+ {
53
+ return impl::transform_tuple(
54
+ t, std::forward<F>(f),
55
+ std::make_index_sequence<sizeof...(Args)>{});
56
+ }
57
+
58
+ namespace impl {
59
+ // Borrowed from
60
+ // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3658.html
61
+ // with modifications of Casey Carter at
62
+ // https://stackoverflow.com/a/51365112/1476661
63
+ template <typename F, typename Tuple, std::size_t... I>
64
+ auto apply(F&& f, Tuple&& args, std::index_sequence<I...>)
65
+ -> decltype(std::forward<F>(f)(
66
+ std::get<I>(std::forward<Tuple>(args))...))
67
+ {
68
+ return std::forward<F>(f)(
69
+ std::get<I>(std::forward<Tuple>(args))...);
70
+ }
71
+ }
72
+ template <typename F, typename Tuple,
73
+ typename Indices = std::make_index_sequence<
74
+ std::tuple_size<std::remove_reference_t<Tuple>>::value>>
75
+ auto apply(F&& f, Tuple&& args)
76
+ -> decltype(impl::apply(std::forward<F>(f),
77
+ std::forward<Tuple>(args), Indices()))
78
+ {
79
+ return impl::apply(std::forward<F>(f), std::forward<Tuple>(args),
80
+ Indices());
81
+ }
82
+ }
83
+ }
84
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Device.hpp ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #include "OpenCLUtilsCpp_Export.h"
4
+ #include <CL/Utils/Error.hpp>
5
+
6
+ #include <CL/opencl.hpp>
7
+
8
+ namespace cl {
9
+ namespace util {
10
+ bool UTILSCPP_EXPORT opencl_c_version_contains(
11
+ const cl::Device& device, const cl::string& version_fragment);
12
+
13
+ bool UTILSCPP_EXPORT supports_extension(const cl::Device& device,
14
+ const cl::string& extension);
15
+
16
+ #ifdef CL_VERSION_3_0
17
+ bool UTILSCPP_EXPORT supports_feature(const cl::Device& device,
18
+ const cl::string& feature_name);
19
+ #endif
20
+ }
21
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Error.h ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtils_Export.h"
5
+
6
+ // OpenCL Utils includes
7
+ #include <CL/Utils/ErrorCodes.h>
8
+
9
+ // STL includes
10
+ #include <stdio.h> // fprintf
11
+
12
+ // OpenCL includes
13
+ #include <CL/cl.h>
14
+
15
+ // RET = function returns error code
16
+ // PAR = functions sets error code in the paremeter
17
+
18
+ #ifdef _DEBUG
19
+
20
+ #define OCLERROR_RET(func, err, label) \
21
+ do \
22
+ { \
23
+ err = func; \
24
+ if (err != CL_SUCCESS) \
25
+ { \
26
+ cl_util_print_error(err); \
27
+ fprintf(stderr, "on line %d, in file %s\n%s\n", __LINE__, \
28
+ __FILE__, #func); \
29
+ goto label; \
30
+ } \
31
+ } while (0)
32
+
33
+ #define OCLERROR_PAR(func, err, label) \
34
+ do \
35
+ { \
36
+ func; \
37
+ if (err != CL_SUCCESS) \
38
+ { \
39
+ cl_util_print_error(err); \
40
+ fprintf(stderr, "on line %d, in file %s\n%s\n", __LINE__, \
41
+ __FILE__, #func); \
42
+ goto label; \
43
+ } \
44
+ } while (0)
45
+
46
+ #define MEM_CHECK(func, err, label) \
47
+ do \
48
+ { \
49
+ if ((func) == NULL) \
50
+ { \
51
+ err = CL_OUT_OF_HOST_MEMORY; \
52
+ cl_util_print_error(err); \
53
+ fprintf(stderr, "on line %d, in file %s\n%s\n", __LINE__, \
54
+ __FILE__, #func); \
55
+ goto label; \
56
+ } \
57
+ } while (0)
58
+
59
+ #else
60
+
61
+ #define OCLERROR_RET(func, err, label) \
62
+ do \
63
+ { \
64
+ err = func; \
65
+ if (err != CL_SUCCESS) goto label; \
66
+ } while (0)
67
+
68
+ #define OCLERROR_PAR(func, err, label) \
69
+ do \
70
+ { \
71
+ func; \
72
+ if (err != CL_SUCCESS) goto label; \
73
+ } while (0)
74
+
75
+ #define MEM_CHECK(func, err, label) \
76
+ do \
77
+ { \
78
+ if ((func) == NULL) \
79
+ { \
80
+ err = CL_OUT_OF_HOST_MEMORY; \
81
+ goto label; \
82
+ } \
83
+ } while (0)
84
+
85
+ #endif
86
+
87
+ UTILS_EXPORT
88
+ void cl_util_print_error(cl_int error);
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Error.hpp ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtilsCpp_Export.h"
5
+
6
+ // OpenCL Utils includes
7
+ #include <CL/Utils/ErrorCodes.h>
8
+
9
+ // OpenCL includes
10
+ #include <CL/opencl.hpp>
11
+
12
+ namespace cl {
13
+ namespace util {
14
+ #if defined(CL_HPP_ENABLE_EXCEPTIONS)
15
+ /*! \brief Exception class
16
+ *
17
+ * This may be thrown by SDK utility functions when
18
+ * CL_HPP_ENABLE_EXCEPTIONS is defined.
19
+ */
20
+ class Error : public std::exception {
21
+ private:
22
+ int err_;
23
+ const char* errStr_;
24
+
25
+ public:
26
+ /*! \brief Create a new SDK error exception for a given error code
27
+ * and corresponding message.
28
+ *
29
+ * \param err error code value.
30
+ *
31
+ * \param errStr a descriptive string that must remain in scope until
32
+ * handling of the exception has concluded. If set, it
33
+ * will be returned by what().
34
+ */
35
+ Error(cl_int err, const char* errStr = NULL): err_(err), errStr_(errStr)
36
+ {}
37
+
38
+ ~Error() noexcept {}
39
+
40
+ /*! \brief Get error string associated with exception
41
+ *
42
+ * \return A memory pointer to the error message string.
43
+ */
44
+ virtual const char* what() const noexcept
45
+ {
46
+ if (errStr_ == NULL)
47
+ {
48
+ return "empty";
49
+ }
50
+ else
51
+ {
52
+ return errStr_;
53
+ }
54
+ }
55
+
56
+ /*! \brief Get error code associated with exception
57
+ *
58
+ * \return The error code.
59
+ */
60
+ cl_int err(void) const { return err_; }
61
+ };
62
+ #endif
63
+
64
+ namespace detail {
65
+ UTILSCPP_EXPORT cl_int errHandler(cl_int err, cl_int* errPtr,
66
+ const char* errStr = nullptr);
67
+ }
68
+
69
+ }
70
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/ErrorCodes.h ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #define CL_UTIL_INDEX_OUT_OF_RANGE -2000
4
+ #define CL_UTIL_DEVICE_NOT_INTEROPERABLE -2001
5
+ #define CL_UTIL_FILE_OPERATION_ERROR -2002
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Event.h ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtils_Export.h"
5
+
6
+ // OpenCL includes
7
+ #include <CL/cl.h>
8
+
9
+ UTILS_EXPORT
10
+ cl_ulong cl_util_get_event_duration(const cl_event event,
11
+ const cl_profiling_info start,
12
+ const cl_profiling_info end,
13
+ cl_int* const error);
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Event.hpp ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL SDK includes
4
+ #include "OpenCLUtilsCpp_Export.h"
5
+
6
+ // STL includes
7
+ #include <chrono>
8
+
9
+ // OpenCL includes
10
+ #include <CL/opencl.hpp>
11
+
12
+ namespace cl {
13
+ namespace util {
14
+ template <cl_int From, cl_int To, typename Dur = std::chrono::nanoseconds>
15
+ auto get_duration(cl::Event& ev)
16
+ {
17
+ return std::chrono::duration_cast<Dur>(std::chrono::nanoseconds{
18
+ ev.getProfilingInfo<To>() - ev.getProfilingInfo<From>() });
19
+ }
20
+ }
21
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/File.h ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtils_Export.h"
5
+
6
+ // OpenCL includes
7
+ #include <CL/cl.h>
8
+
9
+ // read all the text file contents securely in ANSI C89
10
+ // return pointer to C-string with file contents
11
+ // can handle streams with no known size and no support for fseek
12
+ // based on https://stackoverflow.com/questions/14002954/ by Nominal Animal
13
+ UTILS_EXPORT
14
+ char* cl_util_read_text_file(const char* const filename, size_t* const length,
15
+ cl_int* const error);
16
+
17
+ // read all the binary file contents securely in ANSI C89
18
+ // return pointer to file contents
19
+ // can handle streams with no known size and no support for fseek
20
+ // based on https://stackoverflow.com/questions/14002954/ by Nominal Animal
21
+ UTILS_EXPORT
22
+ unsigned char* cl_util_read_binary_file(const char* const filename,
23
+ size_t* const length,
24
+ cl_int* const error);
25
+
26
+ // write binaries of OpenCL compiled program
27
+ // binaries are written as separate files for each device
28
+ // with file name "(program_file_name)_(name of device).bin"
29
+ // based on variant of Logan
30
+ // http://logan.tw/posts/2014/11/22/pre-compile-the-opencl-kernel-program-part-2/
31
+ UTILS_EXPORT
32
+ cl_int cl_util_write_binaries(const cl_program program,
33
+ const char* const program_file_name);
34
+
35
+ // read binaries of OpenCL compiled program
36
+ // from files of file names "(program_file_name)_(name of device).bin"
37
+ UTILS_EXPORT
38
+ cl_program cl_util_read_binaries(const cl_context context,
39
+ const cl_device_id* const devices,
40
+ const cl_uint num_devices,
41
+ const char* const program_file_name,
42
+ cl_int* const error);
43
+
44
+ // returns the folder containing the running executable
45
+ UTILS_EXPORT
46
+ cl_int cl_util_executable_folder(char* filename, size_t* const length);
47
+
48
+ // read all the text file contents securely in ANSI C89
49
+ // return pointer to C-string with file contents
50
+ // interprets filename relative to the folder containing
51
+ // the running executable
52
+ UTILS_EXPORT
53
+ char* cl_util_read_exe_relative_text_file(const char* const rel_path,
54
+ size_t* const length,
55
+ cl_int* const error);
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/File.hpp ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL SDK includes
4
+ #include "OpenCLUtilsCpp_Export.h"
5
+
6
+ #include <CL/Utils/Error.hpp>
7
+
8
+ // OpenCL includes
9
+ #include <CL/opencl.hpp>
10
+
11
+
12
+ namespace cl {
13
+ namespace util {
14
+
15
+ std::string UTILSCPP_EXPORT read_text_file(const char* const filename,
16
+ cl_int* const error = nullptr);
17
+
18
+ std::vector<unsigned char> UTILSCPP_EXPORT
19
+ read_binary_file(const char* const filename, cl_int* const error = nullptr);
20
+
21
+ Program::Binaries UTILSCPP_EXPORT read_binary_files(
22
+ const std::vector<cl::Device>& devices,
23
+ const char* const program_file_name, cl_int* const error = nullptr);
24
+
25
+ cl_int UTILSCPP_EXPORT
26
+ write_binaries(const cl::Program::Binaries& binaries,
27
+ const std::vector<cl::Device>& devices,
28
+ const char* const program_file_name);
29
+
30
+ std::string UTILSCPP_EXPORT
31
+ executable_folder(cl_int* const error = nullptr);
32
+
33
+ std::string UTILSCPP_EXPORT read_exe_relative_text_file(
34
+ const char* const filename, cl_int* const error = nullptr);
35
+ }
36
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/InteropContext.hpp ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #include "OpenCLUtilsCpp_Export.h"
4
+ #include <CL/Utils/Error.hpp>
5
+
6
+ #include <CL/opencl.hpp>
7
+
8
+ namespace cl {
9
+ namespace util {
10
+ vector<cl_context_properties>
11
+ UTILSCPP_EXPORT get_interop_context_properties(const cl::Device& plat,
12
+ cl_int* error = nullptr);
13
+
14
+ Context UTILSCPP_EXPORT get_interop_context(int plat_id, int dev_id,
15
+ cl_device_type type,
16
+ cl_int* error = nullptr);
17
+ }
18
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/OpenCLUtilsCpp_Export.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #ifndef UTILSCPP_EXPORT_H
3
+ #define UTILSCPP_EXPORT_H
4
+
5
+ #ifdef OPENCLUTILSCPP_STATIC_DEFINE
6
+ # define UTILSCPP_EXPORT
7
+ # define OPENCLUTILSCPP_NO_EXPORT
8
+ #else
9
+ # ifndef UTILSCPP_EXPORT
10
+ # ifdef OpenCLUtilsCpp_EXPORTS
11
+ /* We are building this library */
12
+ # define UTILSCPP_EXPORT
13
+ # else
14
+ /* We are using this library */
15
+ # define UTILSCPP_EXPORT
16
+ # endif
17
+ # endif
18
+
19
+ # ifndef OPENCLUTILSCPP_NO_EXPORT
20
+ # define OPENCLUTILSCPP_NO_EXPORT
21
+ # endif
22
+ #endif
23
+
24
+ #ifndef OPENCLUTILSCPP_DEPRECATED
25
+ # define OPENCLUTILSCPP_DEPRECATED __declspec(deprecated)
26
+ #endif
27
+
28
+ #ifndef OPENCLUTILSCPP_DEPRECATED_EXPORT
29
+ # define OPENCLUTILSCPP_DEPRECATED_EXPORT UTILSCPP_EXPORT OPENCLUTILSCPP_DEPRECATED
30
+ #endif
31
+
32
+ #ifndef OPENCLUTILSCPP_DEPRECATED_NO_EXPORT
33
+ # define OPENCLUTILSCPP_DEPRECATED_NO_EXPORT OPENCLUTILSCPP_NO_EXPORT OPENCLUTILSCPP_DEPRECATED
34
+ #endif
35
+
36
+ /* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */
37
+ #if 0 /* DEFINE_NO_DEPRECATED */
38
+ # ifndef OPENCLUTILSCPP_NO_DEPRECATED
39
+ # define OPENCLUTILSCPP_NO_DEPRECATED
40
+ # endif
41
+ #endif
42
+
43
+ #endif /* UTILSCPP_EXPORT_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/OpenCLUtils_Export.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #ifndef UTILS_EXPORT_H
3
+ #define UTILS_EXPORT_H
4
+
5
+ #ifdef OPENCLUTILS_STATIC_DEFINE
6
+ # define UTILS_EXPORT
7
+ # define OPENCLUTILS_NO_EXPORT
8
+ #else
9
+ # ifndef UTILS_EXPORT
10
+ # ifdef OpenCLUtils_EXPORTS
11
+ /* We are building this library */
12
+ # define UTILS_EXPORT
13
+ # else
14
+ /* We are using this library */
15
+ # define UTILS_EXPORT
16
+ # endif
17
+ # endif
18
+
19
+ # ifndef OPENCLUTILS_NO_EXPORT
20
+ # define OPENCLUTILS_NO_EXPORT
21
+ # endif
22
+ #endif
23
+
24
+ #ifndef OPENCLUTILS_DEPRECATED
25
+ # define OPENCLUTILS_DEPRECATED __declspec(deprecated)
26
+ #endif
27
+
28
+ #ifndef OPENCLUTILS_DEPRECATED_EXPORT
29
+ # define OPENCLUTILS_DEPRECATED_EXPORT UTILS_EXPORT OPENCLUTILS_DEPRECATED
30
+ #endif
31
+
32
+ #ifndef OPENCLUTILS_DEPRECATED_NO_EXPORT
33
+ # define OPENCLUTILS_DEPRECATED_NO_EXPORT OPENCLUTILS_NO_EXPORT OPENCLUTILS_DEPRECATED
34
+ #endif
35
+
36
+ /* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */
37
+ #if 0 /* DEFINE_NO_DEPRECATED */
38
+ # ifndef OPENCLUTILS_NO_DEPRECATED
39
+ # define OPENCLUTILS_NO_DEPRECATED
40
+ # endif
41
+ #endif
42
+
43
+ #endif /* UTILS_EXPORT_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Platform.hpp ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ #include "OpenCLUtilsCpp_Export.h"
4
+ #include <CL/Utils/Error.hpp>
5
+
6
+ #include <CL/opencl.hpp>
7
+
8
+ namespace cl {
9
+ namespace util {
10
+ bool UTILSCPP_EXPORT supports_extension(const cl::Platform& platform,
11
+ const cl::string& extension);
12
+
13
+ bool UTILSCPP_EXPORT platform_version_contains(
14
+ const cl::Platform& platform, const cl::string& version_fragment);
15
+ }
16
+ }
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Utils.h ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtils_Export.h"
5
+
6
+ #include <CL/Utils/Error.h>
7
+ #include <CL/Utils/File.h>
8
+ #include <CL/Utils/Context.h>
9
+
10
+ // OpenCL includes
11
+ #include <CL/cl.h>
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/Utils/Utils.hpp ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // OpenCL Utils includes
4
+ #include "OpenCLUtils_Export.h"
5
+
6
+ #include <CL/Utils/Detail.hpp>
7
+ #include <CL/Utils/Error.hpp>
8
+ #include <CL/Utils/Platform.hpp>
9
+ #include <CL/Utils/Device.hpp>
10
+ #include <CL/Utils/Context.hpp>
11
+ #include <CL/Utils/Event.hpp>
12
+ #include <CL/Utils/File.hpp>
13
+
14
+ // OpenCL includes
15
+ #include <CL/opencl.hpp>
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl.h ADDED
@@ -0,0 +1,1920 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef __OPENCL_CL_H
18
+ #define __OPENCL_CL_H
19
+
20
+ #include <CL/cl_version.h>
21
+ #include <CL/cl_platform.h>
22
+
23
+ #ifdef __cplusplus
24
+ extern "C" {
25
+ #endif
26
+
27
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
28
+ /* Disable warning C4201: nonstandard extension used : nameless struct/union */
29
+ #pragma warning( push )
30
+ #pragma warning( disable : 4201 )
31
+ #endif
32
+
33
+ /******************************************************************************/
34
+
35
+ typedef struct _cl_platform_id * cl_platform_id;
36
+ typedef struct _cl_device_id * cl_device_id;
37
+ typedef struct _cl_context * cl_context;
38
+ typedef struct _cl_command_queue * cl_command_queue;
39
+ typedef struct _cl_mem * cl_mem;
40
+ typedef struct _cl_program * cl_program;
41
+ typedef struct _cl_kernel * cl_kernel;
42
+ typedef struct _cl_event * cl_event;
43
+ typedef struct _cl_sampler * cl_sampler;
44
+
45
+ typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
46
+ typedef cl_ulong cl_bitfield;
47
+ typedef cl_ulong cl_properties;
48
+ typedef cl_bitfield cl_device_type;
49
+ typedef cl_uint cl_platform_info;
50
+ typedef cl_uint cl_device_info;
51
+ typedef cl_bitfield cl_device_fp_config;
52
+ typedef cl_uint cl_device_mem_cache_type;
53
+ typedef cl_uint cl_device_local_mem_type;
54
+ typedef cl_bitfield cl_device_exec_capabilities;
55
+ #ifdef CL_VERSION_2_0
56
+ typedef cl_bitfield cl_device_svm_capabilities;
57
+ #endif
58
+ typedef cl_bitfield cl_command_queue_properties;
59
+ #ifdef CL_VERSION_1_2
60
+ typedef intptr_t cl_device_partition_property;
61
+ typedef cl_bitfield cl_device_affinity_domain;
62
+ #endif
63
+
64
+ typedef intptr_t cl_context_properties;
65
+ typedef cl_uint cl_context_info;
66
+ #ifdef CL_VERSION_2_0
67
+ typedef cl_properties cl_queue_properties;
68
+ #endif
69
+ typedef cl_uint cl_command_queue_info;
70
+ typedef cl_uint cl_channel_order;
71
+ typedef cl_uint cl_channel_type;
72
+ typedef cl_bitfield cl_mem_flags;
73
+ #ifdef CL_VERSION_2_0
74
+ typedef cl_bitfield cl_svm_mem_flags;
75
+ #endif
76
+ typedef cl_uint cl_mem_object_type;
77
+ typedef cl_uint cl_mem_info;
78
+ #ifdef CL_VERSION_1_2
79
+ typedef cl_bitfield cl_mem_migration_flags;
80
+ #endif
81
+ typedef cl_uint cl_image_info;
82
+ #ifdef CL_VERSION_1_1
83
+ typedef cl_uint cl_buffer_create_type;
84
+ #endif
85
+ typedef cl_uint cl_addressing_mode;
86
+ typedef cl_uint cl_filter_mode;
87
+ typedef cl_uint cl_sampler_info;
88
+ typedef cl_bitfield cl_map_flags;
89
+ #ifdef CL_VERSION_2_0
90
+ typedef intptr_t cl_pipe_properties;
91
+ typedef cl_uint cl_pipe_info;
92
+ #endif
93
+ typedef cl_uint cl_program_info;
94
+ typedef cl_uint cl_program_build_info;
95
+ #ifdef CL_VERSION_1_2
96
+ typedef cl_uint cl_program_binary_type;
97
+ #endif
98
+ typedef cl_int cl_build_status;
99
+ typedef cl_uint cl_kernel_info;
100
+ #ifdef CL_VERSION_1_2
101
+ typedef cl_uint cl_kernel_arg_info;
102
+ typedef cl_uint cl_kernel_arg_address_qualifier;
103
+ typedef cl_uint cl_kernel_arg_access_qualifier;
104
+ typedef cl_bitfield cl_kernel_arg_type_qualifier;
105
+ #endif
106
+ typedef cl_uint cl_kernel_work_group_info;
107
+ #ifdef CL_VERSION_2_1
108
+ typedef cl_uint cl_kernel_sub_group_info;
109
+ #endif
110
+ typedef cl_uint cl_event_info;
111
+ typedef cl_uint cl_command_type;
112
+ typedef cl_uint cl_profiling_info;
113
+ #ifdef CL_VERSION_2_0
114
+ typedef cl_properties cl_sampler_properties;
115
+ typedef cl_uint cl_kernel_exec_info;
116
+ #endif
117
+ #ifdef CL_VERSION_3_0
118
+ typedef cl_bitfield cl_device_atomic_capabilities;
119
+ typedef cl_bitfield cl_device_device_enqueue_capabilities;
120
+ typedef cl_uint cl_khronos_vendor_id;
121
+ typedef cl_properties cl_mem_properties;
122
+ #endif
123
+ typedef cl_uint cl_version;
124
+
125
+ typedef struct _cl_image_format {
126
+ cl_channel_order image_channel_order;
127
+ cl_channel_type image_channel_data_type;
128
+ } cl_image_format;
129
+
130
+ #ifdef CL_VERSION_1_2
131
+
132
+ typedef struct _cl_image_desc {
133
+ cl_mem_object_type image_type;
134
+ size_t image_width;
135
+ size_t image_height;
136
+ size_t image_depth;
137
+ size_t image_array_size;
138
+ size_t image_row_pitch;
139
+ size_t image_slice_pitch;
140
+ cl_uint num_mip_levels;
141
+ cl_uint num_samples;
142
+ #if defined(CL_VERSION_2_0) && __CL_HAS_ANON_STRUCT__
143
+ __CL_ANON_STRUCT__ union {
144
+ #endif
145
+ cl_mem buffer;
146
+ #if defined(CL_VERSION_2_0) && __CL_HAS_ANON_STRUCT__
147
+ cl_mem mem_object;
148
+ };
149
+ #endif
150
+ } cl_image_desc;
151
+
152
+ #endif
153
+
154
+ #ifdef CL_VERSION_1_1
155
+
156
+ typedef struct _cl_buffer_region {
157
+ size_t origin;
158
+ size_t size;
159
+ } cl_buffer_region;
160
+
161
+ #endif
162
+
163
+ #ifdef CL_VERSION_3_0
164
+
165
+ #define CL_NAME_VERSION_MAX_NAME_SIZE 64
166
+
167
+ typedef struct _cl_name_version {
168
+ cl_version version;
169
+ char name[CL_NAME_VERSION_MAX_NAME_SIZE];
170
+ } cl_name_version;
171
+
172
+ #endif
173
+
174
+ /******************************************************************************/
175
+
176
+ /* Error Codes */
177
+ #define CL_SUCCESS 0
178
+ #define CL_DEVICE_NOT_FOUND -1
179
+ #define CL_DEVICE_NOT_AVAILABLE -2
180
+ #define CL_COMPILER_NOT_AVAILABLE -3
181
+ #define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
182
+ #define CL_OUT_OF_RESOURCES -5
183
+ #define CL_OUT_OF_HOST_MEMORY -6
184
+ #define CL_PROFILING_INFO_NOT_AVAILABLE -7
185
+ #define CL_MEM_COPY_OVERLAP -8
186
+ #define CL_IMAGE_FORMAT_MISMATCH -9
187
+ #define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
188
+ #define CL_BUILD_PROGRAM_FAILURE -11
189
+ #define CL_MAP_FAILURE -12
190
+ #ifdef CL_VERSION_1_1
191
+ #define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
192
+ #define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
193
+ #endif
194
+ #ifdef CL_VERSION_1_2
195
+ #define CL_COMPILE_PROGRAM_FAILURE -15
196
+ #define CL_LINKER_NOT_AVAILABLE -16
197
+ #define CL_LINK_PROGRAM_FAILURE -17
198
+ #define CL_DEVICE_PARTITION_FAILED -18
199
+ #define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
200
+ #endif
201
+
202
+ #define CL_INVALID_VALUE -30
203
+ #define CL_INVALID_DEVICE_TYPE -31
204
+ #define CL_INVALID_PLATFORM -32
205
+ #define CL_INVALID_DEVICE -33
206
+ #define CL_INVALID_CONTEXT -34
207
+ #define CL_INVALID_QUEUE_PROPERTIES -35
208
+ #define CL_INVALID_COMMAND_QUEUE -36
209
+ #define CL_INVALID_HOST_PTR -37
210
+ #define CL_INVALID_MEM_OBJECT -38
211
+ #define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
212
+ #define CL_INVALID_IMAGE_SIZE -40
213
+ #define CL_INVALID_SAMPLER -41
214
+ #define CL_INVALID_BINARY -42
215
+ #define CL_INVALID_BUILD_OPTIONS -43
216
+ #define CL_INVALID_PROGRAM -44
217
+ #define CL_INVALID_PROGRAM_EXECUTABLE -45
218
+ #define CL_INVALID_KERNEL_NAME -46
219
+ #define CL_INVALID_KERNEL_DEFINITION -47
220
+ #define CL_INVALID_KERNEL -48
221
+ #define CL_INVALID_ARG_INDEX -49
222
+ #define CL_INVALID_ARG_VALUE -50
223
+ #define CL_INVALID_ARG_SIZE -51
224
+ #define CL_INVALID_KERNEL_ARGS -52
225
+ #define CL_INVALID_WORK_DIMENSION -53
226
+ #define CL_INVALID_WORK_GROUP_SIZE -54
227
+ #define CL_INVALID_WORK_ITEM_SIZE -55
228
+ #define CL_INVALID_GLOBAL_OFFSET -56
229
+ #define CL_INVALID_EVENT_WAIT_LIST -57
230
+ #define CL_INVALID_EVENT -58
231
+ #define CL_INVALID_OPERATION -59
232
+ #define CL_INVALID_GL_OBJECT -60
233
+ #define CL_INVALID_BUFFER_SIZE -61
234
+ #define CL_INVALID_MIP_LEVEL -62
235
+ #define CL_INVALID_GLOBAL_WORK_SIZE -63
236
+ #ifdef CL_VERSION_1_1
237
+ #define CL_INVALID_PROPERTY -64
238
+ #endif
239
+ #ifdef CL_VERSION_1_2
240
+ #define CL_INVALID_IMAGE_DESCRIPTOR -65
241
+ #define CL_INVALID_COMPILER_OPTIONS -66
242
+ #define CL_INVALID_LINKER_OPTIONS -67
243
+ #define CL_INVALID_DEVICE_PARTITION_COUNT -68
244
+ #endif
245
+ #ifdef CL_VERSION_2_0
246
+ #define CL_INVALID_PIPE_SIZE -69
247
+ #define CL_INVALID_DEVICE_QUEUE -70
248
+ #endif
249
+ #ifdef CL_VERSION_2_2
250
+ #define CL_INVALID_SPEC_ID -71
251
+ #define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72
252
+ #endif
253
+
254
+
255
+ /* cl_bool */
256
+ #define CL_FALSE 0
257
+ #define CL_TRUE 1
258
+ #ifdef CL_VERSION_1_2
259
+ #define CL_BLOCKING CL_TRUE
260
+ #define CL_NON_BLOCKING CL_FALSE
261
+ #endif
262
+
263
+ /* cl_platform_info */
264
+ #define CL_PLATFORM_PROFILE 0x0900
265
+ #define CL_PLATFORM_VERSION 0x0901
266
+ #define CL_PLATFORM_NAME 0x0902
267
+ #define CL_PLATFORM_VENDOR 0x0903
268
+ #define CL_PLATFORM_EXTENSIONS 0x0904
269
+ #ifdef CL_VERSION_2_1
270
+ #define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905
271
+ #endif
272
+ #ifdef CL_VERSION_3_0
273
+ #define CL_PLATFORM_NUMERIC_VERSION 0x0906
274
+ #define CL_PLATFORM_EXTENSIONS_WITH_VERSION 0x0907
275
+ #endif
276
+
277
+ /* cl_device_type - bitfield */
278
+ #define CL_DEVICE_TYPE_DEFAULT (1 << 0)
279
+ #define CL_DEVICE_TYPE_CPU (1 << 1)
280
+ #define CL_DEVICE_TYPE_GPU (1 << 2)
281
+ #define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
282
+ #ifdef CL_VERSION_1_2
283
+ #define CL_DEVICE_TYPE_CUSTOM (1 << 4)
284
+ #endif
285
+ #define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
286
+
287
+ /* cl_device_info */
288
+ #define CL_DEVICE_TYPE 0x1000
289
+ #define CL_DEVICE_VENDOR_ID 0x1001
290
+ #define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
291
+ #define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
292
+ #define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
293
+ #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
294
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
295
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
296
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
297
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
298
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
299
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
300
+ #define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
301
+ #define CL_DEVICE_ADDRESS_BITS 0x100D
302
+ #define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
303
+ #define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
304
+ #define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
305
+ #define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
306
+ #define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
307
+ #define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
308
+ #define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
309
+ #define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
310
+ #define CL_DEVICE_IMAGE_SUPPORT 0x1016
311
+ #define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
312
+ #define CL_DEVICE_MAX_SAMPLERS 0x1018
313
+ #define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
314
+ #define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
315
+ #define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
316
+ #define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
317
+ #define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
318
+ #define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
319
+ #define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
320
+ #define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
321
+ #define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
322
+ #define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
323
+ #define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
324
+ #define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
325
+ #define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
326
+ #define CL_DEVICE_ENDIAN_LITTLE 0x1026
327
+ #define CL_DEVICE_AVAILABLE 0x1027
328
+ #define CL_DEVICE_COMPILER_AVAILABLE 0x1028
329
+ #define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
330
+ #define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */
331
+ #ifdef CL_VERSION_2_0
332
+ #define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A
333
+ #endif
334
+ #define CL_DEVICE_NAME 0x102B
335
+ #define CL_DEVICE_VENDOR 0x102C
336
+ #define CL_DRIVER_VERSION 0x102D
337
+ #define CL_DEVICE_PROFILE 0x102E
338
+ #define CL_DEVICE_VERSION 0x102F
339
+ #define CL_DEVICE_EXTENSIONS 0x1030
340
+ #define CL_DEVICE_PLATFORM 0x1031
341
+ #ifdef CL_VERSION_1_2
342
+ #define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
343
+ #endif
344
+ /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
345
+ #ifdef CL_VERSION_1_1
346
+ #define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
347
+ #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
348
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
349
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
350
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
351
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
352
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
353
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
354
+ #define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
355
+ #define CL_DEVICE_OPENCL_C_VERSION 0x103D
356
+ #endif
357
+ #ifdef CL_VERSION_1_2
358
+ #define CL_DEVICE_LINKER_AVAILABLE 0x103E
359
+ #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
360
+ #define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
361
+ #define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
362
+ #define CL_DEVICE_PARENT_DEVICE 0x1042
363
+ #define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
364
+ #define CL_DEVICE_PARTITION_PROPERTIES 0x1044
365
+ #define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
366
+ #define CL_DEVICE_PARTITION_TYPE 0x1046
367
+ #define CL_DEVICE_REFERENCE_COUNT 0x1047
368
+ #define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
369
+ #define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
370
+ #endif
371
+ #ifdef CL_VERSION_2_0
372
+ #define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
373
+ #define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
374
+ #define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C
375
+ #define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D
376
+ #define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E
377
+ #define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F
378
+ #define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050
379
+ #define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051
380
+ #define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052
381
+ #define CL_DEVICE_SVM_CAPABILITIES 0x1053
382
+ #define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054
383
+ #define CL_DEVICE_MAX_PIPE_ARGS 0x1055
384
+ #define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056
385
+ #define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057
386
+ #define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058
387
+ #define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059
388
+ #define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A
389
+ #endif
390
+ #ifdef CL_VERSION_2_1
391
+ #define CL_DEVICE_IL_VERSION 0x105B
392
+ #define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C
393
+ #define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D
394
+ #endif
395
+ #ifdef CL_VERSION_3_0
396
+ #define CL_DEVICE_NUMERIC_VERSION 0x105E
397
+ #define CL_DEVICE_EXTENSIONS_WITH_VERSION 0x1060
398
+ #define CL_DEVICE_ILS_WITH_VERSION 0x1061
399
+ #define CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION 0x1062
400
+ #define CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES 0x1063
401
+ #define CL_DEVICE_ATOMIC_FENCE_CAPABILITIES 0x1064
402
+ #define CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT 0x1065
403
+ #define CL_DEVICE_OPENCL_C_ALL_VERSIONS 0x1066
404
+ #define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x1067
405
+ #define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068
406
+ #define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069
407
+ /* 0x106A to 0x106E - Reserved for upcoming KHR extension */
408
+ #define CL_DEVICE_OPENCL_C_FEATURES 0x106F
409
+ #define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES 0x1070
410
+ #define CL_DEVICE_PIPE_SUPPORT 0x1071
411
+ #define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 0x1072
412
+ #endif
413
+
414
+ /* cl_device_fp_config - bitfield */
415
+ #define CL_FP_DENORM (1 << 0)
416
+ #define CL_FP_INF_NAN (1 << 1)
417
+ #define CL_FP_ROUND_TO_NEAREST (1 << 2)
418
+ #define CL_FP_ROUND_TO_ZERO (1 << 3)
419
+ #define CL_FP_ROUND_TO_INF (1 << 4)
420
+ #define CL_FP_FMA (1 << 5)
421
+ #ifdef CL_VERSION_1_1
422
+ #define CL_FP_SOFT_FLOAT (1 << 6)
423
+ #endif
424
+ #ifdef CL_VERSION_1_2
425
+ #define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
426
+ #endif
427
+
428
+ /* cl_device_mem_cache_type */
429
+ #define CL_NONE 0x0
430
+ #define CL_READ_ONLY_CACHE 0x1
431
+ #define CL_READ_WRITE_CACHE 0x2
432
+
433
+ /* cl_device_local_mem_type */
434
+ #define CL_LOCAL 0x1
435
+ #define CL_GLOBAL 0x2
436
+
437
+ /* cl_device_exec_capabilities - bitfield */
438
+ #define CL_EXEC_KERNEL (1 << 0)
439
+ #define CL_EXEC_NATIVE_KERNEL (1 << 1)
440
+
441
+ /* cl_command_queue_properties - bitfield */
442
+ #define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
443
+ #define CL_QUEUE_PROFILING_ENABLE (1 << 1)
444
+ #ifdef CL_VERSION_2_0
445
+ #define CL_QUEUE_ON_DEVICE (1 << 2)
446
+ #define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3)
447
+ #endif
448
+
449
+ /* cl_context_info */
450
+ #define CL_CONTEXT_REFERENCE_COUNT 0x1080
451
+ #define CL_CONTEXT_DEVICES 0x1081
452
+ #define CL_CONTEXT_PROPERTIES 0x1082
453
+ #ifdef CL_VERSION_1_1
454
+ #define CL_CONTEXT_NUM_DEVICES 0x1083
455
+ #endif
456
+
457
+ /* cl_context_properties */
458
+ #define CL_CONTEXT_PLATFORM 0x1084
459
+ #ifdef CL_VERSION_1_2
460
+ #define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
461
+ #endif
462
+
463
+ #ifdef CL_VERSION_1_2
464
+
465
+ /* cl_device_partition_property */
466
+ #define CL_DEVICE_PARTITION_EQUALLY 0x1086
467
+ #define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
468
+ #define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
469
+ #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
470
+
471
+ #endif
472
+
473
+ #ifdef CL_VERSION_1_2
474
+
475
+ /* cl_device_affinity_domain */
476
+ #define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
477
+ #define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
478
+ #define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
479
+ #define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
480
+ #define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
481
+ #define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
482
+
483
+ #endif
484
+
485
+ #ifdef CL_VERSION_2_0
486
+
487
+ /* cl_device_svm_capabilities */
488
+ #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
489
+ #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
490
+ #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
491
+ #define CL_DEVICE_SVM_ATOMICS (1 << 3)
492
+
493
+ #endif
494
+
495
+ /* cl_command_queue_info */
496
+ #define CL_QUEUE_CONTEXT 0x1090
497
+ #define CL_QUEUE_DEVICE 0x1091
498
+ #define CL_QUEUE_REFERENCE_COUNT 0x1092
499
+ #define CL_QUEUE_PROPERTIES 0x1093
500
+ #ifdef CL_VERSION_2_0
501
+ #define CL_QUEUE_SIZE 0x1094
502
+ #endif
503
+ #ifdef CL_VERSION_2_1
504
+ #define CL_QUEUE_DEVICE_DEFAULT 0x1095
505
+ #endif
506
+ #ifdef CL_VERSION_3_0
507
+ #define CL_QUEUE_PROPERTIES_ARRAY 0x1098
508
+ #endif
509
+
510
+ /* cl_mem_flags and cl_svm_mem_flags - bitfield */
511
+ #define CL_MEM_READ_WRITE (1 << 0)
512
+ #define CL_MEM_WRITE_ONLY (1 << 1)
513
+ #define CL_MEM_READ_ONLY (1 << 2)
514
+ #define CL_MEM_USE_HOST_PTR (1 << 3)
515
+ #define CL_MEM_ALLOC_HOST_PTR (1 << 4)
516
+ #define CL_MEM_COPY_HOST_PTR (1 << 5)
517
+ /* reserved (1 << 6) */
518
+ #ifdef CL_VERSION_1_2
519
+ #define CL_MEM_HOST_WRITE_ONLY (1 << 7)
520
+ #define CL_MEM_HOST_READ_ONLY (1 << 8)
521
+ #define CL_MEM_HOST_NO_ACCESS (1 << 9)
522
+ #endif
523
+ #ifdef CL_VERSION_2_0
524
+ #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */
525
+ #define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */
526
+ #define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12)
527
+ #endif
528
+
529
+ #ifdef CL_VERSION_1_2
530
+
531
+ /* cl_mem_migration_flags - bitfield */
532
+ #define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
533
+ #define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
534
+
535
+ #endif
536
+
537
+ /* cl_channel_order */
538
+ #define CL_R 0x10B0
539
+ #define CL_A 0x10B1
540
+ #define CL_RG 0x10B2
541
+ #define CL_RA 0x10B3
542
+ #define CL_RGB 0x10B4
543
+ #define CL_RGBA 0x10B5
544
+ #define CL_BGRA 0x10B6
545
+ #define CL_ARGB 0x10B7
546
+ #define CL_INTENSITY 0x10B8
547
+ #define CL_LUMINANCE 0x10B9
548
+ #ifdef CL_VERSION_1_1
549
+ #define CL_Rx 0x10BA
550
+ #define CL_RGx 0x10BB
551
+ #define CL_RGBx 0x10BC
552
+ #endif
553
+ #ifdef CL_VERSION_2_0
554
+ #define CL_DEPTH 0x10BD
555
+ #define CL_sRGB 0x10BF
556
+ #define CL_sRGBx 0x10C0
557
+ #define CL_sRGBA 0x10C1
558
+ #define CL_sBGRA 0x10C2
559
+ #define CL_ABGR 0x10C3
560
+ #endif
561
+
562
+ /* cl_channel_type */
563
+ #define CL_SNORM_INT8 0x10D0
564
+ #define CL_SNORM_INT16 0x10D1
565
+ #define CL_UNORM_INT8 0x10D2
566
+ #define CL_UNORM_INT16 0x10D3
567
+ #define CL_UNORM_SHORT_565 0x10D4
568
+ #define CL_UNORM_SHORT_555 0x10D5
569
+ #define CL_UNORM_INT_101010 0x10D6
570
+ #define CL_SIGNED_INT8 0x10D7
571
+ #define CL_SIGNED_INT16 0x10D8
572
+ #define CL_SIGNED_INT32 0x10D9
573
+ #define CL_UNSIGNED_INT8 0x10DA
574
+ #define CL_UNSIGNED_INT16 0x10DB
575
+ #define CL_UNSIGNED_INT32 0x10DC
576
+ #define CL_HALF_FLOAT 0x10DD
577
+ #define CL_FLOAT 0x10DE
578
+ #ifdef CL_VERSION_2_1
579
+ #define CL_UNORM_INT_101010_2 0x10E0
580
+ #endif
581
+
582
+ /* cl_mem_object_type */
583
+ #define CL_MEM_OBJECT_BUFFER 0x10F0
584
+ #define CL_MEM_OBJECT_IMAGE2D 0x10F1
585
+ #define CL_MEM_OBJECT_IMAGE3D 0x10F2
586
+ #ifdef CL_VERSION_1_2
587
+ #define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
588
+ #define CL_MEM_OBJECT_IMAGE1D 0x10F4
589
+ #define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
590
+ #define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
591
+ #endif
592
+ #ifdef CL_VERSION_2_0
593
+ #define CL_MEM_OBJECT_PIPE 0x10F7
594
+ #endif
595
+
596
+ /* cl_mem_info */
597
+ #define CL_MEM_TYPE 0x1100
598
+ #define CL_MEM_FLAGS 0x1101
599
+ #define CL_MEM_SIZE 0x1102
600
+ #define CL_MEM_HOST_PTR 0x1103
601
+ #define CL_MEM_MAP_COUNT 0x1104
602
+ #define CL_MEM_REFERENCE_COUNT 0x1105
603
+ #define CL_MEM_CONTEXT 0x1106
604
+ #ifdef CL_VERSION_1_1
605
+ #define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
606
+ #define CL_MEM_OFFSET 0x1108
607
+ #endif
608
+ #ifdef CL_VERSION_2_0
609
+ #define CL_MEM_USES_SVM_POINTER 0x1109
610
+ #endif
611
+ #ifdef CL_VERSION_3_0
612
+ #define CL_MEM_PROPERTIES 0x110A
613
+ #endif
614
+
615
+ /* cl_image_info */
616
+ #define CL_IMAGE_FORMAT 0x1110
617
+ #define CL_IMAGE_ELEMENT_SIZE 0x1111
618
+ #define CL_IMAGE_ROW_PITCH 0x1112
619
+ #define CL_IMAGE_SLICE_PITCH 0x1113
620
+ #define CL_IMAGE_WIDTH 0x1114
621
+ #define CL_IMAGE_HEIGHT 0x1115
622
+ #define CL_IMAGE_DEPTH 0x1116
623
+ #ifdef CL_VERSION_1_2
624
+ #define CL_IMAGE_ARRAY_SIZE 0x1117
625
+ #define CL_IMAGE_BUFFER 0x1118
626
+ #define CL_IMAGE_NUM_MIP_LEVELS 0x1119
627
+ #define CL_IMAGE_NUM_SAMPLES 0x111A
628
+ #endif
629
+
630
+
631
+ /* cl_pipe_info */
632
+ #ifdef CL_VERSION_2_0
633
+ #define CL_PIPE_PACKET_SIZE 0x1120
634
+ #define CL_PIPE_MAX_PACKETS 0x1121
635
+ #endif
636
+ #ifdef CL_VERSION_3_0
637
+ #define CL_PIPE_PROPERTIES 0x1122
638
+ #endif
639
+
640
+ /* cl_addressing_mode */
641
+ #define CL_ADDRESS_NONE 0x1130
642
+ #define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
643
+ #define CL_ADDRESS_CLAMP 0x1132
644
+ #define CL_ADDRESS_REPEAT 0x1133
645
+ #ifdef CL_VERSION_1_1
646
+ #define CL_ADDRESS_MIRRORED_REPEAT 0x1134
647
+ #endif
648
+
649
+ /* cl_filter_mode */
650
+ #define CL_FILTER_NEAREST 0x1140
651
+ #define CL_FILTER_LINEAR 0x1141
652
+
653
+ /* cl_sampler_info */
654
+ #define CL_SAMPLER_REFERENCE_COUNT 0x1150
655
+ #define CL_SAMPLER_CONTEXT 0x1151
656
+ #define CL_SAMPLER_NORMALIZED_COORDS 0x1152
657
+ #define CL_SAMPLER_ADDRESSING_MODE 0x1153
658
+ #define CL_SAMPLER_FILTER_MODE 0x1154
659
+ #ifdef CL_VERSION_2_0
660
+ /* These enumerants are for the cl_khr_mipmap_image extension.
661
+ They have since been added to cl_ext.h with an appropriate
662
+ KHR suffix, but are left here for backwards compatibility. */
663
+ #define CL_SAMPLER_MIP_FILTER_MODE 0x1155
664
+ #define CL_SAMPLER_LOD_MIN 0x1156
665
+ #define CL_SAMPLER_LOD_MAX 0x1157
666
+ #endif
667
+ #ifdef CL_VERSION_3_0
668
+ #define CL_SAMPLER_PROPERTIES 0x1158
669
+ #endif
670
+
671
+ /* cl_map_flags - bitfield */
672
+ #define CL_MAP_READ (1 << 0)
673
+ #define CL_MAP_WRITE (1 << 1)
674
+ #ifdef CL_VERSION_1_2
675
+ #define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
676
+ #endif
677
+
678
+ /* cl_program_info */
679
+ #define CL_PROGRAM_REFERENCE_COUNT 0x1160
680
+ #define CL_PROGRAM_CONTEXT 0x1161
681
+ #define CL_PROGRAM_NUM_DEVICES 0x1162
682
+ #define CL_PROGRAM_DEVICES 0x1163
683
+ #define CL_PROGRAM_SOURCE 0x1164
684
+ #define CL_PROGRAM_BINARY_SIZES 0x1165
685
+ #define CL_PROGRAM_BINARIES 0x1166
686
+ #ifdef CL_VERSION_1_2
687
+ #define CL_PROGRAM_NUM_KERNELS 0x1167
688
+ #define CL_PROGRAM_KERNEL_NAMES 0x1168
689
+ #endif
690
+ #ifdef CL_VERSION_2_1
691
+ #define CL_PROGRAM_IL 0x1169
692
+ #endif
693
+ #ifdef CL_VERSION_2_2
694
+ #define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A
695
+ #define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B
696
+ #endif
697
+
698
+ /* cl_program_build_info */
699
+ #define CL_PROGRAM_BUILD_STATUS 0x1181
700
+ #define CL_PROGRAM_BUILD_OPTIONS 0x1182
701
+ #define CL_PROGRAM_BUILD_LOG 0x1183
702
+ #ifdef CL_VERSION_1_2
703
+ #define CL_PROGRAM_BINARY_TYPE 0x1184
704
+ #endif
705
+ #ifdef CL_VERSION_2_0
706
+ #define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185
707
+ #endif
708
+
709
+ #ifdef CL_VERSION_1_2
710
+
711
+ /* cl_program_binary_type */
712
+ #define CL_PROGRAM_BINARY_TYPE_NONE 0x0
713
+ #define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
714
+ #define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
715
+ #define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
716
+
717
+ #endif
718
+
719
+ /* cl_build_status */
720
+ #define CL_BUILD_SUCCESS 0
721
+ #define CL_BUILD_NONE -1
722
+ #define CL_BUILD_ERROR -2
723
+ #define CL_BUILD_IN_PROGRESS -3
724
+
725
+ /* cl_kernel_info */
726
+ #define CL_KERNEL_FUNCTION_NAME 0x1190
727
+ #define CL_KERNEL_NUM_ARGS 0x1191
728
+ #define CL_KERNEL_REFERENCE_COUNT 0x1192
729
+ #define CL_KERNEL_CONTEXT 0x1193
730
+ #define CL_KERNEL_PROGRAM 0x1194
731
+ #ifdef CL_VERSION_1_2
732
+ #define CL_KERNEL_ATTRIBUTES 0x1195
733
+ #endif
734
+
735
+ #ifdef CL_VERSION_1_2
736
+
737
+ /* cl_kernel_arg_info */
738
+ #define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
739
+ #define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
740
+ #define CL_KERNEL_ARG_TYPE_NAME 0x1198
741
+ #define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
742
+ #define CL_KERNEL_ARG_NAME 0x119A
743
+
744
+ #endif
745
+
746
+ #ifdef CL_VERSION_1_2
747
+
748
+ /* cl_kernel_arg_address_qualifier */
749
+ #define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
750
+ #define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
751
+ #define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
752
+ #define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
753
+
754
+ #endif
755
+
756
+ #ifdef CL_VERSION_1_2
757
+
758
+ /* cl_kernel_arg_access_qualifier */
759
+ #define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
760
+ #define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
761
+ #define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
762
+ #define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
763
+
764
+ #endif
765
+
766
+ #ifdef CL_VERSION_1_2
767
+
768
+ /* cl_kernel_arg_type_qualifier */
769
+ #define CL_KERNEL_ARG_TYPE_NONE 0
770
+ #define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
771
+ #define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
772
+ #define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
773
+ #ifdef CL_VERSION_2_0
774
+ #define CL_KERNEL_ARG_TYPE_PIPE (1 << 3)
775
+ #endif
776
+
777
+ #endif
778
+
779
+ /* cl_kernel_work_group_info */
780
+ #define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
781
+ #define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
782
+ #define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
783
+ #define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
784
+ #define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
785
+ #ifdef CL_VERSION_1_2
786
+ #define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
787
+ #endif
788
+
789
+ #ifdef CL_VERSION_2_1
790
+
791
+ /* cl_kernel_sub_group_info */
792
+ #define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033
793
+ #define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034
794
+ #define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8
795
+ #define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9
796
+ #define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA
797
+
798
+ #endif
799
+
800
+ #ifdef CL_VERSION_2_0
801
+
802
+ /* cl_kernel_exec_info */
803
+ #define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6
804
+ #define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7
805
+
806
+ #endif
807
+
808
+ /* cl_event_info */
809
+ #define CL_EVENT_COMMAND_QUEUE 0x11D0
810
+ #define CL_EVENT_COMMAND_TYPE 0x11D1
811
+ #define CL_EVENT_REFERENCE_COUNT 0x11D2
812
+ #define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
813
+ #ifdef CL_VERSION_1_1
814
+ #define CL_EVENT_CONTEXT 0x11D4
815
+ #endif
816
+
817
+ /* cl_command_type */
818
+ #define CL_COMMAND_NDRANGE_KERNEL 0x11F0
819
+ #define CL_COMMAND_TASK 0x11F1
820
+ #define CL_COMMAND_NATIVE_KERNEL 0x11F2
821
+ #define CL_COMMAND_READ_BUFFER 0x11F3
822
+ #define CL_COMMAND_WRITE_BUFFER 0x11F4
823
+ #define CL_COMMAND_COPY_BUFFER 0x11F5
824
+ #define CL_COMMAND_READ_IMAGE 0x11F6
825
+ #define CL_COMMAND_WRITE_IMAGE 0x11F7
826
+ #define CL_COMMAND_COPY_IMAGE 0x11F8
827
+ #define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
828
+ #define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
829
+ #define CL_COMMAND_MAP_BUFFER 0x11FB
830
+ #define CL_COMMAND_MAP_IMAGE 0x11FC
831
+ #define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
832
+ #define CL_COMMAND_MARKER 0x11FE
833
+ #define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
834
+ #define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
835
+ #ifdef CL_VERSION_1_1
836
+ #define CL_COMMAND_READ_BUFFER_RECT 0x1201
837
+ #define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
838
+ #define CL_COMMAND_COPY_BUFFER_RECT 0x1203
839
+ #define CL_COMMAND_USER 0x1204
840
+ #endif
841
+ #ifdef CL_VERSION_1_2
842
+ #define CL_COMMAND_BARRIER 0x1205
843
+ #define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
844
+ #define CL_COMMAND_FILL_BUFFER 0x1207
845
+ #define CL_COMMAND_FILL_IMAGE 0x1208
846
+ #endif
847
+ #ifdef CL_VERSION_2_0
848
+ #define CL_COMMAND_SVM_FREE 0x1209
849
+ #define CL_COMMAND_SVM_MEMCPY 0x120A
850
+ #define CL_COMMAND_SVM_MEMFILL 0x120B
851
+ #define CL_COMMAND_SVM_MAP 0x120C
852
+ #define CL_COMMAND_SVM_UNMAP 0x120D
853
+ #endif
854
+ #ifdef CL_VERSION_3_0
855
+ #define CL_COMMAND_SVM_MIGRATE_MEM 0x120E
856
+ #endif
857
+
858
+ /* command execution status */
859
+ #define CL_COMPLETE 0x0
860
+ #define CL_RUNNING 0x1
861
+ #define CL_SUBMITTED 0x2
862
+ #define CL_QUEUED 0x3
863
+
864
+ /* cl_buffer_create_type */
865
+ #ifdef CL_VERSION_1_1
866
+ #define CL_BUFFER_CREATE_TYPE_REGION 0x1220
867
+ #endif
868
+
869
+ /* cl_profiling_info */
870
+ #define CL_PROFILING_COMMAND_QUEUED 0x1280
871
+ #define CL_PROFILING_COMMAND_SUBMIT 0x1281
872
+ #define CL_PROFILING_COMMAND_START 0x1282
873
+ #define CL_PROFILING_COMMAND_END 0x1283
874
+ #ifdef CL_VERSION_2_0
875
+ #define CL_PROFILING_COMMAND_COMPLETE 0x1284
876
+ #endif
877
+
878
+ /* cl_device_atomic_capabilities - bitfield */
879
+ #ifdef CL_VERSION_3_0
880
+ #define CL_DEVICE_ATOMIC_ORDER_RELAXED (1 << 0)
881
+ #define CL_DEVICE_ATOMIC_ORDER_ACQ_REL (1 << 1)
882
+ #define CL_DEVICE_ATOMIC_ORDER_SEQ_CST (1 << 2)
883
+ #define CL_DEVICE_ATOMIC_SCOPE_WORK_ITEM (1 << 3)
884
+ #define CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP (1 << 4)
885
+ #define CL_DEVICE_ATOMIC_SCOPE_DEVICE (1 << 5)
886
+ #define CL_DEVICE_ATOMIC_SCOPE_ALL_DEVICES (1 << 6)
887
+ #endif
888
+
889
+ /* cl_device_device_enqueue_capabilities - bitfield */
890
+ #ifdef CL_VERSION_3_0
891
+ #define CL_DEVICE_QUEUE_SUPPORTED (1 << 0)
892
+ #define CL_DEVICE_QUEUE_REPLACEABLE_DEFAULT (1 << 1)
893
+ #endif
894
+
895
+ /* cl_khronos_vendor_id */
896
+ #define CL_KHRONOS_VENDOR_ID_CODEPLAY 0x10004
897
+
898
+ /* cl_version */
899
+ #define CL_VERSION_MAJOR_BITS (10)
900
+ #define CL_VERSION_MINOR_BITS (10)
901
+ #define CL_VERSION_PATCH_BITS (12)
902
+
903
+ #define CL_VERSION_MAJOR_MASK ((1 << CL_VERSION_MAJOR_BITS) - 1)
904
+ #define CL_VERSION_MINOR_MASK ((1 << CL_VERSION_MINOR_BITS) - 1)
905
+ #define CL_VERSION_PATCH_MASK ((1 << CL_VERSION_PATCH_BITS) - 1)
906
+
907
+ #define CL_VERSION_MAJOR(version) \
908
+ ((version) >> (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS))
909
+
910
+ #define CL_VERSION_MINOR(version) \
911
+ (((version) >> CL_VERSION_PATCH_BITS) & CL_VERSION_MINOR_MASK)
912
+
913
+ #define CL_VERSION_PATCH(version) ((version) & CL_VERSION_PATCH_MASK)
914
+
915
+ #define CL_MAKE_VERSION(major, minor, patch) \
916
+ ((((major) & CL_VERSION_MAJOR_MASK) \
917
+ << (CL_VERSION_MINOR_BITS + CL_VERSION_PATCH_BITS)) | \
918
+ (((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \
919
+ ((patch) & CL_VERSION_PATCH_MASK))
920
+
921
+ /********************************************************************************************************/
922
+
923
+ /* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */
924
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_CORE_PROTOTYPES)
925
+ #define CL_NO_CORE_PROTOTYPES
926
+ #endif
927
+
928
+ #if !defined(CL_NO_CORE_PROTOTYPES)
929
+
930
+ /* Platform API */
931
+ extern CL_API_ENTRY cl_int CL_API_CALL
932
+ clGetPlatformIDs(cl_uint num_entries,
933
+ cl_platform_id * platforms,
934
+ cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0;
935
+
936
+ extern CL_API_ENTRY cl_int CL_API_CALL
937
+ clGetPlatformInfo(cl_platform_id platform,
938
+ cl_platform_info param_name,
939
+ size_t param_value_size,
940
+ void * param_value,
941
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
942
+
943
+ /* Device APIs */
944
+ extern CL_API_ENTRY cl_int CL_API_CALL
945
+ clGetDeviceIDs(cl_platform_id platform,
946
+ cl_device_type device_type,
947
+ cl_uint num_entries,
948
+ cl_device_id * devices,
949
+ cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
950
+
951
+ extern CL_API_ENTRY cl_int CL_API_CALL
952
+ clGetDeviceInfo(cl_device_id device,
953
+ cl_device_info param_name,
954
+ size_t param_value_size,
955
+ void * param_value,
956
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
957
+
958
+ #ifdef CL_VERSION_1_2
959
+
960
+ extern CL_API_ENTRY cl_int CL_API_CALL
961
+ clCreateSubDevices(cl_device_id in_device,
962
+ const cl_device_partition_property * properties,
963
+ cl_uint num_devices,
964
+ cl_device_id * out_devices,
965
+ cl_uint * num_devices_ret) CL_API_SUFFIX__VERSION_1_2;
966
+
967
+ extern CL_API_ENTRY cl_int CL_API_CALL
968
+ clRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
969
+
970
+ extern CL_API_ENTRY cl_int CL_API_CALL
971
+ clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
972
+
973
+ #endif
974
+
975
+ #ifdef CL_VERSION_2_1
976
+
977
+ extern CL_API_ENTRY cl_int CL_API_CALL
978
+ clSetDefaultDeviceCommandQueue(cl_context context,
979
+ cl_device_id device,
980
+ cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1;
981
+
982
+ extern CL_API_ENTRY cl_int CL_API_CALL
983
+ clGetDeviceAndHostTimer(cl_device_id device,
984
+ cl_ulong* device_timestamp,
985
+ cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1;
986
+
987
+ extern CL_API_ENTRY cl_int CL_API_CALL
988
+ clGetHostTimer(cl_device_id device,
989
+ cl_ulong * host_timestamp) CL_API_SUFFIX__VERSION_2_1;
990
+
991
+ #endif
992
+
993
+ /* Context APIs */
994
+ extern CL_API_ENTRY cl_context CL_API_CALL
995
+ clCreateContext(const cl_context_properties * properties,
996
+ cl_uint num_devices,
997
+ const cl_device_id * devices,
998
+ void (CL_CALLBACK * pfn_notify)(const char * errinfo,
999
+ const void * private_info,
1000
+ size_t cb,
1001
+ void * user_data),
1002
+ void * user_data,
1003
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1004
+
1005
+ extern CL_API_ENTRY cl_context CL_API_CALL
1006
+ clCreateContextFromType(const cl_context_properties * properties,
1007
+ cl_device_type device_type,
1008
+ void (CL_CALLBACK * pfn_notify)(const char * errinfo,
1009
+ const void * private_info,
1010
+ size_t cb,
1011
+ void * user_data),
1012
+ void * user_data,
1013
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1014
+
1015
+ extern CL_API_ENTRY cl_int CL_API_CALL
1016
+ clRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0;
1017
+
1018
+ extern CL_API_ENTRY cl_int CL_API_CALL
1019
+ clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0;
1020
+
1021
+ extern CL_API_ENTRY cl_int CL_API_CALL
1022
+ clGetContextInfo(cl_context context,
1023
+ cl_context_info param_name,
1024
+ size_t param_value_size,
1025
+ void * param_value,
1026
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1027
+
1028
+ #ifdef CL_VERSION_3_0
1029
+
1030
+ extern CL_API_ENTRY cl_int CL_API_CALL
1031
+ clSetContextDestructorCallback(cl_context context,
1032
+ void (CL_CALLBACK* pfn_notify)(cl_context context,
1033
+ void* user_data),
1034
+ void* user_data) CL_API_SUFFIX__VERSION_3_0;
1035
+
1036
+ #endif
1037
+
1038
+ /* Command Queue APIs */
1039
+
1040
+ #ifdef CL_VERSION_2_0
1041
+
1042
+ extern CL_API_ENTRY cl_command_queue CL_API_CALL
1043
+ clCreateCommandQueueWithProperties(cl_context context,
1044
+ cl_device_id device,
1045
+ const cl_queue_properties * properties,
1046
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0;
1047
+
1048
+ #endif
1049
+
1050
+ extern CL_API_ENTRY cl_int CL_API_CALL
1051
+ clRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1052
+
1053
+ extern CL_API_ENTRY cl_int CL_API_CALL
1054
+ clReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1055
+
1056
+ extern CL_API_ENTRY cl_int CL_API_CALL
1057
+ clGetCommandQueueInfo(cl_command_queue command_queue,
1058
+ cl_command_queue_info param_name,
1059
+ size_t param_value_size,
1060
+ void * param_value,
1061
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1062
+
1063
+ /* Memory Object APIs */
1064
+ extern CL_API_ENTRY cl_mem CL_API_CALL
1065
+ clCreateBuffer(cl_context context,
1066
+ cl_mem_flags flags,
1067
+ size_t size,
1068
+ void * host_ptr,
1069
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1070
+
1071
+ #ifdef CL_VERSION_1_1
1072
+
1073
+ extern CL_API_ENTRY cl_mem CL_API_CALL
1074
+ clCreateSubBuffer(cl_mem buffer,
1075
+ cl_mem_flags flags,
1076
+ cl_buffer_create_type buffer_create_type,
1077
+ const void * buffer_create_info,
1078
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1;
1079
+
1080
+ #endif
1081
+
1082
+ #ifdef CL_VERSION_1_2
1083
+
1084
+ extern CL_API_ENTRY cl_mem CL_API_CALL
1085
+ clCreateImage(cl_context context,
1086
+ cl_mem_flags flags,
1087
+ const cl_image_format * image_format,
1088
+ const cl_image_desc * image_desc,
1089
+ void * host_ptr,
1090
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
1091
+
1092
+ #endif
1093
+
1094
+ #ifdef CL_VERSION_2_0
1095
+
1096
+ extern CL_API_ENTRY cl_mem CL_API_CALL
1097
+ clCreatePipe(cl_context context,
1098
+ cl_mem_flags flags,
1099
+ cl_uint pipe_packet_size,
1100
+ cl_uint pipe_max_packets,
1101
+ const cl_pipe_properties * properties,
1102
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0;
1103
+
1104
+ #endif
1105
+
1106
+ #ifdef CL_VERSION_3_0
1107
+
1108
+ extern CL_API_ENTRY cl_mem CL_API_CALL
1109
+ clCreateBufferWithProperties(cl_context context,
1110
+ const cl_mem_properties * properties,
1111
+ cl_mem_flags flags,
1112
+ size_t size,
1113
+ void * host_ptr,
1114
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_3_0;
1115
+
1116
+ extern CL_API_ENTRY cl_mem CL_API_CALL
1117
+ clCreateImageWithProperties(cl_context context,
1118
+ const cl_mem_properties * properties,
1119
+ cl_mem_flags flags,
1120
+ const cl_image_format * image_format,
1121
+ const cl_image_desc * image_desc,
1122
+ void * host_ptr,
1123
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_3_0;
1124
+
1125
+ #endif
1126
+
1127
+ extern CL_API_ENTRY cl_int CL_API_CALL
1128
+ clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
1129
+
1130
+ extern CL_API_ENTRY cl_int CL_API_CALL
1131
+ clReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
1132
+
1133
+ extern CL_API_ENTRY cl_int CL_API_CALL
1134
+ clGetSupportedImageFormats(cl_context context,
1135
+ cl_mem_flags flags,
1136
+ cl_mem_object_type image_type,
1137
+ cl_uint num_entries,
1138
+ cl_image_format * image_formats,
1139
+ cl_uint * num_image_formats) CL_API_SUFFIX__VERSION_1_0;
1140
+
1141
+ extern CL_API_ENTRY cl_int CL_API_CALL
1142
+ clGetMemObjectInfo(cl_mem memobj,
1143
+ cl_mem_info param_name,
1144
+ size_t param_value_size,
1145
+ void * param_value,
1146
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1147
+
1148
+ extern CL_API_ENTRY cl_int CL_API_CALL
1149
+ clGetImageInfo(cl_mem image,
1150
+ cl_image_info param_name,
1151
+ size_t param_value_size,
1152
+ void * param_value,
1153
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1154
+
1155
+ #ifdef CL_VERSION_2_0
1156
+
1157
+ extern CL_API_ENTRY cl_int CL_API_CALL
1158
+ clGetPipeInfo(cl_mem pipe,
1159
+ cl_pipe_info param_name,
1160
+ size_t param_value_size,
1161
+ void * param_value,
1162
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_2_0;
1163
+
1164
+ #endif
1165
+
1166
+ #ifdef CL_VERSION_1_1
1167
+
1168
+ extern CL_API_ENTRY cl_int CL_API_CALL
1169
+ clSetMemObjectDestructorCallback(cl_mem memobj,
1170
+ void (CL_CALLBACK * pfn_notify)(cl_mem memobj,
1171
+ void * user_data),
1172
+ void * user_data) CL_API_SUFFIX__VERSION_1_1;
1173
+
1174
+ #endif
1175
+
1176
+ /* SVM Allocation APIs */
1177
+
1178
+ #ifdef CL_VERSION_2_0
1179
+
1180
+ extern CL_API_ENTRY void * CL_API_CALL
1181
+ clSVMAlloc(cl_context context,
1182
+ cl_svm_mem_flags flags,
1183
+ size_t size,
1184
+ cl_uint alignment) CL_API_SUFFIX__VERSION_2_0;
1185
+
1186
+ extern CL_API_ENTRY void CL_API_CALL
1187
+ clSVMFree(cl_context context,
1188
+ void * svm_pointer) CL_API_SUFFIX__VERSION_2_0;
1189
+
1190
+ #endif
1191
+
1192
+ /* Sampler APIs */
1193
+
1194
+ #ifdef CL_VERSION_2_0
1195
+
1196
+ extern CL_API_ENTRY cl_sampler CL_API_CALL
1197
+ clCreateSamplerWithProperties(cl_context context,
1198
+ const cl_sampler_properties * sampler_properties,
1199
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_2_0;
1200
+
1201
+ #endif
1202
+
1203
+ extern CL_API_ENTRY cl_int CL_API_CALL
1204
+ clRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
1205
+
1206
+ extern CL_API_ENTRY cl_int CL_API_CALL
1207
+ clReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
1208
+
1209
+ extern CL_API_ENTRY cl_int CL_API_CALL
1210
+ clGetSamplerInfo(cl_sampler sampler,
1211
+ cl_sampler_info param_name,
1212
+ size_t param_value_size,
1213
+ void * param_value,
1214
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1215
+
1216
+ /* Program Object APIs */
1217
+ extern CL_API_ENTRY cl_program CL_API_CALL
1218
+ clCreateProgramWithSource(cl_context context,
1219
+ cl_uint count,
1220
+ const char ** strings,
1221
+ const size_t * lengths,
1222
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1223
+
1224
+ extern CL_API_ENTRY cl_program CL_API_CALL
1225
+ clCreateProgramWithBinary(cl_context context,
1226
+ cl_uint num_devices,
1227
+ const cl_device_id * device_list,
1228
+ const size_t * lengths,
1229
+ const unsigned char ** binaries,
1230
+ cl_int * binary_status,
1231
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1232
+
1233
+ #ifdef CL_VERSION_1_2
1234
+
1235
+ extern CL_API_ENTRY cl_program CL_API_CALL
1236
+ clCreateProgramWithBuiltInKernels(cl_context context,
1237
+ cl_uint num_devices,
1238
+ const cl_device_id * device_list,
1239
+ const char * kernel_names,
1240
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
1241
+
1242
+ #endif
1243
+
1244
+ #ifdef CL_VERSION_2_1
1245
+
1246
+ extern CL_API_ENTRY cl_program CL_API_CALL
1247
+ clCreateProgramWithIL(cl_context context,
1248
+ const void* il,
1249
+ size_t length,
1250
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1;
1251
+
1252
+ #endif
1253
+
1254
+ extern CL_API_ENTRY cl_int CL_API_CALL
1255
+ clRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0;
1256
+
1257
+ extern CL_API_ENTRY cl_int CL_API_CALL
1258
+ clReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0;
1259
+
1260
+ extern CL_API_ENTRY cl_int CL_API_CALL
1261
+ clBuildProgram(cl_program program,
1262
+ cl_uint num_devices,
1263
+ const cl_device_id * device_list,
1264
+ const char * options,
1265
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
1266
+ void * user_data),
1267
+ void * user_data) CL_API_SUFFIX__VERSION_1_0;
1268
+
1269
+ #ifdef CL_VERSION_1_2
1270
+
1271
+ extern CL_API_ENTRY cl_int CL_API_CALL
1272
+ clCompileProgram(cl_program program,
1273
+ cl_uint num_devices,
1274
+ const cl_device_id * device_list,
1275
+ const char * options,
1276
+ cl_uint num_input_headers,
1277
+ const cl_program * input_headers,
1278
+ const char ** header_include_names,
1279
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
1280
+ void * user_data),
1281
+ void * user_data) CL_API_SUFFIX__VERSION_1_2;
1282
+
1283
+ extern CL_API_ENTRY cl_program CL_API_CALL
1284
+ clLinkProgram(cl_context context,
1285
+ cl_uint num_devices,
1286
+ const cl_device_id * device_list,
1287
+ const char * options,
1288
+ cl_uint num_input_programs,
1289
+ const cl_program * input_programs,
1290
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
1291
+ void * user_data),
1292
+ void * user_data,
1293
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
1294
+
1295
+ #endif
1296
+
1297
+ #ifdef CL_VERSION_2_2
1298
+
1299
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_2_2_DEPRECATED cl_int CL_API_CALL
1300
+ clSetProgramReleaseCallback(cl_program program,
1301
+ void (CL_CALLBACK * pfn_notify)(cl_program program,
1302
+ void * user_data),
1303
+ void * user_data) CL_API_SUFFIX__VERSION_2_2_DEPRECATED;
1304
+
1305
+ extern CL_API_ENTRY cl_int CL_API_CALL
1306
+ clSetProgramSpecializationConstant(cl_program program,
1307
+ cl_uint spec_id,
1308
+ size_t spec_size,
1309
+ const void* spec_value) CL_API_SUFFIX__VERSION_2_2;
1310
+
1311
+ #endif
1312
+
1313
+ #ifdef CL_VERSION_1_2
1314
+
1315
+ extern CL_API_ENTRY cl_int CL_API_CALL
1316
+ clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
1317
+
1318
+ #endif
1319
+
1320
+ extern CL_API_ENTRY cl_int CL_API_CALL
1321
+ clGetProgramInfo(cl_program program,
1322
+ cl_program_info param_name,
1323
+ size_t param_value_size,
1324
+ void * param_value,
1325
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1326
+
1327
+ extern CL_API_ENTRY cl_int CL_API_CALL
1328
+ clGetProgramBuildInfo(cl_program program,
1329
+ cl_device_id device,
1330
+ cl_program_build_info param_name,
1331
+ size_t param_value_size,
1332
+ void * param_value,
1333
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1334
+
1335
+ /* Kernel Object APIs */
1336
+ extern CL_API_ENTRY cl_kernel CL_API_CALL
1337
+ clCreateKernel(cl_program program,
1338
+ const char * kernel_name,
1339
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1340
+
1341
+ extern CL_API_ENTRY cl_int CL_API_CALL
1342
+ clCreateKernelsInProgram(cl_program program,
1343
+ cl_uint num_kernels,
1344
+ cl_kernel * kernels,
1345
+ cl_uint * num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
1346
+
1347
+ #ifdef CL_VERSION_2_1
1348
+
1349
+ extern CL_API_ENTRY cl_kernel CL_API_CALL
1350
+ clCloneKernel(cl_kernel source_kernel,
1351
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1;
1352
+
1353
+ #endif
1354
+
1355
+ extern CL_API_ENTRY cl_int CL_API_CALL
1356
+ clRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
1357
+
1358
+ extern CL_API_ENTRY cl_int CL_API_CALL
1359
+ clReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
1360
+
1361
+ extern CL_API_ENTRY cl_int CL_API_CALL
1362
+ clSetKernelArg(cl_kernel kernel,
1363
+ cl_uint arg_index,
1364
+ size_t arg_size,
1365
+ const void * arg_value) CL_API_SUFFIX__VERSION_1_0;
1366
+
1367
+ #ifdef CL_VERSION_2_0
1368
+
1369
+ extern CL_API_ENTRY cl_int CL_API_CALL
1370
+ clSetKernelArgSVMPointer(cl_kernel kernel,
1371
+ cl_uint arg_index,
1372
+ const void * arg_value) CL_API_SUFFIX__VERSION_2_0;
1373
+
1374
+ extern CL_API_ENTRY cl_int CL_API_CALL
1375
+ clSetKernelExecInfo(cl_kernel kernel,
1376
+ cl_kernel_exec_info param_name,
1377
+ size_t param_value_size,
1378
+ const void * param_value) CL_API_SUFFIX__VERSION_2_0;
1379
+
1380
+ #endif
1381
+
1382
+ extern CL_API_ENTRY cl_int CL_API_CALL
1383
+ clGetKernelInfo(cl_kernel kernel,
1384
+ cl_kernel_info param_name,
1385
+ size_t param_value_size,
1386
+ void * param_value,
1387
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1388
+
1389
+ #ifdef CL_VERSION_1_2
1390
+
1391
+ extern CL_API_ENTRY cl_int CL_API_CALL
1392
+ clGetKernelArgInfo(cl_kernel kernel,
1393
+ cl_uint arg_indx,
1394
+ cl_kernel_arg_info param_name,
1395
+ size_t param_value_size,
1396
+ void * param_value,
1397
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
1398
+
1399
+ #endif
1400
+
1401
+ extern CL_API_ENTRY cl_int CL_API_CALL
1402
+ clGetKernelWorkGroupInfo(cl_kernel kernel,
1403
+ cl_device_id device,
1404
+ cl_kernel_work_group_info param_name,
1405
+ size_t param_value_size,
1406
+ void * param_value,
1407
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1408
+
1409
+ #ifdef CL_VERSION_2_1
1410
+
1411
+ extern CL_API_ENTRY cl_int CL_API_CALL
1412
+ clGetKernelSubGroupInfo(cl_kernel kernel,
1413
+ cl_device_id device,
1414
+ cl_kernel_sub_group_info param_name,
1415
+ size_t input_value_size,
1416
+ const void* input_value,
1417
+ size_t param_value_size,
1418
+ void* param_value,
1419
+ size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_1;
1420
+
1421
+ #endif
1422
+
1423
+ /* Event Object APIs */
1424
+ extern CL_API_ENTRY cl_int CL_API_CALL
1425
+ clWaitForEvents(cl_uint num_events,
1426
+ const cl_event * event_list) CL_API_SUFFIX__VERSION_1_0;
1427
+
1428
+ extern CL_API_ENTRY cl_int CL_API_CALL
1429
+ clGetEventInfo(cl_event event,
1430
+ cl_event_info param_name,
1431
+ size_t param_value_size,
1432
+ void * param_value,
1433
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1434
+
1435
+ #ifdef CL_VERSION_1_1
1436
+
1437
+ extern CL_API_ENTRY cl_event CL_API_CALL
1438
+ clCreateUserEvent(cl_context context,
1439
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1;
1440
+
1441
+ #endif
1442
+
1443
+ extern CL_API_ENTRY cl_int CL_API_CALL
1444
+ clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0;
1445
+
1446
+ extern CL_API_ENTRY cl_int CL_API_CALL
1447
+ clReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0;
1448
+
1449
+ #ifdef CL_VERSION_1_1
1450
+
1451
+ extern CL_API_ENTRY cl_int CL_API_CALL
1452
+ clSetUserEventStatus(cl_event event,
1453
+ cl_int execution_status) CL_API_SUFFIX__VERSION_1_1;
1454
+
1455
+ extern CL_API_ENTRY cl_int CL_API_CALL
1456
+ clSetEventCallback(cl_event event,
1457
+ cl_int command_exec_callback_type,
1458
+ void (CL_CALLBACK * pfn_notify)(cl_event event,
1459
+ cl_int event_command_status,
1460
+ void * user_data),
1461
+ void * user_data) CL_API_SUFFIX__VERSION_1_1;
1462
+
1463
+ #endif
1464
+
1465
+ /* Profiling APIs */
1466
+ extern CL_API_ENTRY cl_int CL_API_CALL
1467
+ clGetEventProfilingInfo(cl_event event,
1468
+ cl_profiling_info param_name,
1469
+ size_t param_value_size,
1470
+ void * param_value,
1471
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
1472
+
1473
+ /* Flush and Finish APIs */
1474
+ extern CL_API_ENTRY cl_int CL_API_CALL
1475
+ clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1476
+
1477
+ extern CL_API_ENTRY cl_int CL_API_CALL
1478
+ clFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
1479
+
1480
+ /* Enqueued Commands APIs */
1481
+ extern CL_API_ENTRY cl_int CL_API_CALL
1482
+ clEnqueueReadBuffer(cl_command_queue command_queue,
1483
+ cl_mem buffer,
1484
+ cl_bool blocking_read,
1485
+ size_t offset,
1486
+ size_t size,
1487
+ void * ptr,
1488
+ cl_uint num_events_in_wait_list,
1489
+ const cl_event * event_wait_list,
1490
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1491
+
1492
+ #ifdef CL_VERSION_1_1
1493
+
1494
+ extern CL_API_ENTRY cl_int CL_API_CALL
1495
+ clEnqueueReadBufferRect(cl_command_queue command_queue,
1496
+ cl_mem buffer,
1497
+ cl_bool blocking_read,
1498
+ const size_t * buffer_origin,
1499
+ const size_t * host_origin,
1500
+ const size_t * region,
1501
+ size_t buffer_row_pitch,
1502
+ size_t buffer_slice_pitch,
1503
+ size_t host_row_pitch,
1504
+ size_t host_slice_pitch,
1505
+ void * ptr,
1506
+ cl_uint num_events_in_wait_list,
1507
+ const cl_event * event_wait_list,
1508
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1;
1509
+
1510
+ #endif
1511
+
1512
+ extern CL_API_ENTRY cl_int CL_API_CALL
1513
+ clEnqueueWriteBuffer(cl_command_queue command_queue,
1514
+ cl_mem buffer,
1515
+ cl_bool blocking_write,
1516
+ size_t offset,
1517
+ size_t size,
1518
+ const void * ptr,
1519
+ cl_uint num_events_in_wait_list,
1520
+ const cl_event * event_wait_list,
1521
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1522
+
1523
+ #ifdef CL_VERSION_1_1
1524
+
1525
+ extern CL_API_ENTRY cl_int CL_API_CALL
1526
+ clEnqueueWriteBufferRect(cl_command_queue command_queue,
1527
+ cl_mem buffer,
1528
+ cl_bool blocking_write,
1529
+ const size_t * buffer_origin,
1530
+ const size_t * host_origin,
1531
+ const size_t * region,
1532
+ size_t buffer_row_pitch,
1533
+ size_t buffer_slice_pitch,
1534
+ size_t host_row_pitch,
1535
+ size_t host_slice_pitch,
1536
+ const void * ptr,
1537
+ cl_uint num_events_in_wait_list,
1538
+ const cl_event * event_wait_list,
1539
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1;
1540
+
1541
+ #endif
1542
+
1543
+ #ifdef CL_VERSION_1_2
1544
+
1545
+ extern CL_API_ENTRY cl_int CL_API_CALL
1546
+ clEnqueueFillBuffer(cl_command_queue command_queue,
1547
+ cl_mem buffer,
1548
+ const void * pattern,
1549
+ size_t pattern_size,
1550
+ size_t offset,
1551
+ size_t size,
1552
+ cl_uint num_events_in_wait_list,
1553
+ const cl_event * event_wait_list,
1554
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1555
+
1556
+ #endif
1557
+
1558
+ extern CL_API_ENTRY cl_int CL_API_CALL
1559
+ clEnqueueCopyBuffer(cl_command_queue command_queue,
1560
+ cl_mem src_buffer,
1561
+ cl_mem dst_buffer,
1562
+ size_t src_offset,
1563
+ size_t dst_offset,
1564
+ size_t size,
1565
+ cl_uint num_events_in_wait_list,
1566
+ const cl_event * event_wait_list,
1567
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1568
+
1569
+ #ifdef CL_VERSION_1_1
1570
+
1571
+ extern CL_API_ENTRY cl_int CL_API_CALL
1572
+ clEnqueueCopyBufferRect(cl_command_queue command_queue,
1573
+ cl_mem src_buffer,
1574
+ cl_mem dst_buffer,
1575
+ const size_t * src_origin,
1576
+ const size_t * dst_origin,
1577
+ const size_t * region,
1578
+ size_t src_row_pitch,
1579
+ size_t src_slice_pitch,
1580
+ size_t dst_row_pitch,
1581
+ size_t dst_slice_pitch,
1582
+ cl_uint num_events_in_wait_list,
1583
+ const cl_event * event_wait_list,
1584
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1;
1585
+
1586
+ #endif
1587
+
1588
+ extern CL_API_ENTRY cl_int CL_API_CALL
1589
+ clEnqueueReadImage(cl_command_queue command_queue,
1590
+ cl_mem image,
1591
+ cl_bool blocking_read,
1592
+ const size_t * origin,
1593
+ const size_t * region,
1594
+ size_t row_pitch,
1595
+ size_t slice_pitch,
1596
+ void * ptr,
1597
+ cl_uint num_events_in_wait_list,
1598
+ const cl_event * event_wait_list,
1599
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1600
+
1601
+ extern CL_API_ENTRY cl_int CL_API_CALL
1602
+ clEnqueueWriteImage(cl_command_queue command_queue,
1603
+ cl_mem image,
1604
+ cl_bool blocking_write,
1605
+ const size_t * origin,
1606
+ const size_t * region,
1607
+ size_t input_row_pitch,
1608
+ size_t input_slice_pitch,
1609
+ const void * ptr,
1610
+ cl_uint num_events_in_wait_list,
1611
+ const cl_event * event_wait_list,
1612
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1613
+
1614
+ #ifdef CL_VERSION_1_2
1615
+
1616
+ extern CL_API_ENTRY cl_int CL_API_CALL
1617
+ clEnqueueFillImage(cl_command_queue command_queue,
1618
+ cl_mem image,
1619
+ const void * fill_color,
1620
+ const size_t * origin,
1621
+ const size_t * region,
1622
+ cl_uint num_events_in_wait_list,
1623
+ const cl_event * event_wait_list,
1624
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1625
+
1626
+ #endif
1627
+
1628
+ extern CL_API_ENTRY cl_int CL_API_CALL
1629
+ clEnqueueCopyImage(cl_command_queue command_queue,
1630
+ cl_mem src_image,
1631
+ cl_mem dst_image,
1632
+ const size_t * src_origin,
1633
+ const size_t * dst_origin,
1634
+ const size_t * region,
1635
+ cl_uint num_events_in_wait_list,
1636
+ const cl_event * event_wait_list,
1637
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1638
+
1639
+ extern CL_API_ENTRY cl_int CL_API_CALL
1640
+ clEnqueueCopyImageToBuffer(cl_command_queue command_queue,
1641
+ cl_mem src_image,
1642
+ cl_mem dst_buffer,
1643
+ const size_t * src_origin,
1644
+ const size_t * region,
1645
+ size_t dst_offset,
1646
+ cl_uint num_events_in_wait_list,
1647
+ const cl_event * event_wait_list,
1648
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1649
+
1650
+ extern CL_API_ENTRY cl_int CL_API_CALL
1651
+ clEnqueueCopyBufferToImage(cl_command_queue command_queue,
1652
+ cl_mem src_buffer,
1653
+ cl_mem dst_image,
1654
+ size_t src_offset,
1655
+ const size_t * dst_origin,
1656
+ const size_t * region,
1657
+ cl_uint num_events_in_wait_list,
1658
+ const cl_event * event_wait_list,
1659
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1660
+
1661
+ extern CL_API_ENTRY void * CL_API_CALL
1662
+ clEnqueueMapBuffer(cl_command_queue command_queue,
1663
+ cl_mem buffer,
1664
+ cl_bool blocking_map,
1665
+ cl_map_flags map_flags,
1666
+ size_t offset,
1667
+ size_t size,
1668
+ cl_uint num_events_in_wait_list,
1669
+ const cl_event * event_wait_list,
1670
+ cl_event * event,
1671
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1672
+
1673
+ extern CL_API_ENTRY void * CL_API_CALL
1674
+ clEnqueueMapImage(cl_command_queue command_queue,
1675
+ cl_mem image,
1676
+ cl_bool blocking_map,
1677
+ cl_map_flags map_flags,
1678
+ const size_t * origin,
1679
+ const size_t * region,
1680
+ size_t * image_row_pitch,
1681
+ size_t * image_slice_pitch,
1682
+ cl_uint num_events_in_wait_list,
1683
+ const cl_event * event_wait_list,
1684
+ cl_event * event,
1685
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
1686
+
1687
+ extern CL_API_ENTRY cl_int CL_API_CALL
1688
+ clEnqueueUnmapMemObject(cl_command_queue command_queue,
1689
+ cl_mem memobj,
1690
+ void * mapped_ptr,
1691
+ cl_uint num_events_in_wait_list,
1692
+ const cl_event * event_wait_list,
1693
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1694
+
1695
+ #ifdef CL_VERSION_1_2
1696
+
1697
+ extern CL_API_ENTRY cl_int CL_API_CALL
1698
+ clEnqueueMigrateMemObjects(cl_command_queue command_queue,
1699
+ cl_uint num_mem_objects,
1700
+ const cl_mem * mem_objects,
1701
+ cl_mem_migration_flags flags,
1702
+ cl_uint num_events_in_wait_list,
1703
+ const cl_event * event_wait_list,
1704
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1705
+
1706
+ #endif
1707
+
1708
+ extern CL_API_ENTRY cl_int CL_API_CALL
1709
+ clEnqueueNDRangeKernel(cl_command_queue command_queue,
1710
+ cl_kernel kernel,
1711
+ cl_uint work_dim,
1712
+ const size_t * global_work_offset,
1713
+ const size_t * global_work_size,
1714
+ const size_t * local_work_size,
1715
+ cl_uint num_events_in_wait_list,
1716
+ const cl_event * event_wait_list,
1717
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1718
+
1719
+ extern CL_API_ENTRY cl_int CL_API_CALL
1720
+ clEnqueueNativeKernel(cl_command_queue command_queue,
1721
+ void (CL_CALLBACK * user_func)(void *),
1722
+ void * args,
1723
+ size_t cb_args,
1724
+ cl_uint num_mem_objects,
1725
+ const cl_mem * mem_list,
1726
+ const void ** args_mem_loc,
1727
+ cl_uint num_events_in_wait_list,
1728
+ const cl_event * event_wait_list,
1729
+ cl_event * event) CL_API_SUFFIX__VERSION_1_0;
1730
+
1731
+ #ifdef CL_VERSION_1_2
1732
+
1733
+ extern CL_API_ENTRY cl_int CL_API_CALL
1734
+ clEnqueueMarkerWithWaitList(cl_command_queue command_queue,
1735
+ cl_uint num_events_in_wait_list,
1736
+ const cl_event * event_wait_list,
1737
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1738
+
1739
+ extern CL_API_ENTRY cl_int CL_API_CALL
1740
+ clEnqueueBarrierWithWaitList(cl_command_queue command_queue,
1741
+ cl_uint num_events_in_wait_list,
1742
+ const cl_event * event_wait_list,
1743
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2;
1744
+
1745
+ #endif
1746
+
1747
+ #ifdef CL_VERSION_2_0
1748
+
1749
+ extern CL_API_ENTRY cl_int CL_API_CALL
1750
+ clEnqueueSVMFree(cl_command_queue command_queue,
1751
+ cl_uint num_svm_pointers,
1752
+ void * svm_pointers[],
1753
+ void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue,
1754
+ cl_uint num_svm_pointers,
1755
+ void * svm_pointers[],
1756
+ void * user_data),
1757
+ void * user_data,
1758
+ cl_uint num_events_in_wait_list,
1759
+ const cl_event * event_wait_list,
1760
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
1761
+
1762
+ extern CL_API_ENTRY cl_int CL_API_CALL
1763
+ clEnqueueSVMMemcpy(cl_command_queue command_queue,
1764
+ cl_bool blocking_copy,
1765
+ void * dst_ptr,
1766
+ const void * src_ptr,
1767
+ size_t size,
1768
+ cl_uint num_events_in_wait_list,
1769
+ const cl_event * event_wait_list,
1770
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
1771
+
1772
+ extern CL_API_ENTRY cl_int CL_API_CALL
1773
+ clEnqueueSVMMemFill(cl_command_queue command_queue,
1774
+ void * svm_ptr,
1775
+ const void * pattern,
1776
+ size_t pattern_size,
1777
+ size_t size,
1778
+ cl_uint num_events_in_wait_list,
1779
+ const cl_event * event_wait_list,
1780
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
1781
+
1782
+ extern CL_API_ENTRY cl_int CL_API_CALL
1783
+ clEnqueueSVMMap(cl_command_queue command_queue,
1784
+ cl_bool blocking_map,
1785
+ cl_map_flags flags,
1786
+ void * svm_ptr,
1787
+ size_t size,
1788
+ cl_uint num_events_in_wait_list,
1789
+ const cl_event * event_wait_list,
1790
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
1791
+
1792
+ extern CL_API_ENTRY cl_int CL_API_CALL
1793
+ clEnqueueSVMUnmap(cl_command_queue command_queue,
1794
+ void * svm_ptr,
1795
+ cl_uint num_events_in_wait_list,
1796
+ const cl_event * event_wait_list,
1797
+ cl_event * event) CL_API_SUFFIX__VERSION_2_0;
1798
+
1799
+ #endif
1800
+
1801
+ #ifdef CL_VERSION_2_1
1802
+
1803
+ extern CL_API_ENTRY cl_int CL_API_CALL
1804
+ clEnqueueSVMMigrateMem(cl_command_queue command_queue,
1805
+ cl_uint num_svm_pointers,
1806
+ const void ** svm_pointers,
1807
+ const size_t * sizes,
1808
+ cl_mem_migration_flags flags,
1809
+ cl_uint num_events_in_wait_list,
1810
+ const cl_event * event_wait_list,
1811
+ cl_event * event) CL_API_SUFFIX__VERSION_2_1;
1812
+
1813
+ #endif
1814
+
1815
+ #ifdef CL_VERSION_1_2
1816
+
1817
+ /* Extension function access
1818
+ *
1819
+ * Returns the extension function address for the given function name,
1820
+ * or NULL if a valid function can not be found. The client must
1821
+ * check to make sure the address is not NULL, before using or
1822
+ * calling the returned function address.
1823
+ */
1824
+ extern CL_API_ENTRY void * CL_API_CALL
1825
+ clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,
1826
+ const char * func_name) CL_API_SUFFIX__VERSION_1_2;
1827
+
1828
+ #endif
1829
+
1830
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
1831
+ /*
1832
+ * WARNING:
1833
+ * This API introduces mutable state into the OpenCL implementation. It has been REMOVED
1834
+ * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the
1835
+ * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably.
1836
+ * It is likely to be non-performant. Use of this API is not advised. Use at your own risk.
1837
+ *
1838
+ * Software developers previously relying on this API are instructed to set the command queue
1839
+ * properties when creating the queue, instead.
1840
+ */
1841
+ extern CL_API_ENTRY cl_int CL_API_CALL
1842
+ clSetCommandQueueProperty(cl_command_queue command_queue,
1843
+ cl_command_queue_properties properties,
1844
+ cl_bool enable,
1845
+ cl_command_queue_properties * old_properties) CL_API_SUFFIX__VERSION_1_0_DEPRECATED;
1846
+ #endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */
1847
+
1848
+ /* Deprecated OpenCL 1.1 APIs */
1849
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1850
+ clCreateImage2D(cl_context context,
1851
+ cl_mem_flags flags,
1852
+ const cl_image_format * image_format,
1853
+ size_t image_width,
1854
+ size_t image_height,
1855
+ size_t image_row_pitch,
1856
+ void * host_ptr,
1857
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1858
+
1859
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
1860
+ clCreateImage3D(cl_context context,
1861
+ cl_mem_flags flags,
1862
+ const cl_image_format * image_format,
1863
+ size_t image_width,
1864
+ size_t image_height,
1865
+ size_t image_depth,
1866
+ size_t image_row_pitch,
1867
+ size_t image_slice_pitch,
1868
+ void * host_ptr,
1869
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1870
+
1871
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1872
+ clEnqueueMarker(cl_command_queue command_queue,
1873
+ cl_event * event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1874
+
1875
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1876
+ clEnqueueWaitForEvents(cl_command_queue command_queue,
1877
+ cl_uint num_events,
1878
+ const cl_event * event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1879
+
1880
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1881
+ clEnqueueBarrier(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1882
+
1883
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
1884
+ clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1885
+
1886
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
1887
+ clGetExtensionFunctionAddress(const char * func_name) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
1888
+
1889
+ /* Deprecated OpenCL 2.0 APIs */
1890
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
1891
+ clCreateCommandQueue(cl_context context,
1892
+ cl_device_id device,
1893
+ cl_command_queue_properties properties,
1894
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
1895
+
1896
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
1897
+ clCreateSampler(cl_context context,
1898
+ cl_bool normalized_coords,
1899
+ cl_addressing_mode addressing_mode,
1900
+ cl_filter_mode filter_mode,
1901
+ cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
1902
+
1903
+ extern CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
1904
+ clEnqueueTask(cl_command_queue command_queue,
1905
+ cl_kernel kernel,
1906
+ cl_uint num_events_in_wait_list,
1907
+ const cl_event * event_wait_list,
1908
+ cl_event * event) CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
1909
+
1910
+ #endif /* !defined(CL_NO_CORE_PROTOTYPES) */
1911
+
1912
+ #ifdef __cplusplus
1913
+ }
1914
+ #endif
1915
+
1916
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
1917
+ #pragma warning( pop )
1918
+ #endif
1919
+
1920
+ #endif /* __OPENCL_CL_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl2.hpp ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //
2
+ // Copyright (c) 2020 The Khronos Group Inc.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+
17
+ #include <CL/opencl.hpp>
18
+ #pragma message("cl2.hpp has been renamed to opencl.hpp to make it clear that it supports all versions of OpenCL. Please include opencl.hpp directly.")
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_d3d10.h ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_D3D10_H_
18
+ #define OPENCL_CL_D3D10_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #if defined(_MSC_VER)
25
+ #if _MSC_VER >=1500
26
+ #pragma warning( push )
27
+ #pragma warning( disable : 4201 )
28
+ #pragma warning( disable : 5105 )
29
+ #endif
30
+ #endif
31
+ #include <d3d10.h>
32
+ #if defined(_MSC_VER)
33
+ #if _MSC_VER >=1500
34
+ #pragma warning( pop )
35
+ #endif
36
+ #endif
37
+
38
+ #include <CL/cl.h>
39
+
40
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
41
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
42
+ #define CL_NO_EXTENSION_PROTOTYPES
43
+ #endif
44
+
45
+ /* CL_NO_EXTENSION_PROTOTYPES implies
46
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
47
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
48
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
49
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
50
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
51
+ #endif
52
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
53
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
54
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
55
+ #endif
56
+
57
+ #ifdef __cplusplus
58
+ extern "C" {
59
+ #endif
60
+
61
+ /***************************************************************
62
+ * cl_khr_d3d10_sharing
63
+ ***************************************************************/
64
+ #define cl_khr_d3d10_sharing 1
65
+ #define CL_KHR_D3D10_SHARING_EXTENSION_NAME \
66
+ "cl_khr_d3d10_sharing"
67
+
68
+
69
+ #define CL_KHR_D3D10_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
70
+
71
+ typedef cl_uint cl_d3d10_device_source_khr;
72
+ typedef cl_uint cl_d3d10_device_set_khr;
73
+
74
+ /* Error codes */
75
+ #define CL_INVALID_D3D10_DEVICE_KHR -1002
76
+ #define CL_INVALID_D3D10_RESOURCE_KHR -1003
77
+ #define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
78
+ #define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
79
+
80
+ /* cl_d3d10_device_source_khr */
81
+ #define CL_D3D10_DEVICE_KHR 0x4010
82
+ #define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
83
+
84
+ /* cl_d3d10_device_set_khr */
85
+ #define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
86
+ #define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
87
+
88
+ /* cl_context_info */
89
+ #define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
90
+ #define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
91
+
92
+ /* cl_mem_info */
93
+ #define CL_MEM_D3D10_RESOURCE_KHR 0x4015
94
+
95
+ /* cl_image_info */
96
+ #define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
97
+
98
+ /* cl_command_type */
99
+ #define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
100
+ #define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
101
+
102
+
103
+ typedef cl_int CL_API_CALL
104
+ clGetDeviceIDsFromD3D10KHR_t(
105
+ cl_platform_id platform,
106
+ cl_d3d10_device_source_khr d3d_device_source,
107
+ void* d3d_object,
108
+ cl_d3d10_device_set_khr d3d_device_set,
109
+ cl_uint num_entries,
110
+ cl_device_id* devices,
111
+ cl_uint* num_devices);
112
+
113
+ typedef clGetDeviceIDsFromD3D10KHR_t *
114
+ clGetDeviceIDsFromD3D10KHR_fn CL_API_SUFFIX__VERSION_1_0;
115
+
116
+ typedef cl_mem CL_API_CALL
117
+ clCreateFromD3D10BufferKHR_t(
118
+ cl_context context,
119
+ cl_mem_flags flags,
120
+ ID3D10Buffer* resource,
121
+ cl_int* errcode_ret);
122
+
123
+ typedef clCreateFromD3D10BufferKHR_t *
124
+ clCreateFromD3D10BufferKHR_fn CL_API_SUFFIX__VERSION_1_0;
125
+
126
+ typedef cl_mem CL_API_CALL
127
+ clCreateFromD3D10Texture2DKHR_t(
128
+ cl_context context,
129
+ cl_mem_flags flags,
130
+ ID3D10Texture2D* resource,
131
+ UINT subresource,
132
+ cl_int* errcode_ret);
133
+
134
+ typedef clCreateFromD3D10Texture2DKHR_t *
135
+ clCreateFromD3D10Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_0;
136
+
137
+ typedef cl_mem CL_API_CALL
138
+ clCreateFromD3D10Texture3DKHR_t(
139
+ cl_context context,
140
+ cl_mem_flags flags,
141
+ ID3D10Texture3D* resource,
142
+ UINT subresource,
143
+ cl_int* errcode_ret);
144
+
145
+ typedef clCreateFromD3D10Texture3DKHR_t *
146
+ clCreateFromD3D10Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_0;
147
+
148
+ typedef cl_int CL_API_CALL
149
+ clEnqueueAcquireD3D10ObjectsKHR_t(
150
+ cl_command_queue command_queue,
151
+ cl_uint num_objects,
152
+ const cl_mem* mem_objects,
153
+ cl_uint num_events_in_wait_list,
154
+ const cl_event* event_wait_list,
155
+ cl_event* event);
156
+
157
+ typedef clEnqueueAcquireD3D10ObjectsKHR_t *
158
+ clEnqueueAcquireD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
159
+
160
+ typedef cl_int CL_API_CALL
161
+ clEnqueueReleaseD3D10ObjectsKHR_t(
162
+ cl_command_queue command_queue,
163
+ cl_uint num_objects,
164
+ const cl_mem* mem_objects,
165
+ cl_uint num_events_in_wait_list,
166
+ const cl_event* event_wait_list,
167
+ cl_event* event);
168
+
169
+ typedef clEnqueueReleaseD3D10ObjectsKHR_t *
170
+ clEnqueueReleaseD3D10ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
171
+
172
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
173
+
174
+ extern CL_API_ENTRY cl_int CL_API_CALL
175
+ clGetDeviceIDsFromD3D10KHR(
176
+ cl_platform_id platform,
177
+ cl_d3d10_device_source_khr d3d_device_source,
178
+ void* d3d_object,
179
+ cl_d3d10_device_set_khr d3d_device_set,
180
+ cl_uint num_entries,
181
+ cl_device_id* devices,
182
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
183
+
184
+ extern CL_API_ENTRY cl_mem CL_API_CALL
185
+ clCreateFromD3D10BufferKHR(
186
+ cl_context context,
187
+ cl_mem_flags flags,
188
+ ID3D10Buffer* resource,
189
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
190
+
191
+ extern CL_API_ENTRY cl_mem CL_API_CALL
192
+ clCreateFromD3D10Texture2DKHR(
193
+ cl_context context,
194
+ cl_mem_flags flags,
195
+ ID3D10Texture2D* resource,
196
+ UINT subresource,
197
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
198
+
199
+ extern CL_API_ENTRY cl_mem CL_API_CALL
200
+ clCreateFromD3D10Texture3DKHR(
201
+ cl_context context,
202
+ cl_mem_flags flags,
203
+ ID3D10Texture3D* resource,
204
+ UINT subresource,
205
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
206
+
207
+ extern CL_API_ENTRY cl_int CL_API_CALL
208
+ clEnqueueAcquireD3D10ObjectsKHR(
209
+ cl_command_queue command_queue,
210
+ cl_uint num_objects,
211
+ const cl_mem* mem_objects,
212
+ cl_uint num_events_in_wait_list,
213
+ const cl_event* event_wait_list,
214
+ cl_event* event) CL_API_SUFFIX__VERSION_1_0;
215
+
216
+ extern CL_API_ENTRY cl_int CL_API_CALL
217
+ clEnqueueReleaseD3D10ObjectsKHR(
218
+ cl_command_queue command_queue,
219
+ cl_uint num_objects,
220
+ const cl_mem* mem_objects,
221
+ cl_uint num_events_in_wait_list,
222
+ const cl_event* event_wait_list,
223
+ cl_event* event) CL_API_SUFFIX__VERSION_1_0;
224
+
225
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
226
+
227
+ /***************************************************************
228
+ * cl_intel_sharing_format_query_d3d10
229
+ ***************************************************************/
230
+ #define cl_intel_sharing_format_query_d3d10 1
231
+ #define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_NAME \
232
+ "cl_intel_sharing_format_query_d3d10"
233
+
234
+
235
+ #define CL_INTEL_SHARING_FORMAT_QUERY_D3D10_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
236
+
237
+ /* when cl_khr_d3d10_sharing is supported */
238
+
239
+ typedef cl_int CL_API_CALL
240
+ clGetSupportedD3D10TextureFormatsINTEL_t(
241
+ cl_context context,
242
+ cl_mem_flags flags,
243
+ cl_mem_object_type image_type,
244
+ cl_uint num_entries,
245
+ DXGI_FORMAT* d3d10_formats,
246
+ cl_uint* num_texture_formats);
247
+
248
+ typedef clGetSupportedD3D10TextureFormatsINTEL_t *
249
+ clGetSupportedD3D10TextureFormatsINTEL_fn ;
250
+
251
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
252
+
253
+ extern CL_API_ENTRY cl_int CL_API_CALL
254
+ clGetSupportedD3D10TextureFormatsINTEL(
255
+ cl_context context,
256
+ cl_mem_flags flags,
257
+ cl_mem_object_type image_type,
258
+ cl_uint num_entries,
259
+ DXGI_FORMAT* d3d10_formats,
260
+ cl_uint* num_texture_formats) ;
261
+
262
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
263
+
264
+ #ifdef __cplusplus
265
+ }
266
+ #endif
267
+
268
+ #endif /* OPENCL_CL_D3D10_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_d3d11.h ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_D3D11_H_
18
+ #define OPENCL_CL_D3D11_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #if defined(_MSC_VER)
25
+ #if _MSC_VER >=1500
26
+ #pragma warning( push )
27
+ #pragma warning( disable : 4201 )
28
+ #pragma warning( disable : 5105 )
29
+ #endif
30
+ #endif
31
+ #include <d3d11.h>
32
+ #if defined(_MSC_VER)
33
+ #if _MSC_VER >=1500
34
+ #pragma warning( pop )
35
+ #endif
36
+ #endif
37
+
38
+ #include <CL/cl.h>
39
+
40
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
41
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
42
+ #define CL_NO_EXTENSION_PROTOTYPES
43
+ #endif
44
+
45
+ /* CL_NO_EXTENSION_PROTOTYPES implies
46
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
47
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
48
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
49
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
50
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
51
+ #endif
52
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
53
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
54
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
55
+ #endif
56
+
57
+ #ifdef __cplusplus
58
+ extern "C" {
59
+ #endif
60
+
61
+ /***************************************************************
62
+ * cl_khr_d3d11_sharing
63
+ ***************************************************************/
64
+ #define cl_khr_d3d11_sharing 1
65
+ #define CL_KHR_D3D11_SHARING_EXTENSION_NAME \
66
+ "cl_khr_d3d11_sharing"
67
+
68
+
69
+ #define CL_KHR_D3D11_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
70
+
71
+ typedef cl_uint cl_d3d11_device_source_khr;
72
+ typedef cl_uint cl_d3d11_device_set_khr;
73
+
74
+ /* Error codes */
75
+ #define CL_INVALID_D3D11_DEVICE_KHR -1006
76
+ #define CL_INVALID_D3D11_RESOURCE_KHR -1007
77
+ #define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
78
+ #define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
79
+
80
+ /* cl_d3d11_device_source_khr */
81
+ #define CL_D3D11_DEVICE_KHR 0x4019
82
+ #define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
83
+
84
+ /* cl_d3d11_device_set_khr */
85
+ #define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
86
+ #define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
87
+
88
+ /* cl_context_info */
89
+ #define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
90
+ #define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
91
+
92
+ /* cl_mem_info */
93
+ #define CL_MEM_D3D11_RESOURCE_KHR 0x401E
94
+
95
+ /* cl_image_info */
96
+ #define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
97
+
98
+ /* cl_command_type */
99
+ #define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
100
+ #define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
101
+
102
+
103
+ typedef cl_int CL_API_CALL
104
+ clGetDeviceIDsFromD3D11KHR_t(
105
+ cl_platform_id platform,
106
+ cl_d3d11_device_source_khr d3d_device_source,
107
+ void* d3d_object,
108
+ cl_d3d11_device_set_khr d3d_device_set,
109
+ cl_uint num_entries,
110
+ cl_device_id* devices,
111
+ cl_uint* num_devices);
112
+
113
+ typedef clGetDeviceIDsFromD3D11KHR_t *
114
+ clGetDeviceIDsFromD3D11KHR_fn CL_API_SUFFIX__VERSION_1_2;
115
+
116
+ typedef cl_mem CL_API_CALL
117
+ clCreateFromD3D11BufferKHR_t(
118
+ cl_context context,
119
+ cl_mem_flags flags,
120
+ ID3D11Buffer* resource,
121
+ cl_int* errcode_ret);
122
+
123
+ typedef clCreateFromD3D11BufferKHR_t *
124
+ clCreateFromD3D11BufferKHR_fn CL_API_SUFFIX__VERSION_1_2;
125
+
126
+ typedef cl_mem CL_API_CALL
127
+ clCreateFromD3D11Texture2DKHR_t(
128
+ cl_context context,
129
+ cl_mem_flags flags,
130
+ ID3D11Texture2D* resource,
131
+ UINT subresource,
132
+ cl_int* errcode_ret);
133
+
134
+ typedef clCreateFromD3D11Texture2DKHR_t *
135
+ clCreateFromD3D11Texture2DKHR_fn CL_API_SUFFIX__VERSION_1_2;
136
+
137
+ typedef cl_mem CL_API_CALL
138
+ clCreateFromD3D11Texture3DKHR_t(
139
+ cl_context context,
140
+ cl_mem_flags flags,
141
+ ID3D11Texture3D* resource,
142
+ UINT subresource,
143
+ cl_int* errcode_ret);
144
+
145
+ typedef clCreateFromD3D11Texture3DKHR_t *
146
+ clCreateFromD3D11Texture3DKHR_fn CL_API_SUFFIX__VERSION_1_2;
147
+
148
+ typedef cl_int CL_API_CALL
149
+ clEnqueueAcquireD3D11ObjectsKHR_t(
150
+ cl_command_queue command_queue,
151
+ cl_uint num_objects,
152
+ const cl_mem* mem_objects,
153
+ cl_uint num_events_in_wait_list,
154
+ const cl_event* event_wait_list,
155
+ cl_event* event);
156
+
157
+ typedef clEnqueueAcquireD3D11ObjectsKHR_t *
158
+ clEnqueueAcquireD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2;
159
+
160
+ typedef cl_int CL_API_CALL
161
+ clEnqueueReleaseD3D11ObjectsKHR_t(
162
+ cl_command_queue command_queue,
163
+ cl_uint num_objects,
164
+ const cl_mem* mem_objects,
165
+ cl_uint num_events_in_wait_list,
166
+ const cl_event* event_wait_list,
167
+ cl_event* event);
168
+
169
+ typedef clEnqueueReleaseD3D11ObjectsKHR_t *
170
+ clEnqueueReleaseD3D11ObjectsKHR_fn CL_API_SUFFIX__VERSION_1_2;
171
+
172
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
173
+
174
+ extern CL_API_ENTRY cl_int CL_API_CALL
175
+ clGetDeviceIDsFromD3D11KHR(
176
+ cl_platform_id platform,
177
+ cl_d3d11_device_source_khr d3d_device_source,
178
+ void* d3d_object,
179
+ cl_d3d11_device_set_khr d3d_device_set,
180
+ cl_uint num_entries,
181
+ cl_device_id* devices,
182
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
183
+
184
+ extern CL_API_ENTRY cl_mem CL_API_CALL
185
+ clCreateFromD3D11BufferKHR(
186
+ cl_context context,
187
+ cl_mem_flags flags,
188
+ ID3D11Buffer* resource,
189
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
190
+
191
+ extern CL_API_ENTRY cl_mem CL_API_CALL
192
+ clCreateFromD3D11Texture2DKHR(
193
+ cl_context context,
194
+ cl_mem_flags flags,
195
+ ID3D11Texture2D* resource,
196
+ UINT subresource,
197
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
198
+
199
+ extern CL_API_ENTRY cl_mem CL_API_CALL
200
+ clCreateFromD3D11Texture3DKHR(
201
+ cl_context context,
202
+ cl_mem_flags flags,
203
+ ID3D11Texture3D* resource,
204
+ UINT subresource,
205
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
206
+
207
+ extern CL_API_ENTRY cl_int CL_API_CALL
208
+ clEnqueueAcquireD3D11ObjectsKHR(
209
+ cl_command_queue command_queue,
210
+ cl_uint num_objects,
211
+ const cl_mem* mem_objects,
212
+ cl_uint num_events_in_wait_list,
213
+ const cl_event* event_wait_list,
214
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
215
+
216
+ extern CL_API_ENTRY cl_int CL_API_CALL
217
+ clEnqueueReleaseD3D11ObjectsKHR(
218
+ cl_command_queue command_queue,
219
+ cl_uint num_objects,
220
+ const cl_mem* mem_objects,
221
+ cl_uint num_events_in_wait_list,
222
+ const cl_event* event_wait_list,
223
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
224
+
225
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
226
+
227
+ /***************************************************************
228
+ * cl_intel_sharing_format_query_d3d11
229
+ ***************************************************************/
230
+ #define cl_intel_sharing_format_query_d3d11 1
231
+ #define CL_INTEL_SHARING_FORMAT_QUERY_D3D11_EXTENSION_NAME \
232
+ "cl_intel_sharing_format_query_d3d11"
233
+
234
+
235
+ #define CL_INTEL_SHARING_FORMAT_QUERY_D3D11_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
236
+
237
+ /* when cl_khr_d3d11_sharing is supported */
238
+
239
+ typedef cl_int CL_API_CALL
240
+ clGetSupportedD3D11TextureFormatsINTEL_t(
241
+ cl_context context,
242
+ cl_mem_flags flags,
243
+ cl_mem_object_type image_type,
244
+ cl_uint plane,
245
+ cl_uint num_entries,
246
+ DXGI_FORMAT* d3d11_formats,
247
+ cl_uint* num_texture_formats);
248
+
249
+ typedef clGetSupportedD3D11TextureFormatsINTEL_t *
250
+ clGetSupportedD3D11TextureFormatsINTEL_fn ;
251
+
252
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
253
+
254
+ extern CL_API_ENTRY cl_int CL_API_CALL
255
+ clGetSupportedD3D11TextureFormatsINTEL(
256
+ cl_context context,
257
+ cl_mem_flags flags,
258
+ cl_mem_object_type image_type,
259
+ cl_uint plane,
260
+ cl_uint num_entries,
261
+ DXGI_FORMAT* d3d11_formats,
262
+ cl_uint* num_texture_formats) ;
263
+
264
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
265
+
266
+ #ifdef __cplusplus
267
+ }
268
+ #endif
269
+
270
+ #endif /* OPENCL_CL_D3D11_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_dx9_media_sharing.h ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_DX9_MEDIA_SHARING_H_
18
+ #define OPENCL_CL_DX9_MEDIA_SHARING_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #if defined(_WIN32)
25
+ #if defined(_MSC_VER)
26
+ #if _MSC_VER >=1500
27
+ #pragma warning( push )
28
+ #pragma warning( disable : 4201 )
29
+ #pragma warning( disable : 5105 )
30
+ #endif
31
+ #endif
32
+ #include <d3d9.h>
33
+ #if defined(_MSC_VER)
34
+ #if _MSC_VER >=1500
35
+ #pragma warning( pop )
36
+ #endif
37
+ #endif
38
+ #endif
39
+
40
+ #include <CL/cl.h>
41
+
42
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
43
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
44
+ #define CL_NO_EXTENSION_PROTOTYPES
45
+ #endif
46
+
47
+ /* CL_NO_EXTENSION_PROTOTYPES implies
48
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
49
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
50
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
51
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
52
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
53
+ #endif
54
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
55
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
56
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
57
+ #endif
58
+
59
+ #ifdef __cplusplus
60
+ extern "C" {
61
+ #endif
62
+
63
+ /***************************************************************
64
+ * cl_khr_dx9_media_sharing
65
+ ***************************************************************/
66
+ #define cl_khr_dx9_media_sharing 1
67
+ #define CL_KHR_DX9_MEDIA_SHARING_EXTENSION_NAME \
68
+ "cl_khr_dx9_media_sharing"
69
+
70
+
71
+ #define CL_KHR_DX9_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
72
+
73
+ typedef cl_uint cl_dx9_media_adapter_type_khr;
74
+ typedef cl_uint cl_dx9_media_adapter_set_khr;
75
+
76
+ #if defined(_WIN32)
77
+ typedef struct _cl_dx9_surface_info_khr {
78
+ IDirect3DSurface9* resource;
79
+ HANDLE shared_handle;
80
+ } cl_dx9_surface_info_khr;
81
+
82
+ #endif /* defined(_WIN32) */
83
+
84
+ /* Error codes */
85
+ #define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
86
+ #define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
87
+ #define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
88
+ #define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
89
+
90
+ /* cl_media_adapter_type_khr */
91
+ #define CL_ADAPTER_D3D9_KHR 0x2020
92
+ #define CL_ADAPTER_D3D9EX_KHR 0x2021
93
+ #define CL_ADAPTER_DXVA_KHR 0x2022
94
+
95
+ /* cl_media_adapter_set_khr */
96
+ #define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
97
+ #define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
98
+
99
+ /* cl_context_info */
100
+ #define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
101
+ #define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
102
+ #define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
103
+
104
+ /* cl_mem_info */
105
+ #define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
106
+ #define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
107
+
108
+ /* cl_image_info */
109
+ #define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
110
+
111
+ /* cl_command_type */
112
+ #define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
113
+ #define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
114
+
115
+
116
+ typedef cl_int CL_API_CALL
117
+ clGetDeviceIDsFromDX9MediaAdapterKHR_t(
118
+ cl_platform_id platform,
119
+ cl_uint num_media_adapters,
120
+ cl_dx9_media_adapter_type_khr* media_adapter_type,
121
+ void* media_adapters,
122
+ cl_dx9_media_adapter_set_khr media_adapter_set,
123
+ cl_uint num_entries,
124
+ cl_device_id* devices,
125
+ cl_uint* num_devices);
126
+
127
+ typedef clGetDeviceIDsFromDX9MediaAdapterKHR_t *
128
+ clGetDeviceIDsFromDX9MediaAdapterKHR_fn CL_API_SUFFIX__VERSION_1_2;
129
+
130
+ typedef cl_mem CL_API_CALL
131
+ clCreateFromDX9MediaSurfaceKHR_t(
132
+ cl_context context,
133
+ cl_mem_flags flags,
134
+ cl_dx9_media_adapter_type_khr adapter_type,
135
+ void* surface_info,
136
+ cl_uint plane,
137
+ cl_int* errcode_ret);
138
+
139
+ typedef clCreateFromDX9MediaSurfaceKHR_t *
140
+ clCreateFromDX9MediaSurfaceKHR_fn CL_API_SUFFIX__VERSION_1_2;
141
+
142
+ typedef cl_int CL_API_CALL
143
+ clEnqueueAcquireDX9MediaSurfacesKHR_t(
144
+ cl_command_queue command_queue,
145
+ cl_uint num_objects,
146
+ const cl_mem* mem_objects,
147
+ cl_uint num_events_in_wait_list,
148
+ const cl_event* event_wait_list,
149
+ cl_event* event);
150
+
151
+ typedef clEnqueueAcquireDX9MediaSurfacesKHR_t *
152
+ clEnqueueAcquireDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2;
153
+
154
+ typedef cl_int CL_API_CALL
155
+ clEnqueueReleaseDX9MediaSurfacesKHR_t(
156
+ cl_command_queue command_queue,
157
+ cl_uint num_objects,
158
+ const cl_mem* mem_objects,
159
+ cl_uint num_events_in_wait_list,
160
+ const cl_event* event_wait_list,
161
+ cl_event* event);
162
+
163
+ typedef clEnqueueReleaseDX9MediaSurfacesKHR_t *
164
+ clEnqueueReleaseDX9MediaSurfacesKHR_fn CL_API_SUFFIX__VERSION_1_2;
165
+
166
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
167
+
168
+ extern CL_API_ENTRY cl_int CL_API_CALL
169
+ clGetDeviceIDsFromDX9MediaAdapterKHR(
170
+ cl_platform_id platform,
171
+ cl_uint num_media_adapters,
172
+ cl_dx9_media_adapter_type_khr* media_adapter_type,
173
+ void* media_adapters,
174
+ cl_dx9_media_adapter_set_khr media_adapter_set,
175
+ cl_uint num_entries,
176
+ cl_device_id* devices,
177
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
178
+
179
+ extern CL_API_ENTRY cl_mem CL_API_CALL
180
+ clCreateFromDX9MediaSurfaceKHR(
181
+ cl_context context,
182
+ cl_mem_flags flags,
183
+ cl_dx9_media_adapter_type_khr adapter_type,
184
+ void* surface_info,
185
+ cl_uint plane,
186
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
187
+
188
+ extern CL_API_ENTRY cl_int CL_API_CALL
189
+ clEnqueueAcquireDX9MediaSurfacesKHR(
190
+ cl_command_queue command_queue,
191
+ cl_uint num_objects,
192
+ const cl_mem* mem_objects,
193
+ cl_uint num_events_in_wait_list,
194
+ const cl_event* event_wait_list,
195
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
196
+
197
+ extern CL_API_ENTRY cl_int CL_API_CALL
198
+ clEnqueueReleaseDX9MediaSurfacesKHR(
199
+ cl_command_queue command_queue,
200
+ cl_uint num_objects,
201
+ const cl_mem* mem_objects,
202
+ cl_uint num_events_in_wait_list,
203
+ const cl_event* event_wait_list,
204
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
205
+
206
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
207
+
208
+ /***************************************************************
209
+ * cl_intel_dx9_media_sharing
210
+ ***************************************************************/
211
+ #define cl_intel_dx9_media_sharing 1
212
+ #define CL_INTEL_DX9_MEDIA_SHARING_EXTENSION_NAME \
213
+ "cl_intel_dx9_media_sharing"
214
+
215
+
216
+ #define CL_INTEL_DX9_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
217
+
218
+ typedef cl_uint cl_dx9_device_source_intel;
219
+ typedef cl_uint cl_dx9_device_set_intel;
220
+
221
+ /* Error codes */
222
+ #define CL_INVALID_DX9_DEVICE_INTEL -1010
223
+ #define CL_INVALID_DX9_RESOURCE_INTEL -1011
224
+ #define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
225
+ #define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
226
+
227
+ /* cl_dx9_device_source_intel */
228
+ #define CL_D3D9_DEVICE_INTEL 0x4022
229
+ #define CL_D3D9EX_DEVICE_INTEL 0x4070
230
+ #define CL_DXVA_DEVICE_INTEL 0x4071
231
+
232
+ /* cl_dx9_device_set_intel */
233
+ #define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
234
+ #define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
235
+
236
+ /* cl_context_info */
237
+ #define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
238
+ #define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
239
+ #define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
240
+
241
+ /* cl_mem_info */
242
+ #define CL_MEM_DX9_RESOURCE_INTEL 0x4027
243
+ #define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
244
+
245
+ /* cl_image_info */
246
+ #define CL_IMAGE_DX9_PLANE_INTEL 0x4075
247
+
248
+ /* cl_command_type */
249
+ #define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
250
+ #define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
251
+
252
+
253
+ typedef cl_int CL_API_CALL
254
+ clGetDeviceIDsFromDX9INTEL_t(
255
+ cl_platform_id platform,
256
+ cl_dx9_device_source_intel dx9_device_source,
257
+ void* dx9_object,
258
+ cl_dx9_device_set_intel dx9_device_set,
259
+ cl_uint num_entries,
260
+ cl_device_id* devices,
261
+ cl_uint* num_devices);
262
+
263
+ typedef clGetDeviceIDsFromDX9INTEL_t *
264
+ clGetDeviceIDsFromDX9INTEL_fn CL_API_SUFFIX__VERSION_1_1;
265
+
266
+ typedef cl_mem CL_API_CALL
267
+ clCreateFromDX9MediaSurfaceINTEL_t(
268
+ cl_context context,
269
+ cl_mem_flags flags,
270
+ IDirect3DSurface9* resource,
271
+ HANDLE sharedHandle,
272
+ UINT plane,
273
+ cl_int* errcode_ret);
274
+
275
+ typedef clCreateFromDX9MediaSurfaceINTEL_t *
276
+ clCreateFromDX9MediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_1;
277
+
278
+ typedef cl_int CL_API_CALL
279
+ clEnqueueAcquireDX9ObjectsINTEL_t(
280
+ cl_command_queue command_queue,
281
+ cl_uint num_objects,
282
+ const cl_mem* mem_objects,
283
+ cl_uint num_events_in_wait_list,
284
+ const cl_event* event_wait_list,
285
+ cl_event* event);
286
+
287
+ typedef clEnqueueAcquireDX9ObjectsINTEL_t *
288
+ clEnqueueAcquireDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1;
289
+
290
+ typedef cl_int CL_API_CALL
291
+ clEnqueueReleaseDX9ObjectsINTEL_t(
292
+ cl_command_queue command_queue,
293
+ cl_uint num_objects,
294
+ cl_mem* mem_objects,
295
+ cl_uint num_events_in_wait_list,
296
+ const cl_event* event_wait_list,
297
+ cl_event* event);
298
+
299
+ typedef clEnqueueReleaseDX9ObjectsINTEL_t *
300
+ clEnqueueReleaseDX9ObjectsINTEL_fn CL_API_SUFFIX__VERSION_1_1;
301
+
302
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
303
+
304
+ extern CL_API_ENTRY cl_int CL_API_CALL
305
+ clGetDeviceIDsFromDX9INTEL(
306
+ cl_platform_id platform,
307
+ cl_dx9_device_source_intel dx9_device_source,
308
+ void* dx9_object,
309
+ cl_dx9_device_set_intel dx9_device_set,
310
+ cl_uint num_entries,
311
+ cl_device_id* devices,
312
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_1;
313
+
314
+ extern CL_API_ENTRY cl_mem CL_API_CALL
315
+ clCreateFromDX9MediaSurfaceINTEL(
316
+ cl_context context,
317
+ cl_mem_flags flags,
318
+ IDirect3DSurface9* resource,
319
+ HANDLE sharedHandle,
320
+ UINT plane,
321
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
322
+
323
+ extern CL_API_ENTRY cl_int CL_API_CALL
324
+ clEnqueueAcquireDX9ObjectsINTEL(
325
+ cl_command_queue command_queue,
326
+ cl_uint num_objects,
327
+ const cl_mem* mem_objects,
328
+ cl_uint num_events_in_wait_list,
329
+ const cl_event* event_wait_list,
330
+ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
331
+
332
+ extern CL_API_ENTRY cl_int CL_API_CALL
333
+ clEnqueueReleaseDX9ObjectsINTEL(
334
+ cl_command_queue command_queue,
335
+ cl_uint num_objects,
336
+ cl_mem* mem_objects,
337
+ cl_uint num_events_in_wait_list,
338
+ const cl_event* event_wait_list,
339
+ cl_event* event) CL_API_SUFFIX__VERSION_1_1;
340
+
341
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
342
+
343
+ /***************************************************************
344
+ * cl_intel_sharing_format_query_dx9
345
+ ***************************************************************/
346
+ #define cl_intel_sharing_format_query_dx9 1
347
+ #define CL_INTEL_SHARING_FORMAT_QUERY_DX9_EXTENSION_NAME \
348
+ "cl_intel_sharing_format_query_dx9"
349
+
350
+
351
+ #define CL_INTEL_SHARING_FORMAT_QUERY_DX9_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
352
+
353
+ /* when cl_khr_dx9_media_sharing or cl_intel_dx9_media_sharing is supported */
354
+
355
+ typedef cl_int CL_API_CALL
356
+ clGetSupportedDX9MediaSurfaceFormatsINTEL_t(
357
+ cl_context context,
358
+ cl_mem_flags flags,
359
+ cl_mem_object_type image_type,
360
+ cl_uint plane,
361
+ cl_uint num_entries,
362
+ D3DFORMAT* dx9_formats,
363
+ cl_uint* num_surface_formats);
364
+
365
+ typedef clGetSupportedDX9MediaSurfaceFormatsINTEL_t *
366
+ clGetSupportedDX9MediaSurfaceFormatsINTEL_fn ;
367
+
368
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
369
+
370
+ extern CL_API_ENTRY cl_int CL_API_CALL
371
+ clGetSupportedDX9MediaSurfaceFormatsINTEL(
372
+ cl_context context,
373
+ cl_mem_flags flags,
374
+ cl_mem_object_type image_type,
375
+ cl_uint plane,
376
+ cl_uint num_entries,
377
+ D3DFORMAT* dx9_formats,
378
+ cl_uint* num_surface_formats) ;
379
+
380
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
381
+
382
+ #ifdef __cplusplus
383
+ }
384
+ #endif
385
+
386
+ #endif /* OPENCL_CL_DX9_MEDIA_SHARING_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_dx9_media_sharing_intel.h ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #include <CL/cl_dx9_media_sharing.h>
18
+ #pragma message("The Intel DX9 media sharing extensions have been moved into cl_dx9_media_sharing.h. Please include cl_dx9_media_sharing.h directly.")
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_egl.h ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_EGL_H_
18
+ #define OPENCL_CL_EGL_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #include <CL/cl.h>
25
+
26
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
27
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
28
+ #define CL_NO_EXTENSION_PROTOTYPES
29
+ #endif
30
+
31
+ /* CL_NO_EXTENSION_PROTOTYPES implies
32
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
33
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
34
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
35
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
36
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
37
+ #endif
38
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
39
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
40
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
41
+ #endif
42
+
43
+ #ifdef __cplusplus
44
+ extern "C" {
45
+ #endif
46
+
47
+ /***************************************************************
48
+ * cl_khr_egl_image
49
+ ***************************************************************/
50
+ #define cl_khr_egl_image 1
51
+ #define CL_KHR_EGL_IMAGE_EXTENSION_NAME \
52
+ "cl_khr_egl_image"
53
+
54
+
55
+ #define CL_KHR_EGL_IMAGE_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
56
+
57
+ /* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
58
+ #define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
59
+ #define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
60
+ #define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
61
+
62
+ /* Error type for clCreateFromEGLImageKHR */
63
+ #define CL_INVALID_EGL_OBJECT_KHR -1093
64
+ #define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
65
+
66
+ /* CLeglImageKHR is an opaque handle to an EGLImage */
67
+ typedef void* CLeglImageKHR;
68
+
69
+ /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
70
+ typedef void* CLeglDisplayKHR;
71
+
72
+ /* properties passed to clCreateFromEGLImageKHR */
73
+ typedef intptr_t cl_egl_image_properties_khr;
74
+
75
+
76
+ typedef cl_mem CL_API_CALL
77
+ clCreateFromEGLImageKHR_t(
78
+ cl_context context,
79
+ CLeglDisplayKHR egldisplay,
80
+ CLeglImageKHR eglimage,
81
+ cl_mem_flags flags,
82
+ const cl_egl_image_properties_khr* properties,
83
+ cl_int* errcode_ret);
84
+
85
+ typedef clCreateFromEGLImageKHR_t *
86
+ clCreateFromEGLImageKHR_fn CL_API_SUFFIX__VERSION_1_0;
87
+
88
+ typedef cl_int CL_API_CALL
89
+ clEnqueueAcquireEGLObjectsKHR_t(
90
+ cl_command_queue command_queue,
91
+ cl_uint num_objects,
92
+ const cl_mem* mem_objects,
93
+ cl_uint num_events_in_wait_list,
94
+ const cl_event* event_wait_list,
95
+ cl_event* event);
96
+
97
+ typedef clEnqueueAcquireEGLObjectsKHR_t *
98
+ clEnqueueAcquireEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
99
+
100
+ typedef cl_int CL_API_CALL
101
+ clEnqueueReleaseEGLObjectsKHR_t(
102
+ cl_command_queue command_queue,
103
+ cl_uint num_objects,
104
+ const cl_mem* mem_objects,
105
+ cl_uint num_events_in_wait_list,
106
+ const cl_event* event_wait_list,
107
+ cl_event* event);
108
+
109
+ typedef clEnqueueReleaseEGLObjectsKHR_t *
110
+ clEnqueueReleaseEGLObjectsKHR_fn CL_API_SUFFIX__VERSION_1_0;
111
+
112
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
113
+
114
+ extern CL_API_ENTRY cl_mem CL_API_CALL
115
+ clCreateFromEGLImageKHR(
116
+ cl_context context,
117
+ CLeglDisplayKHR egldisplay,
118
+ CLeglImageKHR eglimage,
119
+ cl_mem_flags flags,
120
+ const cl_egl_image_properties_khr* properties,
121
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
122
+
123
+ extern CL_API_ENTRY cl_int CL_API_CALL
124
+ clEnqueueAcquireEGLObjectsKHR(
125
+ cl_command_queue command_queue,
126
+ cl_uint num_objects,
127
+ const cl_mem* mem_objects,
128
+ cl_uint num_events_in_wait_list,
129
+ const cl_event* event_wait_list,
130
+ cl_event* event) CL_API_SUFFIX__VERSION_1_0;
131
+
132
+ extern CL_API_ENTRY cl_int CL_API_CALL
133
+ clEnqueueReleaseEGLObjectsKHR(
134
+ cl_command_queue command_queue,
135
+ cl_uint num_objects,
136
+ const cl_mem* mem_objects,
137
+ cl_uint num_events_in_wait_list,
138
+ const cl_event* event_wait_list,
139
+ cl_event* event) CL_API_SUFFIX__VERSION_1_0;
140
+
141
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
142
+
143
+ /***************************************************************
144
+ * cl_khr_egl_event
145
+ ***************************************************************/
146
+ #define cl_khr_egl_event 1
147
+ #define CL_KHR_EGL_EVENT_EXTENSION_NAME \
148
+ "cl_khr_egl_event"
149
+
150
+
151
+ #define CL_KHR_EGL_EVENT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
152
+
153
+ /* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
154
+ /* type CLeglDisplayKHR */
155
+
156
+ /* CLeglSyncKHR is an opaque handle to an EGLSync object */
157
+ typedef void* CLeglSyncKHR;
158
+
159
+
160
+ typedef cl_event CL_API_CALL
161
+ clCreateEventFromEGLSyncKHR_t(
162
+ cl_context context,
163
+ CLeglSyncKHR sync,
164
+ CLeglDisplayKHR display,
165
+ cl_int* errcode_ret);
166
+
167
+ typedef clCreateEventFromEGLSyncKHR_t *
168
+ clCreateEventFromEGLSyncKHR_fn CL_API_SUFFIX__VERSION_1_0;
169
+
170
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
171
+
172
+ extern CL_API_ENTRY cl_event CL_API_CALL
173
+ clCreateEventFromEGLSyncKHR(
174
+ cl_context context,
175
+ CLeglSyncKHR sync,
176
+ CLeglDisplayKHR display,
177
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
178
+
179
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
180
+
181
+ #ifdef __cplusplus
182
+ }
183
+ #endif
184
+
185
+ #endif /* OPENCL_CL_EGL_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_ext.h ADDED
The diff for this file is too large to render. See raw diff
 
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_ext_intel.h ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ ******************************************************************************/
17
+
18
+ #include <CL/cl_ext.h>
19
+ #pragma message("The Intel extensions have been moved into cl_ext.h. Please include cl_ext.h directly.")
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_function_types.h ADDED
@@ -0,0 +1,1184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Copyright (c) 2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ * OpenCL is a trademark of Apple Inc. used under license by Khronos.
17
+ */
18
+
19
+ #ifndef OPENCL_CL_FUNCTION_TYPES_H_
20
+ #define OPENCL_CL_FUNCTION_TYPES_H_
21
+
22
+ #include <CL/cl.h>
23
+
24
+ typedef cl_int CL_API_CALL clGetPlatformIDs_t(
25
+ cl_uint num_entries,
26
+ cl_platform_id* platforms,
27
+ cl_uint* num_platforms);
28
+
29
+ typedef clGetPlatformIDs_t *
30
+ clGetPlatformIDs_fn CL_API_SUFFIX__VERSION_1_0;
31
+
32
+ typedef cl_int CL_API_CALL clGetPlatformInfo_t(
33
+ cl_platform_id platform,
34
+ cl_platform_info param_name,
35
+ size_t param_value_size,
36
+ void* param_value,
37
+ size_t* param_value_size_ret);
38
+
39
+ typedef clGetPlatformInfo_t *
40
+ clGetPlatformInfo_fn CL_API_SUFFIX__VERSION_1_0;
41
+
42
+ typedef cl_int CL_API_CALL clGetDeviceIDs_t(
43
+ cl_platform_id platform,
44
+ cl_device_type device_type,
45
+ cl_uint num_entries,
46
+ cl_device_id* devices,
47
+ cl_uint* num_devices);
48
+
49
+ typedef clGetDeviceIDs_t *
50
+ clGetDeviceIDs_fn CL_API_SUFFIX__VERSION_1_0;
51
+
52
+ typedef cl_int CL_API_CALL clGetDeviceInfo_t(
53
+ cl_device_id device,
54
+ cl_device_info param_name,
55
+ size_t param_value_size,
56
+ void* param_value,
57
+ size_t* param_value_size_ret);
58
+
59
+ typedef clGetDeviceInfo_t *
60
+ clGetDeviceInfo_fn CL_API_SUFFIX__VERSION_1_0;
61
+
62
+ typedef cl_context CL_API_CALL clCreateContext_t(
63
+ const cl_context_properties* properties,
64
+ cl_uint num_devices,
65
+ const cl_device_id* devices,
66
+ void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data),
67
+ void* user_data,
68
+ cl_int* errcode_ret);
69
+
70
+ typedef clCreateContext_t *
71
+ clCreateContext_fn CL_API_SUFFIX__VERSION_1_0;
72
+
73
+ typedef cl_context CL_API_CALL clCreateContextFromType_t(
74
+ const cl_context_properties* properties,
75
+ cl_device_type device_type,
76
+ void (CL_CALLBACK* pfn_notify)(const char* errinfo, const void* private_info, size_t cb, void* user_data),
77
+ void* user_data,
78
+ cl_int* errcode_ret);
79
+
80
+ typedef clCreateContextFromType_t *
81
+ clCreateContextFromType_fn CL_API_SUFFIX__VERSION_1_0;
82
+
83
+ typedef cl_int CL_API_CALL clRetainContext_t(
84
+ cl_context context);
85
+
86
+ typedef clRetainContext_t *
87
+ clRetainContext_fn CL_API_SUFFIX__VERSION_1_0;
88
+
89
+ typedef cl_int CL_API_CALL clReleaseContext_t(
90
+ cl_context context);
91
+
92
+ typedef clReleaseContext_t *
93
+ clReleaseContext_fn CL_API_SUFFIX__VERSION_1_0;
94
+
95
+ typedef cl_int CL_API_CALL clGetContextInfo_t(
96
+ cl_context context,
97
+ cl_context_info param_name,
98
+ size_t param_value_size,
99
+ void* param_value,
100
+ size_t* param_value_size_ret);
101
+
102
+ typedef clGetContextInfo_t *
103
+ clGetContextInfo_fn CL_API_SUFFIX__VERSION_1_0;
104
+
105
+ typedef cl_int CL_API_CALL clRetainCommandQueue_t(
106
+ cl_command_queue command_queue);
107
+
108
+ typedef clRetainCommandQueue_t *
109
+ clRetainCommandQueue_fn CL_API_SUFFIX__VERSION_1_0;
110
+
111
+ typedef cl_int CL_API_CALL clReleaseCommandQueue_t(
112
+ cl_command_queue command_queue);
113
+
114
+ typedef clReleaseCommandQueue_t *
115
+ clReleaseCommandQueue_fn CL_API_SUFFIX__VERSION_1_0;
116
+
117
+ typedef cl_int CL_API_CALL clGetCommandQueueInfo_t(
118
+ cl_command_queue command_queue,
119
+ cl_command_queue_info param_name,
120
+ size_t param_value_size,
121
+ void* param_value,
122
+ size_t* param_value_size_ret);
123
+
124
+ typedef clGetCommandQueueInfo_t *
125
+ clGetCommandQueueInfo_fn CL_API_SUFFIX__VERSION_1_0;
126
+
127
+ typedef cl_mem CL_API_CALL clCreateBuffer_t(
128
+ cl_context context,
129
+ cl_mem_flags flags,
130
+ size_t size,
131
+ void* host_ptr,
132
+ cl_int* errcode_ret);
133
+
134
+ typedef clCreateBuffer_t *
135
+ clCreateBuffer_fn CL_API_SUFFIX__VERSION_1_0;
136
+
137
+ typedef cl_int CL_API_CALL clRetainMemObject_t(
138
+ cl_mem memobj);
139
+
140
+ typedef clRetainMemObject_t *
141
+ clRetainMemObject_fn CL_API_SUFFIX__VERSION_1_0;
142
+
143
+ typedef cl_int CL_API_CALL clReleaseMemObject_t(
144
+ cl_mem memobj);
145
+
146
+ typedef clReleaseMemObject_t *
147
+ clReleaseMemObject_fn CL_API_SUFFIX__VERSION_1_0;
148
+
149
+ typedef cl_int CL_API_CALL clGetSupportedImageFormats_t(
150
+ cl_context context,
151
+ cl_mem_flags flags,
152
+ cl_mem_object_type image_type,
153
+ cl_uint num_entries,
154
+ cl_image_format* image_formats,
155
+ cl_uint* num_image_formats);
156
+
157
+ typedef clGetSupportedImageFormats_t *
158
+ clGetSupportedImageFormats_fn CL_API_SUFFIX__VERSION_1_0;
159
+
160
+ typedef cl_int CL_API_CALL clGetMemObjectInfo_t(
161
+ cl_mem memobj,
162
+ cl_mem_info param_name,
163
+ size_t param_value_size,
164
+ void* param_value,
165
+ size_t* param_value_size_ret);
166
+
167
+ typedef clGetMemObjectInfo_t *
168
+ clGetMemObjectInfo_fn CL_API_SUFFIX__VERSION_1_0;
169
+
170
+ typedef cl_int CL_API_CALL clGetImageInfo_t(
171
+ cl_mem image,
172
+ cl_image_info param_name,
173
+ size_t param_value_size,
174
+ void* param_value,
175
+ size_t* param_value_size_ret);
176
+
177
+ typedef clGetImageInfo_t *
178
+ clGetImageInfo_fn CL_API_SUFFIX__VERSION_1_0;
179
+
180
+ typedef cl_int CL_API_CALL clRetainSampler_t(
181
+ cl_sampler sampler);
182
+
183
+ typedef clRetainSampler_t *
184
+ clRetainSampler_fn CL_API_SUFFIX__VERSION_1_0;
185
+
186
+ typedef cl_int CL_API_CALL clReleaseSampler_t(
187
+ cl_sampler sampler);
188
+
189
+ typedef clReleaseSampler_t *
190
+ clReleaseSampler_fn CL_API_SUFFIX__VERSION_1_0;
191
+
192
+ typedef cl_int CL_API_CALL clGetSamplerInfo_t(
193
+ cl_sampler sampler,
194
+ cl_sampler_info param_name,
195
+ size_t param_value_size,
196
+ void* param_value,
197
+ size_t* param_value_size_ret);
198
+
199
+ typedef clGetSamplerInfo_t *
200
+ clGetSamplerInfo_fn CL_API_SUFFIX__VERSION_1_0;
201
+
202
+ typedef cl_program CL_API_CALL clCreateProgramWithSource_t(
203
+ cl_context context,
204
+ cl_uint count,
205
+ const char** strings,
206
+ const size_t* lengths,
207
+ cl_int* errcode_ret);
208
+
209
+ typedef clCreateProgramWithSource_t *
210
+ clCreateProgramWithSource_fn CL_API_SUFFIX__VERSION_1_0;
211
+
212
+ typedef cl_program CL_API_CALL clCreateProgramWithBinary_t(
213
+ cl_context context,
214
+ cl_uint num_devices,
215
+ const cl_device_id* device_list,
216
+ const size_t* lengths,
217
+ const unsigned char** binaries,
218
+ cl_int* binary_status,
219
+ cl_int* errcode_ret);
220
+
221
+ typedef clCreateProgramWithBinary_t *
222
+ clCreateProgramWithBinary_fn CL_API_SUFFIX__VERSION_1_0;
223
+
224
+ typedef cl_int CL_API_CALL clRetainProgram_t(
225
+ cl_program program);
226
+
227
+ typedef clRetainProgram_t *
228
+ clRetainProgram_fn CL_API_SUFFIX__VERSION_1_0;
229
+
230
+ typedef cl_int CL_API_CALL clReleaseProgram_t(
231
+ cl_program program);
232
+
233
+ typedef clReleaseProgram_t *
234
+ clReleaseProgram_fn CL_API_SUFFIX__VERSION_1_0;
235
+
236
+ typedef cl_int CL_API_CALL clBuildProgram_t(
237
+ cl_program program,
238
+ cl_uint num_devices,
239
+ const cl_device_id* device_list,
240
+ const char* options,
241
+ void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data),
242
+ void* user_data);
243
+
244
+ typedef clBuildProgram_t *
245
+ clBuildProgram_fn CL_API_SUFFIX__VERSION_1_0;
246
+
247
+ typedef cl_int CL_API_CALL clGetProgramInfo_t(
248
+ cl_program program,
249
+ cl_program_info param_name,
250
+ size_t param_value_size,
251
+ void* param_value,
252
+ size_t* param_value_size_ret);
253
+
254
+ typedef clGetProgramInfo_t *
255
+ clGetProgramInfo_fn CL_API_SUFFIX__VERSION_1_0;
256
+
257
+ typedef cl_int CL_API_CALL clGetProgramBuildInfo_t(
258
+ cl_program program,
259
+ cl_device_id device,
260
+ cl_program_build_info param_name,
261
+ size_t param_value_size,
262
+ void* param_value,
263
+ size_t* param_value_size_ret);
264
+
265
+ typedef clGetProgramBuildInfo_t *
266
+ clGetProgramBuildInfo_fn CL_API_SUFFIX__VERSION_1_0;
267
+
268
+ typedef cl_kernel CL_API_CALL clCreateKernel_t(
269
+ cl_program program,
270
+ const char* kernel_name,
271
+ cl_int* errcode_ret);
272
+
273
+ typedef clCreateKernel_t *
274
+ clCreateKernel_fn CL_API_SUFFIX__VERSION_1_0;
275
+
276
+ typedef cl_int CL_API_CALL clCreateKernelsInProgram_t(
277
+ cl_program program,
278
+ cl_uint num_kernels,
279
+ cl_kernel* kernels,
280
+ cl_uint* num_kernels_ret);
281
+
282
+ typedef clCreateKernelsInProgram_t *
283
+ clCreateKernelsInProgram_fn CL_API_SUFFIX__VERSION_1_0;
284
+
285
+ typedef cl_int CL_API_CALL clRetainKernel_t(
286
+ cl_kernel kernel);
287
+
288
+ typedef clRetainKernel_t *
289
+ clRetainKernel_fn CL_API_SUFFIX__VERSION_1_0;
290
+
291
+ typedef cl_int CL_API_CALL clReleaseKernel_t(
292
+ cl_kernel kernel);
293
+
294
+ typedef clReleaseKernel_t *
295
+ clReleaseKernel_fn CL_API_SUFFIX__VERSION_1_0;
296
+
297
+ typedef cl_int CL_API_CALL clSetKernelArg_t(
298
+ cl_kernel kernel,
299
+ cl_uint arg_index,
300
+ size_t arg_size,
301
+ const void* arg_value);
302
+
303
+ typedef clSetKernelArg_t *
304
+ clSetKernelArg_fn CL_API_SUFFIX__VERSION_1_0;
305
+
306
+ typedef cl_int CL_API_CALL clGetKernelInfo_t(
307
+ cl_kernel kernel,
308
+ cl_kernel_info param_name,
309
+ size_t param_value_size,
310
+ void* param_value,
311
+ size_t* param_value_size_ret);
312
+
313
+ typedef clGetKernelInfo_t *
314
+ clGetKernelInfo_fn CL_API_SUFFIX__VERSION_1_0;
315
+
316
+ typedef cl_int CL_API_CALL clGetKernelWorkGroupInfo_t(
317
+ cl_kernel kernel,
318
+ cl_device_id device,
319
+ cl_kernel_work_group_info param_name,
320
+ size_t param_value_size,
321
+ void* param_value,
322
+ size_t* param_value_size_ret);
323
+
324
+ typedef clGetKernelWorkGroupInfo_t *
325
+ clGetKernelWorkGroupInfo_fn CL_API_SUFFIX__VERSION_1_0;
326
+
327
+ typedef cl_int CL_API_CALL clWaitForEvents_t(
328
+ cl_uint num_events,
329
+ const cl_event* event_list);
330
+
331
+ typedef clWaitForEvents_t *
332
+ clWaitForEvents_fn CL_API_SUFFIX__VERSION_1_0;
333
+
334
+ typedef cl_int CL_API_CALL clGetEventInfo_t(
335
+ cl_event event,
336
+ cl_event_info param_name,
337
+ size_t param_value_size,
338
+ void* param_value,
339
+ size_t* param_value_size_ret);
340
+
341
+ typedef clGetEventInfo_t *
342
+ clGetEventInfo_fn CL_API_SUFFIX__VERSION_1_0;
343
+
344
+ typedef cl_int CL_API_CALL clRetainEvent_t(
345
+ cl_event event);
346
+
347
+ typedef clRetainEvent_t *
348
+ clRetainEvent_fn CL_API_SUFFIX__VERSION_1_0;
349
+
350
+ typedef cl_int CL_API_CALL clReleaseEvent_t(
351
+ cl_event event);
352
+
353
+ typedef clReleaseEvent_t *
354
+ clReleaseEvent_fn CL_API_SUFFIX__VERSION_1_0;
355
+
356
+ typedef cl_int CL_API_CALL clGetEventProfilingInfo_t(
357
+ cl_event event,
358
+ cl_profiling_info param_name,
359
+ size_t param_value_size,
360
+ void* param_value,
361
+ size_t* param_value_size_ret);
362
+
363
+ typedef clGetEventProfilingInfo_t *
364
+ clGetEventProfilingInfo_fn CL_API_SUFFIX__VERSION_1_0;
365
+
366
+ typedef cl_int CL_API_CALL clFlush_t(
367
+ cl_command_queue command_queue);
368
+
369
+ typedef clFlush_t *
370
+ clFlush_fn CL_API_SUFFIX__VERSION_1_0;
371
+
372
+ typedef cl_int CL_API_CALL clFinish_t(
373
+ cl_command_queue command_queue);
374
+
375
+ typedef clFinish_t *
376
+ clFinish_fn CL_API_SUFFIX__VERSION_1_0;
377
+
378
+ typedef cl_int CL_API_CALL clEnqueueReadBuffer_t(
379
+ cl_command_queue command_queue,
380
+ cl_mem buffer,
381
+ cl_bool blocking_read,
382
+ size_t offset,
383
+ size_t size,
384
+ void* ptr,
385
+ cl_uint num_events_in_wait_list,
386
+ const cl_event* event_wait_list,
387
+ cl_event* event);
388
+
389
+ typedef clEnqueueReadBuffer_t *
390
+ clEnqueueReadBuffer_fn CL_API_SUFFIX__VERSION_1_0;
391
+
392
+ typedef cl_int CL_API_CALL clEnqueueWriteBuffer_t(
393
+ cl_command_queue command_queue,
394
+ cl_mem buffer,
395
+ cl_bool blocking_write,
396
+ size_t offset,
397
+ size_t size,
398
+ const void* ptr,
399
+ cl_uint num_events_in_wait_list,
400
+ const cl_event* event_wait_list,
401
+ cl_event* event);
402
+
403
+ typedef clEnqueueWriteBuffer_t *
404
+ clEnqueueWriteBuffer_fn CL_API_SUFFIX__VERSION_1_0;
405
+
406
+ typedef cl_int CL_API_CALL clEnqueueCopyBuffer_t(
407
+ cl_command_queue command_queue,
408
+ cl_mem src_buffer,
409
+ cl_mem dst_buffer,
410
+ size_t src_offset,
411
+ size_t dst_offset,
412
+ size_t size,
413
+ cl_uint num_events_in_wait_list,
414
+ const cl_event* event_wait_list,
415
+ cl_event* event);
416
+
417
+ typedef clEnqueueCopyBuffer_t *
418
+ clEnqueueCopyBuffer_fn CL_API_SUFFIX__VERSION_1_0;
419
+
420
+ typedef cl_int CL_API_CALL clEnqueueReadImage_t(
421
+ cl_command_queue command_queue,
422
+ cl_mem image,
423
+ cl_bool blocking_read,
424
+ const size_t* origin,
425
+ const size_t* region,
426
+ size_t row_pitch,
427
+ size_t slice_pitch,
428
+ void* ptr,
429
+ cl_uint num_events_in_wait_list,
430
+ const cl_event* event_wait_list,
431
+ cl_event* event);
432
+
433
+ typedef clEnqueueReadImage_t *
434
+ clEnqueueReadImage_fn CL_API_SUFFIX__VERSION_1_0;
435
+
436
+ typedef cl_int CL_API_CALL clEnqueueWriteImage_t(
437
+ cl_command_queue command_queue,
438
+ cl_mem image,
439
+ cl_bool blocking_write,
440
+ const size_t* origin,
441
+ const size_t* region,
442
+ size_t input_row_pitch,
443
+ size_t input_slice_pitch,
444
+ const void* ptr,
445
+ cl_uint num_events_in_wait_list,
446
+ const cl_event* event_wait_list,
447
+ cl_event* event);
448
+
449
+ typedef clEnqueueWriteImage_t *
450
+ clEnqueueWriteImage_fn CL_API_SUFFIX__VERSION_1_0;
451
+
452
+ typedef cl_int CL_API_CALL clEnqueueCopyImage_t(
453
+ cl_command_queue command_queue,
454
+ cl_mem src_image,
455
+ cl_mem dst_image,
456
+ const size_t* src_origin,
457
+ const size_t* dst_origin,
458
+ const size_t* region,
459
+ cl_uint num_events_in_wait_list,
460
+ const cl_event* event_wait_list,
461
+ cl_event* event);
462
+
463
+ typedef clEnqueueCopyImage_t *
464
+ clEnqueueCopyImage_fn CL_API_SUFFIX__VERSION_1_0;
465
+
466
+ typedef cl_int CL_API_CALL clEnqueueCopyImageToBuffer_t(
467
+ cl_command_queue command_queue,
468
+ cl_mem src_image,
469
+ cl_mem dst_buffer,
470
+ const size_t* src_origin,
471
+ const size_t* region,
472
+ size_t dst_offset,
473
+ cl_uint num_events_in_wait_list,
474
+ const cl_event* event_wait_list,
475
+ cl_event* event);
476
+
477
+ typedef clEnqueueCopyImageToBuffer_t *
478
+ clEnqueueCopyImageToBuffer_fn CL_API_SUFFIX__VERSION_1_0;
479
+
480
+ typedef cl_int CL_API_CALL clEnqueueCopyBufferToImage_t(
481
+ cl_command_queue command_queue,
482
+ cl_mem src_buffer,
483
+ cl_mem dst_image,
484
+ size_t src_offset,
485
+ const size_t* dst_origin,
486
+ const size_t* region,
487
+ cl_uint num_events_in_wait_list,
488
+ const cl_event* event_wait_list,
489
+ cl_event* event);
490
+
491
+ typedef clEnqueueCopyBufferToImage_t *
492
+ clEnqueueCopyBufferToImage_fn CL_API_SUFFIX__VERSION_1_0;
493
+
494
+ typedef void* CL_API_CALL clEnqueueMapBuffer_t(
495
+ cl_command_queue command_queue,
496
+ cl_mem buffer,
497
+ cl_bool blocking_map,
498
+ cl_map_flags map_flags,
499
+ size_t offset,
500
+ size_t size,
501
+ cl_uint num_events_in_wait_list,
502
+ const cl_event* event_wait_list,
503
+ cl_event* event,
504
+ cl_int* errcode_ret);
505
+
506
+ typedef clEnqueueMapBuffer_t *
507
+ clEnqueueMapBuffer_fn CL_API_SUFFIX__VERSION_1_0;
508
+
509
+ typedef void* CL_API_CALL clEnqueueMapImage_t(
510
+ cl_command_queue command_queue,
511
+ cl_mem image,
512
+ cl_bool blocking_map,
513
+ cl_map_flags map_flags,
514
+ const size_t* origin,
515
+ const size_t* region,
516
+ size_t* image_row_pitch,
517
+ size_t* image_slice_pitch,
518
+ cl_uint num_events_in_wait_list,
519
+ const cl_event* event_wait_list,
520
+ cl_event* event,
521
+ cl_int* errcode_ret);
522
+
523
+ typedef clEnqueueMapImage_t *
524
+ clEnqueueMapImage_fn CL_API_SUFFIX__VERSION_1_0;
525
+
526
+ typedef cl_int CL_API_CALL clEnqueueUnmapMemObject_t(
527
+ cl_command_queue command_queue,
528
+ cl_mem memobj,
529
+ void* mapped_ptr,
530
+ cl_uint num_events_in_wait_list,
531
+ const cl_event* event_wait_list,
532
+ cl_event* event);
533
+
534
+ typedef clEnqueueUnmapMemObject_t *
535
+ clEnqueueUnmapMemObject_fn CL_API_SUFFIX__VERSION_1_0;
536
+
537
+ typedef cl_int CL_API_CALL clEnqueueNDRangeKernel_t(
538
+ cl_command_queue command_queue,
539
+ cl_kernel kernel,
540
+ cl_uint work_dim,
541
+ const size_t* global_work_offset,
542
+ const size_t* global_work_size,
543
+ const size_t* local_work_size,
544
+ cl_uint num_events_in_wait_list,
545
+ const cl_event* event_wait_list,
546
+ cl_event* event);
547
+
548
+ typedef clEnqueueNDRangeKernel_t *
549
+ clEnqueueNDRangeKernel_fn CL_API_SUFFIX__VERSION_1_0;
550
+
551
+ typedef cl_int CL_API_CALL clEnqueueNativeKernel_t(
552
+ cl_command_queue command_queue,
553
+ void (CL_CALLBACK* user_func)(void*),
554
+ void* args,
555
+ size_t cb_args,
556
+ cl_uint num_mem_objects,
557
+ const cl_mem* mem_list,
558
+ const void** args_mem_loc,
559
+ cl_uint num_events_in_wait_list,
560
+ const cl_event* event_wait_list,
561
+ cl_event* event);
562
+
563
+ typedef clEnqueueNativeKernel_t *
564
+ clEnqueueNativeKernel_fn CL_API_SUFFIX__VERSION_1_0;
565
+
566
+ typedef cl_int CL_API_CALL clSetCommandQueueProperty_t(
567
+ cl_command_queue command_queue,
568
+ cl_command_queue_properties properties,
569
+ cl_bool enable,
570
+ cl_command_queue_properties* old_properties);
571
+
572
+ typedef clSetCommandQueueProperty_t *
573
+ clSetCommandQueueProperty_fn CL_API_SUFFIX__VERSION_1_0_DEPRECATED;
574
+
575
+ typedef cl_mem CL_API_CALL clCreateImage2D_t(
576
+ cl_context context,
577
+ cl_mem_flags flags,
578
+ const cl_image_format* image_format,
579
+ size_t image_width,
580
+ size_t image_height,
581
+ size_t image_row_pitch,
582
+ void* host_ptr,
583
+ cl_int* errcode_ret);
584
+
585
+ typedef clCreateImage2D_t *
586
+ clCreateImage2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
587
+
588
+ typedef cl_mem CL_API_CALL clCreateImage3D_t(
589
+ cl_context context,
590
+ cl_mem_flags flags,
591
+ const cl_image_format* image_format,
592
+ size_t image_width,
593
+ size_t image_height,
594
+ size_t image_depth,
595
+ size_t image_row_pitch,
596
+ size_t image_slice_pitch,
597
+ void* host_ptr,
598
+ cl_int* errcode_ret);
599
+
600
+ typedef clCreateImage3D_t *
601
+ clCreateImage3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
602
+
603
+ typedef cl_int CL_API_CALL clEnqueueMarker_t(
604
+ cl_command_queue command_queue,
605
+ cl_event* event);
606
+
607
+ typedef clEnqueueMarker_t *
608
+ clEnqueueMarker_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
609
+
610
+ typedef cl_int CL_API_CALL clEnqueueWaitForEvents_t(
611
+ cl_command_queue command_queue,
612
+ cl_uint num_events,
613
+ const cl_event* event_list);
614
+
615
+ typedef clEnqueueWaitForEvents_t *
616
+ clEnqueueWaitForEvents_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
617
+
618
+ typedef cl_int CL_API_CALL clEnqueueBarrier_t(
619
+ cl_command_queue command_queue);
620
+
621
+ typedef clEnqueueBarrier_t *
622
+ clEnqueueBarrier_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
623
+
624
+ typedef cl_int CL_API_CALL clUnloadCompiler_t(
625
+ void );
626
+
627
+ typedef clUnloadCompiler_t *
628
+ clUnloadCompiler_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
629
+
630
+ typedef void* CL_API_CALL clGetExtensionFunctionAddress_t(
631
+ const char* func_name);
632
+
633
+ typedef clGetExtensionFunctionAddress_t *
634
+ clGetExtensionFunctionAddress_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
635
+
636
+ typedef cl_command_queue CL_API_CALL clCreateCommandQueue_t(
637
+ cl_context context,
638
+ cl_device_id device,
639
+ cl_command_queue_properties properties,
640
+ cl_int* errcode_ret);
641
+
642
+ typedef clCreateCommandQueue_t *
643
+ clCreateCommandQueue_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
644
+
645
+ typedef cl_sampler CL_API_CALL clCreateSampler_t(
646
+ cl_context context,
647
+ cl_bool normalized_coords,
648
+ cl_addressing_mode addressing_mode,
649
+ cl_filter_mode filter_mode,
650
+ cl_int* errcode_ret);
651
+
652
+ typedef clCreateSampler_t *
653
+ clCreateSampler_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
654
+
655
+ typedef cl_int CL_API_CALL clEnqueueTask_t(
656
+ cl_command_queue command_queue,
657
+ cl_kernel kernel,
658
+ cl_uint num_events_in_wait_list,
659
+ const cl_event* event_wait_list,
660
+ cl_event* event);
661
+
662
+ typedef clEnqueueTask_t *
663
+ clEnqueueTask_fn CL_API_SUFFIX__VERSION_1_2_DEPRECATED;
664
+
665
+ #ifdef CL_VERSION_1_1
666
+
667
+ typedef cl_mem CL_API_CALL clCreateSubBuffer_t(
668
+ cl_mem buffer,
669
+ cl_mem_flags flags,
670
+ cl_buffer_create_type buffer_create_type,
671
+ const void* buffer_create_info,
672
+ cl_int* errcode_ret);
673
+
674
+ typedef clCreateSubBuffer_t *
675
+ clCreateSubBuffer_fn CL_API_SUFFIX__VERSION_1_1;
676
+
677
+ typedef cl_int CL_API_CALL clSetMemObjectDestructorCallback_t(
678
+ cl_mem memobj,
679
+ void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data),
680
+ void* user_data);
681
+
682
+ typedef clSetMemObjectDestructorCallback_t *
683
+ clSetMemObjectDestructorCallback_fn CL_API_SUFFIX__VERSION_1_1;
684
+
685
+ typedef cl_event CL_API_CALL clCreateUserEvent_t(
686
+ cl_context context,
687
+ cl_int* errcode_ret);
688
+
689
+ typedef clCreateUserEvent_t *
690
+ clCreateUserEvent_fn CL_API_SUFFIX__VERSION_1_1;
691
+
692
+ typedef cl_int CL_API_CALL clSetUserEventStatus_t(
693
+ cl_event event,
694
+ cl_int execution_status);
695
+
696
+ typedef clSetUserEventStatus_t *
697
+ clSetUserEventStatus_fn CL_API_SUFFIX__VERSION_1_1;
698
+
699
+ typedef cl_int CL_API_CALL clSetEventCallback_t(
700
+ cl_event event,
701
+ cl_int command_exec_callback_type,
702
+ void (CL_CALLBACK* pfn_notify)(cl_event event, cl_int event_command_status, void *user_data),
703
+ void* user_data);
704
+
705
+ typedef clSetEventCallback_t *
706
+ clSetEventCallback_fn CL_API_SUFFIX__VERSION_1_1;
707
+
708
+ typedef cl_int CL_API_CALL clEnqueueReadBufferRect_t(
709
+ cl_command_queue command_queue,
710
+ cl_mem buffer,
711
+ cl_bool blocking_read,
712
+ const size_t* buffer_origin,
713
+ const size_t* host_origin,
714
+ const size_t* region,
715
+ size_t buffer_row_pitch,
716
+ size_t buffer_slice_pitch,
717
+ size_t host_row_pitch,
718
+ size_t host_slice_pitch,
719
+ void* ptr,
720
+ cl_uint num_events_in_wait_list,
721
+ const cl_event* event_wait_list,
722
+ cl_event* event);
723
+
724
+ typedef clEnqueueReadBufferRect_t *
725
+ clEnqueueReadBufferRect_fn CL_API_SUFFIX__VERSION_1_1;
726
+
727
+ typedef cl_int CL_API_CALL clEnqueueWriteBufferRect_t(
728
+ cl_command_queue command_queue,
729
+ cl_mem buffer,
730
+ cl_bool blocking_write,
731
+ const size_t* buffer_origin,
732
+ const size_t* host_origin,
733
+ const size_t* region,
734
+ size_t buffer_row_pitch,
735
+ size_t buffer_slice_pitch,
736
+ size_t host_row_pitch,
737
+ size_t host_slice_pitch,
738
+ const void* ptr,
739
+ cl_uint num_events_in_wait_list,
740
+ const cl_event* event_wait_list,
741
+ cl_event* event);
742
+
743
+ typedef clEnqueueWriteBufferRect_t *
744
+ clEnqueueWriteBufferRect_fn CL_API_SUFFIX__VERSION_1_1;
745
+
746
+ typedef cl_int CL_API_CALL clEnqueueCopyBufferRect_t(
747
+ cl_command_queue command_queue,
748
+ cl_mem src_buffer,
749
+ cl_mem dst_buffer,
750
+ const size_t* src_origin,
751
+ const size_t* dst_origin,
752
+ const size_t* region,
753
+ size_t src_row_pitch,
754
+ size_t src_slice_pitch,
755
+ size_t dst_row_pitch,
756
+ size_t dst_slice_pitch,
757
+ cl_uint num_events_in_wait_list,
758
+ const cl_event* event_wait_list,
759
+ cl_event* event);
760
+
761
+ typedef clEnqueueCopyBufferRect_t *
762
+ clEnqueueCopyBufferRect_fn CL_API_SUFFIX__VERSION_1_1;
763
+
764
+ #endif /* CL_VERSION_1_1 */
765
+
766
+ #ifdef CL_VERSION_1_2
767
+
768
+ typedef cl_int CL_API_CALL clCreateSubDevices_t(
769
+ cl_device_id in_device,
770
+ const cl_device_partition_property* properties,
771
+ cl_uint num_devices,
772
+ cl_device_id* out_devices,
773
+ cl_uint* num_devices_ret);
774
+
775
+ typedef clCreateSubDevices_t *
776
+ clCreateSubDevices_fn CL_API_SUFFIX__VERSION_1_2;
777
+
778
+ typedef cl_int CL_API_CALL clRetainDevice_t(
779
+ cl_device_id device);
780
+
781
+ typedef clRetainDevice_t *
782
+ clRetainDevice_fn CL_API_SUFFIX__VERSION_1_2;
783
+
784
+ typedef cl_int CL_API_CALL clReleaseDevice_t(
785
+ cl_device_id device);
786
+
787
+ typedef clReleaseDevice_t *
788
+ clReleaseDevice_fn CL_API_SUFFIX__VERSION_1_2;
789
+
790
+ typedef cl_mem CL_API_CALL clCreateImage_t(
791
+ cl_context context,
792
+ cl_mem_flags flags,
793
+ const cl_image_format* image_format,
794
+ const cl_image_desc* image_desc,
795
+ void* host_ptr,
796
+ cl_int* errcode_ret);
797
+
798
+ typedef clCreateImage_t *
799
+ clCreateImage_fn CL_API_SUFFIX__VERSION_1_2;
800
+
801
+ typedef cl_program CL_API_CALL clCreateProgramWithBuiltInKernels_t(
802
+ cl_context context,
803
+ cl_uint num_devices,
804
+ const cl_device_id* device_list,
805
+ const char* kernel_names,
806
+ cl_int* errcode_ret);
807
+
808
+ typedef clCreateProgramWithBuiltInKernels_t *
809
+ clCreateProgramWithBuiltInKernels_fn CL_API_SUFFIX__VERSION_1_2;
810
+
811
+ typedef cl_int CL_API_CALL clCompileProgram_t(
812
+ cl_program program,
813
+ cl_uint num_devices,
814
+ const cl_device_id* device_list,
815
+ const char* options,
816
+ cl_uint num_input_headers,
817
+ const cl_program* input_headers,
818
+ const char** header_include_names,
819
+ void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data),
820
+ void* user_data);
821
+
822
+ typedef clCompileProgram_t *
823
+ clCompileProgram_fn CL_API_SUFFIX__VERSION_1_2;
824
+
825
+ typedef cl_program CL_API_CALL clLinkProgram_t(
826
+ cl_context context,
827
+ cl_uint num_devices,
828
+ const cl_device_id* device_list,
829
+ const char* options,
830
+ cl_uint num_input_programs,
831
+ const cl_program* input_programs,
832
+ void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data),
833
+ void* user_data,
834
+ cl_int* errcode_ret);
835
+
836
+ typedef clLinkProgram_t *
837
+ clLinkProgram_fn CL_API_SUFFIX__VERSION_1_2;
838
+
839
+ typedef cl_int CL_API_CALL clUnloadPlatformCompiler_t(
840
+ cl_platform_id platform);
841
+
842
+ typedef clUnloadPlatformCompiler_t *
843
+ clUnloadPlatformCompiler_fn CL_API_SUFFIX__VERSION_1_2;
844
+
845
+ typedef cl_int CL_API_CALL clGetKernelArgInfo_t(
846
+ cl_kernel kernel,
847
+ cl_uint arg_index,
848
+ cl_kernel_arg_info param_name,
849
+ size_t param_value_size,
850
+ void* param_value,
851
+ size_t* param_value_size_ret);
852
+
853
+ typedef clGetKernelArgInfo_t *
854
+ clGetKernelArgInfo_fn CL_API_SUFFIX__VERSION_1_2;
855
+
856
+ typedef cl_int CL_API_CALL clEnqueueFillBuffer_t(
857
+ cl_command_queue command_queue,
858
+ cl_mem buffer,
859
+ const void* pattern,
860
+ size_t pattern_size,
861
+ size_t offset,
862
+ size_t size,
863
+ cl_uint num_events_in_wait_list,
864
+ const cl_event* event_wait_list,
865
+ cl_event* event);
866
+
867
+ typedef clEnqueueFillBuffer_t *
868
+ clEnqueueFillBuffer_fn CL_API_SUFFIX__VERSION_1_2;
869
+
870
+ typedef cl_int CL_API_CALL clEnqueueFillImage_t(
871
+ cl_command_queue command_queue,
872
+ cl_mem image,
873
+ const void* fill_color,
874
+ const size_t* origin,
875
+ const size_t* region,
876
+ cl_uint num_events_in_wait_list,
877
+ const cl_event* event_wait_list,
878
+ cl_event* event);
879
+
880
+ typedef clEnqueueFillImage_t *
881
+ clEnqueueFillImage_fn CL_API_SUFFIX__VERSION_1_2;
882
+
883
+ typedef cl_int CL_API_CALL clEnqueueMigrateMemObjects_t(
884
+ cl_command_queue command_queue,
885
+ cl_uint num_mem_objects,
886
+ const cl_mem* mem_objects,
887
+ cl_mem_migration_flags flags,
888
+ cl_uint num_events_in_wait_list,
889
+ const cl_event* event_wait_list,
890
+ cl_event* event);
891
+
892
+ typedef clEnqueueMigrateMemObjects_t *
893
+ clEnqueueMigrateMemObjects_fn CL_API_SUFFIX__VERSION_1_2;
894
+
895
+ typedef cl_int CL_API_CALL clEnqueueMarkerWithWaitList_t(
896
+ cl_command_queue command_queue,
897
+ cl_uint num_events_in_wait_list,
898
+ const cl_event* event_wait_list,
899
+ cl_event* event);
900
+
901
+ typedef clEnqueueMarkerWithWaitList_t *
902
+ clEnqueueMarkerWithWaitList_fn CL_API_SUFFIX__VERSION_1_2;
903
+
904
+ typedef cl_int CL_API_CALL clEnqueueBarrierWithWaitList_t(
905
+ cl_command_queue command_queue,
906
+ cl_uint num_events_in_wait_list,
907
+ const cl_event* event_wait_list,
908
+ cl_event* event);
909
+
910
+ typedef clEnqueueBarrierWithWaitList_t *
911
+ clEnqueueBarrierWithWaitList_fn CL_API_SUFFIX__VERSION_1_2;
912
+
913
+ typedef void* CL_API_CALL clGetExtensionFunctionAddressForPlatform_t(
914
+ cl_platform_id platform,
915
+ const char* func_name);
916
+
917
+ typedef clGetExtensionFunctionAddressForPlatform_t *
918
+ clGetExtensionFunctionAddressForPlatform_fn CL_API_SUFFIX__VERSION_1_2;
919
+
920
+ #endif /* CL_VERSION_1_2 */
921
+
922
+ #ifdef CL_VERSION_2_0
923
+
924
+ typedef cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties_t(
925
+ cl_context context,
926
+ cl_device_id device,
927
+ const cl_queue_properties* properties,
928
+ cl_int* errcode_ret);
929
+
930
+ typedef clCreateCommandQueueWithProperties_t *
931
+ clCreateCommandQueueWithProperties_fn CL_API_SUFFIX__VERSION_2_0;
932
+
933
+ typedef cl_mem CL_API_CALL clCreatePipe_t(
934
+ cl_context context,
935
+ cl_mem_flags flags,
936
+ cl_uint pipe_packet_size,
937
+ cl_uint pipe_max_packets,
938
+ const cl_pipe_properties* properties,
939
+ cl_int* errcode_ret);
940
+
941
+ typedef clCreatePipe_t *
942
+ clCreatePipe_fn CL_API_SUFFIX__VERSION_2_0;
943
+
944
+ typedef cl_int CL_API_CALL clGetPipeInfo_t(
945
+ cl_mem pipe,
946
+ cl_pipe_info param_name,
947
+ size_t param_value_size,
948
+ void* param_value,
949
+ size_t* param_value_size_ret);
950
+
951
+ typedef clGetPipeInfo_t *
952
+ clGetPipeInfo_fn CL_API_SUFFIX__VERSION_2_0;
953
+
954
+ typedef void* CL_API_CALL clSVMAlloc_t(
955
+ cl_context context,
956
+ cl_svm_mem_flags flags,
957
+ size_t size,
958
+ cl_uint alignment);
959
+
960
+ typedef clSVMAlloc_t *
961
+ clSVMAlloc_fn CL_API_SUFFIX__VERSION_2_0;
962
+
963
+ typedef void CL_API_CALL clSVMFree_t(
964
+ cl_context context,
965
+ void* svm_pointer);
966
+
967
+ typedef clSVMFree_t *
968
+ clSVMFree_fn CL_API_SUFFIX__VERSION_2_0;
969
+
970
+ typedef cl_sampler CL_API_CALL clCreateSamplerWithProperties_t(
971
+ cl_context context,
972
+ const cl_sampler_properties* sampler_properties,
973
+ cl_int* errcode_ret);
974
+
975
+ typedef clCreateSamplerWithProperties_t *
976
+ clCreateSamplerWithProperties_fn CL_API_SUFFIX__VERSION_2_0;
977
+
978
+ typedef cl_int CL_API_CALL clSetKernelArgSVMPointer_t(
979
+ cl_kernel kernel,
980
+ cl_uint arg_index,
981
+ const void* arg_value);
982
+
983
+ typedef clSetKernelArgSVMPointer_t *
984
+ clSetKernelArgSVMPointer_fn CL_API_SUFFIX__VERSION_2_0;
985
+
986
+ typedef cl_int CL_API_CALL clSetKernelExecInfo_t(
987
+ cl_kernel kernel,
988
+ cl_kernel_exec_info param_name,
989
+ size_t param_value_size,
990
+ const void* param_value);
991
+
992
+ typedef clSetKernelExecInfo_t *
993
+ clSetKernelExecInfo_fn CL_API_SUFFIX__VERSION_2_0;
994
+
995
+ typedef cl_int CL_API_CALL clEnqueueSVMFree_t(
996
+ cl_command_queue command_queue,
997
+ cl_uint num_svm_pointers,
998
+ void* svm_pointers[],
999
+ void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data),
1000
+ void* user_data,
1001
+ cl_uint num_events_in_wait_list,
1002
+ const cl_event* event_wait_list,
1003
+ cl_event* event);
1004
+
1005
+ typedef clEnqueueSVMFree_t *
1006
+ clEnqueueSVMFree_fn CL_API_SUFFIX__VERSION_2_0;
1007
+
1008
+ typedef cl_int CL_API_CALL clEnqueueSVMMemcpy_t(
1009
+ cl_command_queue command_queue,
1010
+ cl_bool blocking_copy,
1011
+ void* dst_ptr,
1012
+ const void* src_ptr,
1013
+ size_t size,
1014
+ cl_uint num_events_in_wait_list,
1015
+ const cl_event* event_wait_list,
1016
+ cl_event* event);
1017
+
1018
+ typedef clEnqueueSVMMemcpy_t *
1019
+ clEnqueueSVMMemcpy_fn CL_API_SUFFIX__VERSION_2_0;
1020
+
1021
+ typedef cl_int CL_API_CALL clEnqueueSVMMemFill_t(
1022
+ cl_command_queue command_queue,
1023
+ void* svm_ptr,
1024
+ const void* pattern,
1025
+ size_t pattern_size,
1026
+ size_t size,
1027
+ cl_uint num_events_in_wait_list,
1028
+ const cl_event* event_wait_list,
1029
+ cl_event* event);
1030
+
1031
+ typedef clEnqueueSVMMemFill_t *
1032
+ clEnqueueSVMMemFill_fn CL_API_SUFFIX__VERSION_2_0;
1033
+
1034
+ typedef cl_int CL_API_CALL clEnqueueSVMMap_t(
1035
+ cl_command_queue command_queue,
1036
+ cl_bool blocking_map,
1037
+ cl_map_flags flags,
1038
+ void* svm_ptr,
1039
+ size_t size,
1040
+ cl_uint num_events_in_wait_list,
1041
+ const cl_event* event_wait_list,
1042
+ cl_event* event);
1043
+
1044
+ typedef clEnqueueSVMMap_t *
1045
+ clEnqueueSVMMap_fn CL_API_SUFFIX__VERSION_2_0;
1046
+
1047
+ typedef cl_int CL_API_CALL clEnqueueSVMUnmap_t(
1048
+ cl_command_queue command_queue,
1049
+ void* svm_ptr,
1050
+ cl_uint num_events_in_wait_list,
1051
+ const cl_event* event_wait_list,
1052
+ cl_event* event);
1053
+
1054
+ typedef clEnqueueSVMUnmap_t *
1055
+ clEnqueueSVMUnmap_fn CL_API_SUFFIX__VERSION_2_0;
1056
+
1057
+ #endif /* CL_VERSION_2_0 */
1058
+
1059
+ #ifdef CL_VERSION_2_1
1060
+
1061
+ typedef cl_int CL_API_CALL clSetDefaultDeviceCommandQueue_t(
1062
+ cl_context context,
1063
+ cl_device_id device,
1064
+ cl_command_queue command_queue);
1065
+
1066
+ typedef clSetDefaultDeviceCommandQueue_t *
1067
+ clSetDefaultDeviceCommandQueue_fn CL_API_SUFFIX__VERSION_2_1;
1068
+
1069
+ typedef cl_int CL_API_CALL clGetDeviceAndHostTimer_t(
1070
+ cl_device_id device,
1071
+ cl_ulong* device_timestamp,
1072
+ cl_ulong* host_timestamp);
1073
+
1074
+ typedef clGetDeviceAndHostTimer_t *
1075
+ clGetDeviceAndHostTimer_fn CL_API_SUFFIX__VERSION_2_1;
1076
+
1077
+ typedef cl_int CL_API_CALL clGetHostTimer_t(
1078
+ cl_device_id device,
1079
+ cl_ulong* host_timestamp);
1080
+
1081
+ typedef clGetHostTimer_t *
1082
+ clGetHostTimer_fn CL_API_SUFFIX__VERSION_2_1;
1083
+
1084
+ typedef cl_program CL_API_CALL clCreateProgramWithIL_t(
1085
+ cl_context context,
1086
+ const void* il,
1087
+ size_t length,
1088
+ cl_int* errcode_ret);
1089
+
1090
+ typedef clCreateProgramWithIL_t *
1091
+ clCreateProgramWithIL_fn CL_API_SUFFIX__VERSION_2_1;
1092
+
1093
+ typedef cl_kernel CL_API_CALL clCloneKernel_t(
1094
+ cl_kernel source_kernel,
1095
+ cl_int* errcode_ret);
1096
+
1097
+ typedef clCloneKernel_t *
1098
+ clCloneKernel_fn CL_API_SUFFIX__VERSION_2_1;
1099
+
1100
+ typedef cl_int CL_API_CALL clGetKernelSubGroupInfo_t(
1101
+ cl_kernel kernel,
1102
+ cl_device_id device,
1103
+ cl_kernel_sub_group_info param_name,
1104
+ size_t input_value_size,
1105
+ const void* input_value,
1106
+ size_t param_value_size,
1107
+ void* param_value,
1108
+ size_t* param_value_size_ret);
1109
+
1110
+ typedef clGetKernelSubGroupInfo_t *
1111
+ clGetKernelSubGroupInfo_fn CL_API_SUFFIX__VERSION_2_1;
1112
+
1113
+ typedef cl_int CL_API_CALL clEnqueueSVMMigrateMem_t(
1114
+ cl_command_queue command_queue,
1115
+ cl_uint num_svm_pointers,
1116
+ const void** svm_pointers,
1117
+ const size_t* sizes,
1118
+ cl_mem_migration_flags flags,
1119
+ cl_uint num_events_in_wait_list,
1120
+ const cl_event* event_wait_list,
1121
+ cl_event* event);
1122
+
1123
+ typedef clEnqueueSVMMigrateMem_t *
1124
+ clEnqueueSVMMigrateMem_fn CL_API_SUFFIX__VERSION_2_1;
1125
+
1126
+ #endif /* CL_VERSION_2_1 */
1127
+
1128
+ #ifdef CL_VERSION_2_2
1129
+
1130
+ typedef cl_int CL_API_CALL clSetProgramSpecializationConstant_t(
1131
+ cl_program program,
1132
+ cl_uint spec_id,
1133
+ size_t spec_size,
1134
+ const void* spec_value);
1135
+
1136
+ typedef clSetProgramSpecializationConstant_t *
1137
+ clSetProgramSpecializationConstant_fn CL_API_SUFFIX__VERSION_2_2;
1138
+
1139
+ typedef cl_int CL_API_CALL clSetProgramReleaseCallback_t(
1140
+ cl_program program,
1141
+ void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data),
1142
+ void* user_data);
1143
+
1144
+ typedef clSetProgramReleaseCallback_t *
1145
+ clSetProgramReleaseCallback_fn CL_API_SUFFIX__VERSION_2_2_DEPRECATED;
1146
+
1147
+ #endif /* CL_VERSION_2_2 */
1148
+
1149
+ #ifdef CL_VERSION_3_0
1150
+
1151
+ typedef cl_int CL_API_CALL clSetContextDestructorCallback_t(
1152
+ cl_context context,
1153
+ void (CL_CALLBACK* pfn_notify)(cl_context context, void* user_data),
1154
+ void* user_data);
1155
+
1156
+ typedef clSetContextDestructorCallback_t *
1157
+ clSetContextDestructorCallback_fn CL_API_SUFFIX__VERSION_3_0;
1158
+
1159
+ typedef cl_mem CL_API_CALL clCreateBufferWithProperties_t(
1160
+ cl_context context,
1161
+ const cl_mem_properties* properties,
1162
+ cl_mem_flags flags,
1163
+ size_t size,
1164
+ void* host_ptr,
1165
+ cl_int* errcode_ret);
1166
+
1167
+ typedef clCreateBufferWithProperties_t *
1168
+ clCreateBufferWithProperties_fn CL_API_SUFFIX__VERSION_3_0;
1169
+
1170
+ typedef cl_mem CL_API_CALL clCreateImageWithProperties_t(
1171
+ cl_context context,
1172
+ const cl_mem_properties* properties,
1173
+ cl_mem_flags flags,
1174
+ const cl_image_format* image_format,
1175
+ const cl_image_desc* image_desc,
1176
+ void* host_ptr,
1177
+ cl_int* errcode_ret);
1178
+
1179
+ typedef clCreateImageWithProperties_t *
1180
+ clCreateImageWithProperties_fn CL_API_SUFFIX__VERSION_3_0;
1181
+
1182
+ #endif /* CL_VERSION_3_0 */
1183
+
1184
+ #endif /* OPENCL_CL_FUNCTION_TYPES_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_gl.h ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_GL_H_
18
+ #define OPENCL_CL_GL_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #include <CL/cl.h>
25
+
26
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
27
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
28
+ #define CL_NO_EXTENSION_PROTOTYPES
29
+ #endif
30
+
31
+ /* CL_NO_EXTENSION_PROTOTYPES implies
32
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
33
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
34
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
35
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
36
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
37
+ #endif
38
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
39
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
40
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
41
+ #endif
42
+
43
+ #ifdef __cplusplus
44
+ extern "C" {
45
+ #endif
46
+
47
+ /***************************************************************
48
+ * cl_khr_gl_sharing
49
+ ***************************************************************/
50
+ #define cl_khr_gl_sharing 1
51
+ #define CL_KHR_GL_SHARING_EXTENSION_NAME \
52
+ "cl_khr_gl_sharing"
53
+
54
+
55
+ #define CL_KHR_GL_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
56
+
57
+ typedef int cl_GLint;
58
+ typedef unsigned int cl_GLenum;
59
+ typedef unsigned int cl_GLuint;
60
+
61
+ typedef cl_uint cl_gl_context_info;
62
+
63
+ /* Error codes */
64
+ #define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
65
+
66
+ /* cl_gl_context_info */
67
+ #define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
68
+ #define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
69
+
70
+ /* Additional cl_context_properties */
71
+ #define CL_GL_CONTEXT_KHR 0x2008
72
+ #define CL_EGL_DISPLAY_KHR 0x2009
73
+ #define CL_GLX_DISPLAY_KHR 0x200A
74
+ #define CL_WGL_HDC_KHR 0x200B
75
+ #define CL_CGL_SHAREGROUP_KHR 0x200C
76
+
77
+ typedef cl_uint cl_gl_object_type;
78
+ typedef cl_uint cl_gl_texture_info;
79
+ typedef cl_uint cl_gl_platform_info;
80
+
81
+ /* cl_gl_object_type */
82
+ #define CL_GL_OBJECT_BUFFER 0x2000
83
+ #define CL_GL_OBJECT_TEXTURE2D 0x2001
84
+ #define CL_GL_OBJECT_TEXTURE3D 0x2002
85
+ #define CL_GL_OBJECT_RENDERBUFFER 0x2003
86
+
87
+ #if defined(CL_VERSION_1_2)
88
+ /* cl_gl_object_type */
89
+ #define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
90
+ #define CL_GL_OBJECT_TEXTURE1D 0x200F
91
+ #define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
92
+ #define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
93
+
94
+ #endif /* defined(CL_VERSION_1_2) */
95
+
96
+ /* cl_gl_texture_info */
97
+ #define CL_GL_TEXTURE_TARGET 0x2004
98
+ #define CL_GL_MIPMAP_LEVEL 0x2005
99
+
100
+
101
+ typedef cl_int CL_API_CALL
102
+ clGetGLContextInfoKHR_t(
103
+ const cl_context_properties* properties,
104
+ cl_gl_context_info param_name,
105
+ size_t param_value_size,
106
+ void* param_value,
107
+ size_t* param_value_size_ret);
108
+
109
+ typedef clGetGLContextInfoKHR_t *
110
+ clGetGLContextInfoKHR_fn CL_API_SUFFIX__VERSION_1_0;
111
+
112
+ typedef cl_mem CL_API_CALL
113
+ clCreateFromGLBuffer_t(
114
+ cl_context context,
115
+ cl_mem_flags flags,
116
+ cl_GLuint bufobj,
117
+ cl_int* errcode_ret);
118
+
119
+ typedef clCreateFromGLBuffer_t *
120
+ clCreateFromGLBuffer_fn CL_API_SUFFIX__VERSION_1_0;
121
+
122
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
123
+
124
+ extern CL_API_ENTRY cl_int CL_API_CALL
125
+ clGetGLContextInfoKHR(
126
+ const cl_context_properties* properties,
127
+ cl_gl_context_info param_name,
128
+ size_t param_value_size,
129
+ void* param_value,
130
+ size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
131
+
132
+ extern CL_API_ENTRY cl_mem CL_API_CALL
133
+ clCreateFromGLBuffer(
134
+ cl_context context,
135
+ cl_mem_flags flags,
136
+ cl_GLuint bufobj,
137
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
138
+
139
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
140
+
141
+ #if defined(CL_VERSION_1_2)
142
+
143
+ typedef cl_mem CL_API_CALL
144
+ clCreateFromGLTexture_t(
145
+ cl_context context,
146
+ cl_mem_flags flags,
147
+ cl_GLenum target,
148
+ cl_GLint miplevel,
149
+ cl_GLuint texture,
150
+ cl_int* errcode_ret);
151
+
152
+ typedef clCreateFromGLTexture_t *
153
+ clCreateFromGLTexture_fn CL_API_SUFFIX__VERSION_1_2;
154
+
155
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
156
+
157
+ extern CL_API_ENTRY cl_mem CL_API_CALL
158
+ clCreateFromGLTexture(
159
+ cl_context context,
160
+ cl_mem_flags flags,
161
+ cl_GLenum target,
162
+ cl_GLint miplevel,
163
+ cl_GLuint texture,
164
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
165
+
166
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
167
+
168
+ #endif /* defined(CL_VERSION_1_2) */
169
+
170
+
171
+ typedef cl_mem CL_API_CALL
172
+ clCreateFromGLRenderbuffer_t(
173
+ cl_context context,
174
+ cl_mem_flags flags,
175
+ cl_GLuint renderbuffer,
176
+ cl_int* errcode_ret);
177
+
178
+ typedef clCreateFromGLRenderbuffer_t *
179
+ clCreateFromGLRenderbuffer_fn CL_API_SUFFIX__VERSION_1_0;
180
+
181
+ typedef cl_int CL_API_CALL
182
+ clGetGLObjectInfo_t(
183
+ cl_mem memobj,
184
+ cl_gl_object_type* gl_object_type,
185
+ cl_GLuint* gl_object_name);
186
+
187
+ typedef clGetGLObjectInfo_t *
188
+ clGetGLObjectInfo_fn CL_API_SUFFIX__VERSION_1_0;
189
+
190
+ typedef cl_int CL_API_CALL
191
+ clGetGLTextureInfo_t(
192
+ cl_mem memobj,
193
+ cl_gl_texture_info param_name,
194
+ size_t param_value_size,
195
+ void* param_value,
196
+ size_t* param_value_size_ret);
197
+
198
+ typedef clGetGLTextureInfo_t *
199
+ clGetGLTextureInfo_fn CL_API_SUFFIX__VERSION_1_0;
200
+
201
+ typedef cl_int CL_API_CALL
202
+ clEnqueueAcquireGLObjects_t(
203
+ cl_command_queue command_queue,
204
+ cl_uint num_objects,
205
+ const cl_mem* mem_objects,
206
+ cl_uint num_events_in_wait_list,
207
+ const cl_event* event_wait_list,
208
+ cl_event* event);
209
+
210
+ typedef clEnqueueAcquireGLObjects_t *
211
+ clEnqueueAcquireGLObjects_fn CL_API_SUFFIX__VERSION_1_0;
212
+
213
+ typedef cl_int CL_API_CALL
214
+ clEnqueueReleaseGLObjects_t(
215
+ cl_command_queue command_queue,
216
+ cl_uint num_objects,
217
+ const cl_mem* mem_objects,
218
+ cl_uint num_events_in_wait_list,
219
+ const cl_event* event_wait_list,
220
+ cl_event* event);
221
+
222
+ typedef clEnqueueReleaseGLObjects_t *
223
+ clEnqueueReleaseGLObjects_fn CL_API_SUFFIX__VERSION_1_0;
224
+
225
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
226
+
227
+ extern CL_API_ENTRY cl_mem CL_API_CALL
228
+ clCreateFromGLRenderbuffer(
229
+ cl_context context,
230
+ cl_mem_flags flags,
231
+ cl_GLuint renderbuffer,
232
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
233
+
234
+ extern CL_API_ENTRY cl_int CL_API_CALL
235
+ clGetGLObjectInfo(
236
+ cl_mem memobj,
237
+ cl_gl_object_type* gl_object_type,
238
+ cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0;
239
+
240
+ extern CL_API_ENTRY cl_int CL_API_CALL
241
+ clGetGLTextureInfo(
242
+ cl_mem memobj,
243
+ cl_gl_texture_info param_name,
244
+ size_t param_value_size,
245
+ void* param_value,
246
+ size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
247
+
248
+ extern CL_API_ENTRY cl_int CL_API_CALL
249
+ clEnqueueAcquireGLObjects(
250
+ cl_command_queue command_queue,
251
+ cl_uint num_objects,
252
+ const cl_mem* mem_objects,
253
+ cl_uint num_events_in_wait_list,
254
+ const cl_event* event_wait_list,
255
+ cl_event* event) CL_API_SUFFIX__VERSION_1_0;
256
+
257
+ extern CL_API_ENTRY cl_int CL_API_CALL
258
+ clEnqueueReleaseGLObjects(
259
+ cl_command_queue command_queue,
260
+ cl_uint num_objects,
261
+ const cl_mem* mem_objects,
262
+ cl_uint num_events_in_wait_list,
263
+ const cl_event* event_wait_list,
264
+ cl_event* event) CL_API_SUFFIX__VERSION_1_0;
265
+
266
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
267
+
268
+ /* OpenCL 1.0 APIs that were deprecated in OpenCL 1.2 */
269
+
270
+ typedef cl_mem CL_API_CALL
271
+ clCreateFromGLTexture2D_t(
272
+ cl_context context,
273
+ cl_mem_flags flags,
274
+ cl_GLenum target,
275
+ cl_GLint miplevel,
276
+ cl_GLuint texture,
277
+ cl_int* errcode_ret);
278
+
279
+ typedef clCreateFromGLTexture2D_t *
280
+ clCreateFromGLTexture2D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
281
+
282
+ typedef cl_mem CL_API_CALL
283
+ clCreateFromGLTexture3D_t(
284
+ cl_context context,
285
+ cl_mem_flags flags,
286
+ cl_GLenum target,
287
+ cl_GLint miplevel,
288
+ cl_GLuint texture,
289
+ cl_int* errcode_ret);
290
+
291
+ typedef clCreateFromGLTexture3D_t *
292
+ clCreateFromGLTexture3D_fn CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
293
+
294
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
295
+
296
+ extern CL_API_ENTRY cl_mem CL_API_CALL
297
+ clCreateFromGLTexture2D(
298
+ cl_context context,
299
+ cl_mem_flags flags,
300
+ cl_GLenum target,
301
+ cl_GLint miplevel,
302
+ cl_GLuint texture,
303
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
304
+
305
+ extern CL_API_ENTRY cl_mem CL_API_CALL
306
+ clCreateFromGLTexture3D(
307
+ cl_context context,
308
+ cl_mem_flags flags,
309
+ cl_GLenum target,
310
+ cl_GLint miplevel,
311
+ cl_GLuint texture,
312
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED;
313
+
314
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
315
+
316
+ /***************************************************************
317
+ * cl_khr_gl_event
318
+ ***************************************************************/
319
+ #define cl_khr_gl_event 1
320
+ #define CL_KHR_GL_EVENT_EXTENSION_NAME \
321
+ "cl_khr_gl_event"
322
+
323
+
324
+ #define CL_KHR_GL_EVENT_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
325
+
326
+ typedef struct __GLsync * cl_GLsync;
327
+
328
+ /* cl_command_type */
329
+ #define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
330
+
331
+
332
+ typedef cl_event CL_API_CALL
333
+ clCreateEventFromGLsyncKHR_t(
334
+ cl_context context,
335
+ cl_GLsync sync,
336
+ cl_int* errcode_ret);
337
+
338
+ typedef clCreateEventFromGLsyncKHR_t *
339
+ clCreateEventFromGLsyncKHR_fn CL_API_SUFFIX__VERSION_1_1;
340
+
341
+ #if !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
342
+
343
+ extern CL_API_ENTRY cl_event CL_API_CALL
344
+ clCreateEventFromGLsyncKHR(
345
+ cl_context context,
346
+ cl_GLsync sync,
347
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
348
+
349
+ #endif /* !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
350
+
351
+ /***************************************************************
352
+ * cl_khr_gl_depth_images
353
+ ***************************************************************/
354
+ #define cl_khr_gl_depth_images 1
355
+ #define CL_KHR_GL_DEPTH_IMAGES_EXTENSION_NAME \
356
+ "cl_khr_gl_depth_images"
357
+
358
+
359
+ #define CL_KHR_GL_DEPTH_IMAGES_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
360
+
361
+ /* cl_channel_order */
362
+ #define CL_DEPTH_STENCIL 0x10BE
363
+
364
+ /* cl_channel_type */
365
+ #define CL_UNORM_INT24 0x10DF
366
+
367
+ /***************************************************************
368
+ * cl_khr_gl_msaa_sharing
369
+ ***************************************************************/
370
+ #define cl_khr_gl_msaa_sharing 1
371
+ #define CL_KHR_GL_MSAA_SHARING_EXTENSION_NAME \
372
+ "cl_khr_gl_msaa_sharing"
373
+
374
+
375
+ #define CL_KHR_GL_MSAA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
376
+
377
+ /* cl_gl_texture_info */
378
+ #define CL_GL_NUM_SAMPLES 0x2012
379
+
380
+ /***************************************************************
381
+ * cl_intel_sharing_format_query_gl
382
+ ***************************************************************/
383
+ #define cl_intel_sharing_format_query_gl 1
384
+ #define CL_INTEL_SHARING_FORMAT_QUERY_GL_EXTENSION_NAME \
385
+ "cl_intel_sharing_format_query_gl"
386
+
387
+
388
+ #define CL_INTEL_SHARING_FORMAT_QUERY_GL_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
389
+
390
+ /* when cl_khr_gl_sharing is supported */
391
+
392
+ typedef cl_int CL_API_CALL
393
+ clGetSupportedGLTextureFormatsINTEL_t(
394
+ cl_context context,
395
+ cl_mem_flags flags,
396
+ cl_mem_object_type image_type,
397
+ cl_uint num_entries,
398
+ cl_GLenum* gl_formats,
399
+ cl_uint* num_texture_formats);
400
+
401
+ typedef clGetSupportedGLTextureFormatsINTEL_t *
402
+ clGetSupportedGLTextureFormatsINTEL_fn ;
403
+
404
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
405
+
406
+ extern CL_API_ENTRY cl_int CL_API_CALL
407
+ clGetSupportedGLTextureFormatsINTEL(
408
+ cl_context context,
409
+ cl_mem_flags flags,
410
+ cl_mem_object_type image_type,
411
+ cl_uint num_entries,
412
+ cl_GLenum* gl_formats,
413
+ cl_uint* num_texture_formats) ;
414
+
415
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
416
+
417
+ #ifdef __cplusplus
418
+ }
419
+ #endif
420
+
421
+ #endif /* OPENCL_CL_GL_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_gl_ext.h ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2021 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #include <CL/cl_gl.h>
18
+ #pragma message("The extensions in cl_gl_ext.h have been moved into cl_gl.h. Please include cl_gl.h directly.")
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_half.h ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2019-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ /**
18
+ * This is a header-only utility library that provides OpenCL host code with
19
+ * routines for converting to/from cl_half values.
20
+ *
21
+ * Example usage:
22
+ *
23
+ * #include <CL/cl_half.h>
24
+ * ...
25
+ * cl_half h = cl_half_from_float(0.5f, CL_HALF_RTE);
26
+ * cl_float f = cl_half_to_float(h);
27
+ */
28
+
29
+ #ifndef OPENCL_CL_HALF_H
30
+ #define OPENCL_CL_HALF_H
31
+
32
+ #include <CL/cl_platform.h>
33
+
34
+ #include <stdint.h>
35
+
36
+ #ifdef __cplusplus
37
+ extern "C" {
38
+ #endif
39
+
40
+
41
+ /**
42
+ * Rounding mode used when converting to cl_half.
43
+ */
44
+ typedef enum
45
+ {
46
+ CL_HALF_RTE, // round to nearest even
47
+ CL_HALF_RTZ, // round towards zero
48
+ CL_HALF_RTP, // round towards positive infinity
49
+ CL_HALF_RTN, // round towards negative infinity
50
+ } cl_half_rounding_mode;
51
+
52
+
53
+ /* Private utility macros. */
54
+ #define CL_HALF_EXP_MASK 0x7C00
55
+ #define CL_HALF_MAX_FINITE_MAG 0x7BFF
56
+
57
+
58
+ /*
59
+ * Utility to deal with values that overflow when converting to half precision.
60
+ */
61
+ static inline cl_half cl_half_handle_overflow(cl_half_rounding_mode rounding_mode,
62
+ uint16_t sign)
63
+ {
64
+ if (rounding_mode == CL_HALF_RTZ)
65
+ {
66
+ // Round overflow towards zero -> largest finite number (preserving sign)
67
+ return (sign << 15) | CL_HALF_MAX_FINITE_MAG;
68
+ }
69
+ else if (rounding_mode == CL_HALF_RTP && sign)
70
+ {
71
+ // Round negative overflow towards positive infinity -> most negative finite number
72
+ return (1 << 15) | CL_HALF_MAX_FINITE_MAG;
73
+ }
74
+ else if (rounding_mode == CL_HALF_RTN && !sign)
75
+ {
76
+ // Round positive overflow towards negative infinity -> largest finite number
77
+ return CL_HALF_MAX_FINITE_MAG;
78
+ }
79
+
80
+ // Overflow to infinity
81
+ return (sign << 15) | CL_HALF_EXP_MASK;
82
+ }
83
+
84
+ /*
85
+ * Utility to deal with values that underflow when converting to half precision.
86
+ */
87
+ static inline cl_half cl_half_handle_underflow(cl_half_rounding_mode rounding_mode,
88
+ uint16_t sign)
89
+ {
90
+ if (rounding_mode == CL_HALF_RTP && !sign)
91
+ {
92
+ // Round underflow towards positive infinity -> smallest positive value
93
+ return (sign << 15) | 1;
94
+ }
95
+ else if (rounding_mode == CL_HALF_RTN && sign)
96
+ {
97
+ // Round underflow towards negative infinity -> largest negative value
98
+ return (sign << 15) | 1;
99
+ }
100
+
101
+ // Flush to zero
102
+ return (sign << 15);
103
+ }
104
+
105
+
106
+ /**
107
+ * Convert a cl_float to a cl_half.
108
+ */
109
+ static inline cl_half cl_half_from_float(cl_float f, cl_half_rounding_mode rounding_mode)
110
+ {
111
+ // Type-punning to get direct access to underlying bits
112
+ union
113
+ {
114
+ cl_float f;
115
+ uint32_t i;
116
+ } f32;
117
+ f32.f = f;
118
+
119
+ // Extract sign bit
120
+ uint16_t sign = f32.i >> 31;
121
+
122
+ // Extract FP32 exponent and mantissa
123
+ uint32_t f_exp = (f32.i >> (CL_FLT_MANT_DIG - 1)) & 0xFF;
124
+ uint32_t f_mant = f32.i & ((1 << (CL_FLT_MANT_DIG - 1)) - 1);
125
+
126
+ // Remove FP32 exponent bias
127
+ int32_t exp = f_exp - CL_FLT_MAX_EXP + 1;
128
+
129
+ // Add FP16 exponent bias
130
+ uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
131
+
132
+ // Position of the bit that will become the FP16 mantissa LSB
133
+ uint32_t lsb_pos = CL_FLT_MANT_DIG - CL_HALF_MANT_DIG;
134
+
135
+ // Check for NaN / infinity
136
+ if (f_exp == 0xFF)
137
+ {
138
+ if (f_mant)
139
+ {
140
+ // NaN -> propagate mantissa and silence it
141
+ uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
142
+ h_mant |= 0x200;
143
+ return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
144
+ }
145
+ else
146
+ {
147
+ // Infinity -> zero mantissa
148
+ return (sign << 15) | CL_HALF_EXP_MASK;
149
+ }
150
+ }
151
+
152
+ // Check for zero
153
+ if (!f_exp && !f_mant)
154
+ {
155
+ return (sign << 15);
156
+ }
157
+
158
+ // Check for overflow
159
+ if (exp >= CL_HALF_MAX_EXP)
160
+ {
161
+ return cl_half_handle_overflow(rounding_mode, sign);
162
+ }
163
+
164
+ // Check for underflow
165
+ if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
166
+ {
167
+ return cl_half_handle_underflow(rounding_mode, sign);
168
+ }
169
+
170
+ // Check for value that will become denormal
171
+ if (exp < -14)
172
+ {
173
+ // Denormal -> include the implicit 1 from the FP32 mantissa
174
+ h_exp = 0;
175
+ f_mant |= 1 << (CL_FLT_MANT_DIG - 1);
176
+
177
+ // Mantissa shift amount depends on exponent
178
+ lsb_pos = -exp + (CL_FLT_MANT_DIG - 25);
179
+ }
180
+
181
+ // Generate FP16 mantissa by shifting FP32 mantissa
182
+ uint16_t h_mant = (uint16_t)(f_mant >> lsb_pos);
183
+
184
+ // Check whether we need to round
185
+ uint32_t halfway = 1 << (lsb_pos - 1);
186
+ uint32_t mask = (halfway << 1) - 1;
187
+ switch (rounding_mode)
188
+ {
189
+ case CL_HALF_RTE:
190
+ if ((f_mant & mask) > halfway)
191
+ {
192
+ // More than halfway -> round up
193
+ h_mant += 1;
194
+ }
195
+ else if ((f_mant & mask) == halfway)
196
+ {
197
+ // Exactly halfway -> round to nearest even
198
+ if (h_mant & 0x1)
199
+ h_mant += 1;
200
+ }
201
+ break;
202
+ case CL_HALF_RTZ:
203
+ // Mantissa has already been truncated -> do nothing
204
+ break;
205
+ case CL_HALF_RTP:
206
+ if ((f_mant & mask) && !sign)
207
+ {
208
+ // Round positive numbers up
209
+ h_mant += 1;
210
+ }
211
+ break;
212
+ case CL_HALF_RTN:
213
+ if ((f_mant & mask) && sign)
214
+ {
215
+ // Round negative numbers down
216
+ h_mant += 1;
217
+ }
218
+ break;
219
+ }
220
+
221
+ // Check for mantissa overflow
222
+ if (h_mant & 0x400)
223
+ {
224
+ h_exp += 1;
225
+ h_mant = 0;
226
+ }
227
+
228
+ return (sign << 15) | (h_exp << 10) | h_mant;
229
+ }
230
+
231
+
232
+ /**
233
+ * Convert a cl_double to a cl_half.
234
+ */
235
+ static inline cl_half cl_half_from_double(cl_double d, cl_half_rounding_mode rounding_mode)
236
+ {
237
+ // Type-punning to get direct access to underlying bits
238
+ union
239
+ {
240
+ cl_double d;
241
+ uint64_t i;
242
+ } f64;
243
+ f64.d = d;
244
+
245
+ // Extract sign bit
246
+ uint16_t sign = f64.i >> 63;
247
+
248
+ // Extract FP64 exponent and mantissa
249
+ uint64_t d_exp = (f64.i >> (CL_DBL_MANT_DIG - 1)) & 0x7FF;
250
+ uint64_t d_mant = f64.i & (((uint64_t)1 << (CL_DBL_MANT_DIG - 1)) - 1);
251
+
252
+ // Remove FP64 exponent bias
253
+ int64_t exp = d_exp - CL_DBL_MAX_EXP + 1;
254
+
255
+ // Add FP16 exponent bias
256
+ uint16_t h_exp = (uint16_t)(exp + CL_HALF_MAX_EXP - 1);
257
+
258
+ // Position of the bit that will become the FP16 mantissa LSB
259
+ uint32_t lsb_pos = CL_DBL_MANT_DIG - CL_HALF_MANT_DIG;
260
+
261
+ // Check for NaN / infinity
262
+ if (d_exp == 0x7FF)
263
+ {
264
+ if (d_mant)
265
+ {
266
+ // NaN -> propagate mantissa and silence it
267
+ uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
268
+ h_mant |= 0x200;
269
+ return (sign << 15) | CL_HALF_EXP_MASK | h_mant;
270
+ }
271
+ else
272
+ {
273
+ // Infinity -> zero mantissa
274
+ return (sign << 15) | CL_HALF_EXP_MASK;
275
+ }
276
+ }
277
+
278
+ // Check for zero
279
+ if (!d_exp && !d_mant)
280
+ {
281
+ return (sign << 15);
282
+ }
283
+
284
+ // Check for overflow
285
+ if (exp >= CL_HALF_MAX_EXP)
286
+ {
287
+ return cl_half_handle_overflow(rounding_mode, sign);
288
+ }
289
+
290
+ // Check for underflow
291
+ if (exp < (CL_HALF_MIN_EXP - CL_HALF_MANT_DIG - 1))
292
+ {
293
+ return cl_half_handle_underflow(rounding_mode, sign);
294
+ }
295
+
296
+ // Check for value that will become denormal
297
+ if (exp < -14)
298
+ {
299
+ // Include the implicit 1 from the FP64 mantissa
300
+ h_exp = 0;
301
+ d_mant |= (uint64_t)1 << (CL_DBL_MANT_DIG - 1);
302
+
303
+ // Mantissa shift amount depends on exponent
304
+ lsb_pos = (uint32_t)(-exp + (CL_DBL_MANT_DIG - 25));
305
+ }
306
+
307
+ // Generate FP16 mantissa by shifting FP64 mantissa
308
+ uint16_t h_mant = (uint16_t)(d_mant >> lsb_pos);
309
+
310
+ // Check whether we need to round
311
+ uint64_t halfway = (uint64_t)1 << (lsb_pos - 1);
312
+ uint64_t mask = (halfway << 1) - 1;
313
+ switch (rounding_mode)
314
+ {
315
+ case CL_HALF_RTE:
316
+ if ((d_mant & mask) > halfway)
317
+ {
318
+ // More than halfway -> round up
319
+ h_mant += 1;
320
+ }
321
+ else if ((d_mant & mask) == halfway)
322
+ {
323
+ // Exactly halfway -> round to nearest even
324
+ if (h_mant & 0x1)
325
+ h_mant += 1;
326
+ }
327
+ break;
328
+ case CL_HALF_RTZ:
329
+ // Mantissa has already been truncated -> do nothing
330
+ break;
331
+ case CL_HALF_RTP:
332
+ if ((d_mant & mask) && !sign)
333
+ {
334
+ // Round positive numbers up
335
+ h_mant += 1;
336
+ }
337
+ break;
338
+ case CL_HALF_RTN:
339
+ if ((d_mant & mask) && sign)
340
+ {
341
+ // Round negative numbers down
342
+ h_mant += 1;
343
+ }
344
+ break;
345
+ }
346
+
347
+ // Check for mantissa overflow
348
+ if (h_mant & 0x400)
349
+ {
350
+ h_exp += 1;
351
+ h_mant = 0;
352
+ }
353
+
354
+ return (sign << 15) | (h_exp << 10) | h_mant;
355
+ }
356
+
357
+
358
+ /**
359
+ * Convert a cl_half to a cl_float.
360
+ */
361
+ static inline cl_float cl_half_to_float(cl_half h)
362
+ {
363
+ // Type-punning to get direct access to underlying bits
364
+ union
365
+ {
366
+ cl_float f;
367
+ uint32_t i;
368
+ } f32;
369
+
370
+ // Extract sign bit
371
+ uint16_t sign = h >> 15;
372
+
373
+ // Extract FP16 exponent and mantissa
374
+ uint16_t h_exp = (h >> (CL_HALF_MANT_DIG - 1)) & 0x1F;
375
+ uint16_t h_mant = h & 0x3FF;
376
+
377
+ // Remove FP16 exponent bias
378
+ int32_t exp = h_exp - CL_HALF_MAX_EXP + 1;
379
+
380
+ // Add FP32 exponent bias
381
+ uint32_t f_exp = exp + CL_FLT_MAX_EXP - 1;
382
+
383
+ // Check for NaN / infinity
384
+ if (h_exp == 0x1F)
385
+ {
386
+ if (h_mant)
387
+ {
388
+ // NaN -> propagate mantissa and silence it
389
+ uint32_t f_mant = h_mant << (CL_FLT_MANT_DIG - CL_HALF_MANT_DIG);
390
+ f_mant |= 0x400000;
391
+ f32.i = (sign << 31) | 0x7F800000 | f_mant;
392
+ return f32.f;
393
+ }
394
+ else
395
+ {
396
+ // Infinity -> zero mantissa
397
+ f32.i = (sign << 31) | 0x7F800000;
398
+ return f32.f;
399
+ }
400
+ }
401
+
402
+ // Check for zero / denormal
403
+ if (h_exp == 0)
404
+ {
405
+ if (h_mant == 0)
406
+ {
407
+ // Zero -> zero exponent
408
+ f_exp = 0;
409
+ }
410
+ else
411
+ {
412
+ // Denormal -> normalize it
413
+ // - Shift mantissa to make most-significant 1 implicit
414
+ // - Adjust exponent accordingly
415
+ uint32_t shift = 0;
416
+ while ((h_mant & 0x400) == 0)
417
+ {
418
+ h_mant <<= 1;
419
+ shift++;
420
+ }
421
+ h_mant &= 0x3FF;
422
+ f_exp -= shift - 1;
423
+ }
424
+ }
425
+
426
+ f32.i = (sign << 31) | (f_exp << 23) | (h_mant << 13);
427
+ return f32.f;
428
+ }
429
+
430
+
431
+ #undef CL_HALF_EXP_MASK
432
+ #undef CL_HALF_MAX_FINITE_MAG
433
+
434
+
435
+ #ifdef __cplusplus
436
+ }
437
+ #endif
438
+
439
+
440
+ #endif /* OPENCL_CL_HALF_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_icd.h ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2019-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_ICD_H
18
+ #define OPENCL_CL_ICD_H
19
+
20
+ #include <CL/cl.h>
21
+ #include <CL/cl_function_types.h>
22
+ #include <CL/cl_egl.h>
23
+ #include <CL/cl_ext.h>
24
+ #include <CL/cl_gl.h>
25
+ #include <CL/cl_platform.h>
26
+
27
+ #if defined(_WIN32)
28
+ #include <CL/cl_d3d11.h>
29
+ #include <CL/cl_d3d10.h>
30
+ #include <CL/cl_dx9_media_sharing.h>
31
+ #endif
32
+
33
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
34
+ /* Disable warning C4201: nonstandard extension used : nameless struct/union */
35
+ #pragma warning( push )
36
+ #pragma warning( disable : 4201 )
37
+ #endif
38
+
39
+ #ifdef __cplusplus
40
+ extern "C" {
41
+ #endif
42
+
43
+ /* Vendor dispatch table structure */
44
+
45
+ typedef struct _cl_icd_dispatch {
46
+ /* OpenCL 1.0 */
47
+ #if __CL_HAS_ANON_STRUCT__
48
+ __CL_ANON_STRUCT__ union {
49
+ #endif
50
+ clGetPlatformIDs_t *clGetPlatformIDs;
51
+ #if __CL_HAS_ANON_STRUCT__
52
+ /* Set to CL_ICD2_TAG_KHR for cl_khr_icd 2.0.0 */
53
+ intptr_t clGetPlatformIDs_icd2_tag;
54
+ };
55
+ #endif
56
+ clGetPlatformInfo_t *clGetPlatformInfo;
57
+ clGetDeviceIDs_t *clGetDeviceIDs;
58
+ clGetDeviceInfo_t *clGetDeviceInfo;
59
+ clCreateContext_t *clCreateContext;
60
+ clCreateContextFromType_t *clCreateContextFromType;
61
+ clRetainContext_t *clRetainContext;
62
+ clReleaseContext_t *clReleaseContext;
63
+ clGetContextInfo_t *clGetContextInfo;
64
+ clCreateCommandQueue_t *clCreateCommandQueue;
65
+ clRetainCommandQueue_t *clRetainCommandQueue;
66
+ clReleaseCommandQueue_t *clReleaseCommandQueue;
67
+ clGetCommandQueueInfo_t *clGetCommandQueueInfo;
68
+ clSetCommandQueueProperty_t *clSetCommandQueueProperty;
69
+ clCreateBuffer_t *clCreateBuffer;
70
+ clCreateImage2D_t *clCreateImage2D;
71
+ clCreateImage3D_t *clCreateImage3D;
72
+ clRetainMemObject_t *clRetainMemObject;
73
+ clReleaseMemObject_t *clReleaseMemObject;
74
+ clGetSupportedImageFormats_t *clGetSupportedImageFormats;
75
+ clGetMemObjectInfo_t *clGetMemObjectInfo;
76
+ clGetImageInfo_t *clGetImageInfo;
77
+ clCreateSampler_t *clCreateSampler;
78
+ clRetainSampler_t *clRetainSampler;
79
+ clReleaseSampler_t *clReleaseSampler;
80
+ clGetSamplerInfo_t *clGetSamplerInfo;
81
+ clCreateProgramWithSource_t *clCreateProgramWithSource;
82
+ clCreateProgramWithBinary_t *clCreateProgramWithBinary;
83
+ clRetainProgram_t *clRetainProgram;
84
+ clReleaseProgram_t *clReleaseProgram;
85
+ clBuildProgram_t *clBuildProgram;
86
+ #if __CL_HAS_ANON_STRUCT__
87
+ __CL_ANON_STRUCT__ union {
88
+ #endif
89
+ clUnloadCompiler_t *clUnloadCompiler;
90
+ #if __CL_HAS_ANON_STRUCT__
91
+ /* Set to CL_ICD2_TAG_KHR for cl_khr_icd 2.0.0 */
92
+ intptr_t clUnloadCompiler_icd2_tag;
93
+ };
94
+ #endif
95
+ clGetProgramInfo_t *clGetProgramInfo;
96
+ clGetProgramBuildInfo_t *clGetProgramBuildInfo;
97
+ clCreateKernel_t *clCreateKernel;
98
+ clCreateKernelsInProgram_t *clCreateKernelsInProgram;
99
+ clRetainKernel_t *clRetainKernel;
100
+ clReleaseKernel_t *clReleaseKernel;
101
+ clSetKernelArg_t *clSetKernelArg;
102
+ clGetKernelInfo_t *clGetKernelInfo;
103
+ clGetKernelWorkGroupInfo_t *clGetKernelWorkGroupInfo;
104
+ clWaitForEvents_t *clWaitForEvents;
105
+ clGetEventInfo_t *clGetEventInfo;
106
+ clRetainEvent_t *clRetainEvent;
107
+ clReleaseEvent_t *clReleaseEvent;
108
+ clGetEventProfilingInfo_t *clGetEventProfilingInfo;
109
+ clFlush_t *clFlush;
110
+ clFinish_t *clFinish;
111
+ clEnqueueReadBuffer_t *clEnqueueReadBuffer;
112
+ clEnqueueWriteBuffer_t *clEnqueueWriteBuffer;
113
+ clEnqueueCopyBuffer_t *clEnqueueCopyBuffer;
114
+ clEnqueueReadImage_t *clEnqueueReadImage;
115
+ clEnqueueWriteImage_t *clEnqueueWriteImage;
116
+ clEnqueueCopyImage_t *clEnqueueCopyImage;
117
+ clEnqueueCopyImageToBuffer_t *clEnqueueCopyImageToBuffer;
118
+ clEnqueueCopyBufferToImage_t *clEnqueueCopyBufferToImage;
119
+ clEnqueueMapBuffer_t *clEnqueueMapBuffer;
120
+ clEnqueueMapImage_t *clEnqueueMapImage;
121
+ clEnqueueUnmapMemObject_t *clEnqueueUnmapMemObject;
122
+ clEnqueueNDRangeKernel_t *clEnqueueNDRangeKernel;
123
+ clEnqueueTask_t *clEnqueueTask;
124
+ clEnqueueNativeKernel_t *clEnqueueNativeKernel;
125
+ clEnqueueMarker_t *clEnqueueMarker;
126
+ clEnqueueWaitForEvents_t *clEnqueueWaitForEvents;
127
+ clEnqueueBarrier_t *clEnqueueBarrier;
128
+ clGetExtensionFunctionAddress_t *clGetExtensionFunctionAddress;
129
+ clCreateFromGLBuffer_t *clCreateFromGLBuffer;
130
+ clCreateFromGLTexture2D_t *clCreateFromGLTexture2D;
131
+ clCreateFromGLTexture3D_t *clCreateFromGLTexture3D;
132
+ clCreateFromGLRenderbuffer_t *clCreateFromGLRenderbuffer;
133
+ clGetGLObjectInfo_t *clGetGLObjectInfo;
134
+ clGetGLTextureInfo_t *clGetGLTextureInfo;
135
+ clEnqueueAcquireGLObjects_t *clEnqueueAcquireGLObjects;
136
+ clEnqueueReleaseGLObjects_t *clEnqueueReleaseGLObjects;
137
+ clGetGLContextInfoKHR_t *clGetGLContextInfoKHR;
138
+
139
+ /* cl_khr_d3d10_sharing */
140
+ #ifdef _WIN32
141
+ clGetDeviceIDsFromD3D10KHR_t *clGetDeviceIDsFromD3D10KHR;
142
+ clCreateFromD3D10BufferKHR_t *clCreateFromD3D10BufferKHR;
143
+ clCreateFromD3D10Texture2DKHR_t *clCreateFromD3D10Texture2DKHR;
144
+ clCreateFromD3D10Texture3DKHR_t *clCreateFromD3D10Texture3DKHR;
145
+ clEnqueueAcquireD3D10ObjectsKHR_t *clEnqueueAcquireD3D10ObjectsKHR;
146
+ clEnqueueReleaseD3D10ObjectsKHR_t *clEnqueueReleaseD3D10ObjectsKHR;
147
+ #else
148
+ void *clGetDeviceIDsFromD3D10KHR;
149
+ void *clCreateFromD3D10BufferKHR;
150
+ void *clCreateFromD3D10Texture2DKHR;
151
+ void *clCreateFromD3D10Texture3DKHR;
152
+ void *clEnqueueAcquireD3D10ObjectsKHR;
153
+ void *clEnqueueReleaseD3D10ObjectsKHR;
154
+ #endif
155
+
156
+ /* OpenCL 1.1 */
157
+ #ifdef CL_VERSION_1_1
158
+ clSetEventCallback_t *clSetEventCallback;
159
+ clCreateSubBuffer_t *clCreateSubBuffer;
160
+ clSetMemObjectDestructorCallback_t *clSetMemObjectDestructorCallback;
161
+ clCreateUserEvent_t *clCreateUserEvent;
162
+ clSetUserEventStatus_t *clSetUserEventStatus;
163
+ clEnqueueReadBufferRect_t *clEnqueueReadBufferRect;
164
+ clEnqueueWriteBufferRect_t *clEnqueueWriteBufferRect;
165
+ clEnqueueCopyBufferRect_t *clEnqueueCopyBufferRect;
166
+ #else
167
+ void *clSetEventCallback;
168
+ void *clCreateSubBuffer;
169
+ void *clSetMemObjectDestructorCallback;
170
+ void *clCreateUserEvent;
171
+ void *clSetUserEventStatus;
172
+ void *clEnqueueReadBufferRect;
173
+ void *clEnqueueWriteBufferRect;
174
+ void *clEnqueueCopyBufferRect;
175
+ #endif
176
+
177
+ /* cl_ext_device_fission */
178
+ clCreateSubDevicesEXT_t *clCreateSubDevicesEXT;
179
+ clRetainDeviceEXT_t *clRetainDeviceEXT;
180
+ clReleaseDeviceEXT_t *clReleaseDeviceEXT;
181
+
182
+ /* cl_khr_gl_event */
183
+ clCreateEventFromGLsyncKHR_t *clCreateEventFromGLsyncKHR;
184
+
185
+ /* OpenCL 1.2 */
186
+ #ifdef CL_VERSION_1_2
187
+ clCreateSubDevices_t *clCreateSubDevices;
188
+ clRetainDevice_t *clRetainDevice;
189
+ clReleaseDevice_t *clReleaseDevice;
190
+ clCreateImage_t *clCreateImage;
191
+ clCreateProgramWithBuiltInKernels_t *clCreateProgramWithBuiltInKernels;
192
+ clCompileProgram_t *clCompileProgram;
193
+ clLinkProgram_t *clLinkProgram;
194
+ clUnloadPlatformCompiler_t *clUnloadPlatformCompiler;
195
+ clGetKernelArgInfo_t *clGetKernelArgInfo;
196
+ clEnqueueFillBuffer_t *clEnqueueFillBuffer;
197
+ clEnqueueFillImage_t *clEnqueueFillImage;
198
+ clEnqueueMigrateMemObjects_t *clEnqueueMigrateMemObjects;
199
+ clEnqueueMarkerWithWaitList_t *clEnqueueMarkerWithWaitList;
200
+ clEnqueueBarrierWithWaitList_t *clEnqueueBarrierWithWaitList;
201
+ clGetExtensionFunctionAddressForPlatform_t *
202
+ clGetExtensionFunctionAddressForPlatform;
203
+ clCreateFromGLTexture_t *clCreateFromGLTexture;
204
+ #else
205
+ void *clCreateSubDevices;
206
+ void *clRetainDevice;
207
+ void *clReleaseDevice;
208
+ void *clCreateImage;
209
+ void *clCreateProgramWithBuiltInKernels;
210
+ void *clCompileProgram;
211
+ void *clLinkProgram;
212
+ void *clUnloadPlatformCompiler;
213
+ void *clGetKernelArgInfo;
214
+ void *clEnqueueFillBuffer;
215
+ void *clEnqueueFillImage;
216
+ void *clEnqueueMigrateMemObjects;
217
+ void *clEnqueueMarkerWithWaitList;
218
+ void *clEnqueueBarrierWithWaitList;
219
+ void *clGetExtensionFunctionAddressForPlatform;
220
+ void *clCreateFromGLTexture;
221
+ #endif
222
+
223
+ /* cl_khr_d3d11_sharing and cl_khr_dx9_media_sharing */
224
+ #ifdef _WIN32
225
+ clGetDeviceIDsFromD3D11KHR_t *clGetDeviceIDsFromD3D11KHR;
226
+ clCreateFromD3D11BufferKHR_t *clCreateFromD3D11BufferKHR;
227
+ clCreateFromD3D11Texture2DKHR_t *clCreateFromD3D11Texture2DKHR;
228
+ clCreateFromD3D11Texture3DKHR_t *clCreateFromD3D11Texture3DKHR;
229
+ clCreateFromDX9MediaSurfaceKHR_t *clCreateFromDX9MediaSurfaceKHR;
230
+ clEnqueueAcquireD3D11ObjectsKHR_t *clEnqueueAcquireD3D11ObjectsKHR;
231
+ clEnqueueReleaseD3D11ObjectsKHR_t *clEnqueueReleaseD3D11ObjectsKHR;
232
+ clGetDeviceIDsFromDX9MediaAdapterKHR_t *
233
+ clGetDeviceIDsFromDX9MediaAdapterKHR;
234
+ clEnqueueAcquireDX9MediaSurfacesKHR_t *
235
+ clEnqueueAcquireDX9MediaSurfacesKHR;
236
+ clEnqueueReleaseDX9MediaSurfacesKHR_t *
237
+ clEnqueueReleaseDX9MediaSurfacesKHR;
238
+ #else
239
+ void *clGetDeviceIDsFromD3D11KHR;
240
+ void *clCreateFromD3D11BufferKHR;
241
+ void *clCreateFromD3D11Texture2DKHR;
242
+ void *clCreateFromD3D11Texture3DKHR;
243
+ void *clCreateFromDX9MediaSurfaceKHR;
244
+ void *clEnqueueAcquireD3D11ObjectsKHR;
245
+ void *clEnqueueReleaseD3D11ObjectsKHR;
246
+ void *clGetDeviceIDsFromDX9MediaAdapterKHR;
247
+ void *clEnqueueAcquireDX9MediaSurfacesKHR;
248
+ void *clEnqueueReleaseDX9MediaSurfacesKHR;
249
+ #endif
250
+
251
+ /* cl_khr_egl_image */
252
+ clCreateFromEGLImageKHR_t *clCreateFromEGLImageKHR;
253
+ clEnqueueAcquireEGLObjectsKHR_t *clEnqueueAcquireEGLObjectsKHR;
254
+ clEnqueueReleaseEGLObjectsKHR_t *clEnqueueReleaseEGLObjectsKHR;
255
+
256
+ /* cl_khr_egl_event */
257
+ clCreateEventFromEGLSyncKHR_t *clCreateEventFromEGLSyncKHR;
258
+
259
+ /* OpenCL 2.0 */
260
+ #ifdef CL_VERSION_2_0
261
+ clCreateCommandQueueWithProperties_t *clCreateCommandQueueWithProperties;
262
+ clCreatePipe_t *clCreatePipe;
263
+ clGetPipeInfo_t *clGetPipeInfo;
264
+ clSVMAlloc_t *clSVMAlloc;
265
+ clSVMFree_t *clSVMFree;
266
+ clEnqueueSVMFree_t *clEnqueueSVMFree;
267
+ clEnqueueSVMMemcpy_t *clEnqueueSVMMemcpy;
268
+ clEnqueueSVMMemFill_t *clEnqueueSVMMemFill;
269
+ clEnqueueSVMMap_t *clEnqueueSVMMap;
270
+ clEnqueueSVMUnmap_t *clEnqueueSVMUnmap;
271
+ clCreateSamplerWithProperties_t *clCreateSamplerWithProperties;
272
+ clSetKernelArgSVMPointer_t *clSetKernelArgSVMPointer;
273
+ clSetKernelExecInfo_t *clSetKernelExecInfo;
274
+ #else
275
+ void *clCreateCommandQueueWithProperties;
276
+ void *clCreatePipe;
277
+ void *clGetPipeInfo;
278
+ void *clSVMAlloc;
279
+ void *clSVMFree;
280
+ void *clEnqueueSVMFree;
281
+ void *clEnqueueSVMMemcpy;
282
+ void *clEnqueueSVMMemFill;
283
+ void *clEnqueueSVMMap;
284
+ void *clEnqueueSVMUnmap;
285
+ void *clCreateSamplerWithProperties;
286
+ void *clSetKernelArgSVMPointer;
287
+ void *clSetKernelExecInfo;
288
+ #endif
289
+
290
+ /* cl_khr_sub_groups */
291
+ clGetKernelSubGroupInfoKHR_t *clGetKernelSubGroupInfoKHR;
292
+
293
+ /* OpenCL 2.1 */
294
+ #ifdef CL_VERSION_2_1
295
+ clCloneKernel_t *clCloneKernel;
296
+ clCreateProgramWithIL_t *clCreateProgramWithIL;
297
+ clEnqueueSVMMigrateMem_t *clEnqueueSVMMigrateMem;
298
+ clGetDeviceAndHostTimer_t *clGetDeviceAndHostTimer;
299
+ clGetHostTimer_t *clGetHostTimer;
300
+ clGetKernelSubGroupInfo_t *clGetKernelSubGroupInfo;
301
+ clSetDefaultDeviceCommandQueue_t *clSetDefaultDeviceCommandQueue;
302
+ #else
303
+ void *clCloneKernel;
304
+ void *clCreateProgramWithIL;
305
+ void *clEnqueueSVMMigrateMem;
306
+ void *clGetDeviceAndHostTimer;
307
+ void *clGetHostTimer;
308
+ void *clGetKernelSubGroupInfo;
309
+ void *clSetDefaultDeviceCommandQueue;
310
+ #endif
311
+
312
+ /* OpenCL 2.2 */
313
+ #ifdef CL_VERSION_2_2
314
+ clSetProgramReleaseCallback_t *clSetProgramReleaseCallback;
315
+ clSetProgramSpecializationConstant_t *clSetProgramSpecializationConstant;
316
+ #else
317
+ void *clSetProgramReleaseCallback;
318
+ void *clSetProgramSpecializationConstant;
319
+ #endif
320
+
321
+ /* OpenCL 3.0 */
322
+ #ifdef CL_VERSION_3_0
323
+ clCreateBufferWithProperties_t *clCreateBufferWithProperties;
324
+ clCreateImageWithProperties_t *clCreateImageWithProperties;
325
+ clSetContextDestructorCallback_t *clSetContextDestructorCallback;
326
+ #else
327
+ void *clCreateBufferWithProperties;
328
+ void *clCreateImageWithProperties;
329
+ void *clSetContextDestructorCallback;
330
+ #endif
331
+
332
+ } cl_icd_dispatch;
333
+
334
+ #ifdef __cplusplus
335
+ }
336
+ #endif
337
+
338
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
339
+ #pragma warning( pop )
340
+ #endif
341
+
342
+ #endif /* #ifndef OPENCL_CL_ICD_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_layer.h ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_LAYER_H_
18
+ #define OPENCL_CL_LAYER_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #include <CL/cl_icd.h>
25
+
26
+ #include <CL/cl.h>
27
+
28
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
29
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
30
+ #define CL_NO_EXTENSION_PROTOTYPES
31
+ #endif
32
+
33
+ /* CL_NO_EXTENSION_PROTOTYPES implies
34
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
35
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
36
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
37
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
38
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
39
+ #endif
40
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
41
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
42
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
43
+ #endif
44
+
45
+ #ifdef __cplusplus
46
+ extern "C" {
47
+ #endif
48
+
49
+ /***************************************************************
50
+ * cl_loader_layers
51
+ ***************************************************************/
52
+ #define cl_loader_layers 1
53
+ #define CL_LOADER_LAYERS_EXTENSION_NAME \
54
+ "cl_loader_layers"
55
+
56
+
57
+ #define CL_LOADER_LAYERS_EXTENSION_VERSION CL_MAKE_VERSION(1, 0, 0)
58
+
59
+ typedef cl_uint cl_layer_info;
60
+ typedef cl_uint cl_layer_api_version;
61
+
62
+ /* cl_layer_info */
63
+ #define CL_LAYER_API_VERSION 0x4240
64
+ #define CL_LAYER_NAME 0x4241
65
+
66
+ /* Misc API enums */
67
+ #define CL_LAYER_API_VERSION_100 100
68
+
69
+
70
+ typedef cl_int CL_API_CALL
71
+ clGetLayerInfo_t(
72
+ cl_layer_info param_name,
73
+ size_t param_value_size,
74
+ void* param_value,
75
+ size_t* param_value_size_ret);
76
+
77
+ typedef clGetLayerInfo_t *
78
+ clGetLayerInfo_fn ;
79
+
80
+ typedef cl_int CL_API_CALL
81
+ clInitLayer_t(
82
+ cl_uint num_entries,
83
+ const cl_icd_dispatch* target_dispatch,
84
+ cl_uint* num_entries_ret,
85
+ const cl_icd_dispatch** layer_dispatch_ret);
86
+
87
+ typedef clInitLayer_t *
88
+ clInitLayer_fn ;
89
+
90
+ /*
91
+ ** The function pointer typedefs prefixed with "pfn_" are provided for
92
+ ** compatibility with earlier versions of the headers. New code is
93
+ ** encouraged to use the function pointer typedefs that are suffixed with
94
+ ** "_fn" instead, for consistency.
95
+ */
96
+
97
+ typedef clGetLayerInfo_t *
98
+ pfn_clGetLayerInfo ;
99
+
100
+ typedef clInitLayer_t *
101
+ pfn_clInitLayer ;
102
+
103
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
104
+
105
+ extern CL_API_ENTRY cl_int CL_API_CALL
106
+ clGetLayerInfo(
107
+ cl_layer_info param_name,
108
+ size_t param_value_size,
109
+ void* param_value,
110
+ size_t* param_value_size_ret) ;
111
+
112
+ extern CL_API_ENTRY cl_int CL_API_CALL
113
+ clInitLayer(
114
+ cl_uint num_entries,
115
+ const cl_icd_dispatch* target_dispatch,
116
+ cl_uint* num_entries_ret,
117
+ const cl_icd_dispatch** layer_dispatch_ret) ;
118
+
119
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
120
+
121
+ #ifdef __cplusplus
122
+ }
123
+ #endif
124
+
125
+ #endif /* OPENCL_CL_LAYER_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_platform.h ADDED
@@ -0,0 +1,1407 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef __CL_PLATFORM_H
18
+ #define __CL_PLATFORM_H
19
+
20
+ #include <CL/cl_version.h>
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ #if defined(_WIN32)
27
+ #if !defined(CL_API_ENTRY)
28
+ #define CL_API_ENTRY
29
+ #endif
30
+ #if !defined(CL_API_CALL)
31
+ #define CL_API_CALL __stdcall
32
+ #endif
33
+ #if !defined(CL_CALLBACK)
34
+ #define CL_CALLBACK __stdcall
35
+ #endif
36
+ #else
37
+ #if !defined(CL_API_ENTRY)
38
+ #define CL_API_ENTRY
39
+ #endif
40
+ #if !defined(CL_API_CALL)
41
+ #define CL_API_CALL
42
+ #endif
43
+ #if !defined(CL_CALLBACK)
44
+ #define CL_CALLBACK
45
+ #endif
46
+ #endif
47
+
48
+ /*
49
+ * Deprecation flags refer to the last version of the header in which the
50
+ * feature was not deprecated.
51
+ *
52
+ * E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without
53
+ * deprecation but is deprecated in versions later than 1.1.
54
+ */
55
+
56
+ #ifndef CL_API_SUFFIX_USER
57
+ #define CL_API_SUFFIX_USER
58
+ #endif
59
+
60
+ #ifndef CL_API_PREFIX_USER
61
+ #define CL_API_PREFIX_USER
62
+ #endif
63
+
64
+ #define CL_API_SUFFIX_COMMON CL_API_SUFFIX_USER
65
+ #define CL_API_PREFIX_COMMON CL_API_PREFIX_USER
66
+
67
+ #define CL_API_SUFFIX__VERSION_1_0 CL_API_SUFFIX_COMMON
68
+ #define CL_API_SUFFIX__VERSION_1_1 CL_API_SUFFIX_COMMON
69
+ #define CL_API_SUFFIX__VERSION_1_2 CL_API_SUFFIX_COMMON
70
+ #define CL_API_SUFFIX__VERSION_2_0 CL_API_SUFFIX_COMMON
71
+ #define CL_API_SUFFIX__VERSION_2_1 CL_API_SUFFIX_COMMON
72
+ #define CL_API_SUFFIX__VERSION_2_2 CL_API_SUFFIX_COMMON
73
+ #define CL_API_SUFFIX__VERSION_3_0 CL_API_SUFFIX_COMMON
74
+ #define CL_API_SUFFIX__EXPERIMENTAL CL_API_SUFFIX_COMMON
75
+
76
+
77
+ #ifdef __GNUC__
78
+ #define CL_API_SUFFIX_DEPRECATED __attribute__((deprecated))
79
+ #define CL_API_PREFIX_DEPRECATED
80
+ #elif defined(_MSC_VER) && !defined(__clang__)
81
+ #define CL_API_SUFFIX_DEPRECATED
82
+ #define CL_API_PREFIX_DEPRECATED __declspec(deprecated)
83
+ #else
84
+ #define CL_API_SUFFIX_DEPRECATED
85
+ #define CL_API_PREFIX_DEPRECATED
86
+ #endif
87
+
88
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
89
+ #define CL_API_SUFFIX__VERSION_1_0_DEPRECATED CL_API_SUFFIX_COMMON
90
+ #define CL_API_PREFIX__VERSION_1_0_DEPRECATED CL_API_PREFIX_COMMON
91
+ #else
92
+ #define CL_API_SUFFIX__VERSION_1_0_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
93
+ #define CL_API_PREFIX__VERSION_1_0_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
94
+ #endif
95
+
96
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
97
+ #define CL_API_SUFFIX__VERSION_1_1_DEPRECATED CL_API_SUFFIX_COMMON
98
+ #define CL_API_PREFIX__VERSION_1_1_DEPRECATED CL_API_PREFIX_COMMON
99
+ #else
100
+ #define CL_API_SUFFIX__VERSION_1_1_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
101
+ #define CL_API_PREFIX__VERSION_1_1_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
102
+ #endif
103
+
104
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
105
+ #define CL_API_SUFFIX__VERSION_1_2_DEPRECATED CL_API_SUFFIX_COMMON
106
+ #define CL_API_PREFIX__VERSION_1_2_DEPRECATED CL_API_PREFIX_COMMON
107
+ #else
108
+ #define CL_API_SUFFIX__VERSION_1_2_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
109
+ #define CL_API_PREFIX__VERSION_1_2_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
110
+ #endif
111
+
112
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
113
+ #define CL_API_SUFFIX__VERSION_2_0_DEPRECATED CL_API_SUFFIX_COMMON
114
+ #define CL_API_PREFIX__VERSION_2_0_DEPRECATED CL_API_PREFIX_COMMON
115
+ #else
116
+ #define CL_API_SUFFIX__VERSION_2_0_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
117
+ #define CL_API_PREFIX__VERSION_2_0_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
118
+ #endif
119
+
120
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
121
+ #define CL_API_SUFFIX__VERSION_2_1_DEPRECATED CL_API_SUFFIX_COMMON
122
+ #define CL_API_PREFIX__VERSION_2_1_DEPRECATED CL_API_PREFIX_COMMON
123
+ #else
124
+ #define CL_API_SUFFIX__VERSION_2_1_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
125
+ #define CL_API_PREFIX__VERSION_2_1_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
126
+ #endif
127
+
128
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_2_APIS
129
+ #define CL_API_SUFFIX__VERSION_2_2_DEPRECATED CL_API_SUFFIX_COMMON
130
+ #define CL_API_PREFIX__VERSION_2_2_DEPRECATED CL_API_PREFIX_COMMON
131
+ #else
132
+ #define CL_API_SUFFIX__VERSION_2_2_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
133
+ #define CL_API_PREFIX__VERSION_2_2_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
134
+ #endif
135
+
136
+ #if (defined (_WIN32) && defined(_MSC_VER))
137
+
138
+ #if defined(__clang__)
139
+ #pragma clang diagnostic push
140
+ #pragma clang diagnostic ignored "-Wlanguage-extension-token"
141
+ #endif
142
+
143
+ /* intptr_t is used in cl.h and provided by stddef.h in Visual C++, but not in clang */
144
+ /* stdint.h was missing before Visual Studio 2010, include it for later versions and for clang */
145
+ #if defined(__clang__) || _MSC_VER >= 1600
146
+ #include <stdint.h>
147
+ #endif
148
+
149
+ /* scalar types */
150
+ typedef signed __int8 cl_char;
151
+ typedef unsigned __int8 cl_uchar;
152
+ typedef signed __int16 cl_short;
153
+ typedef unsigned __int16 cl_ushort;
154
+ typedef signed __int32 cl_int;
155
+ typedef unsigned __int32 cl_uint;
156
+ typedef signed __int64 cl_long;
157
+ typedef unsigned __int64 cl_ulong;
158
+
159
+ typedef unsigned __int16 cl_half;
160
+ typedef float cl_float;
161
+ typedef double cl_double;
162
+
163
+ #if defined(__clang__)
164
+ #pragma clang diagnostic pop
165
+ #endif
166
+
167
+ /* Macro names and corresponding values defined by OpenCL */
168
+ #define CL_CHAR_BIT 8
169
+ #define CL_SCHAR_MAX 127
170
+ #define CL_SCHAR_MIN (-127-1)
171
+ #define CL_CHAR_MAX CL_SCHAR_MAX
172
+ #define CL_CHAR_MIN CL_SCHAR_MIN
173
+ #define CL_UCHAR_MAX 255
174
+ #define CL_SHRT_MAX 32767
175
+ #define CL_SHRT_MIN (-32767-1)
176
+ #define CL_USHRT_MAX 65535
177
+ #define CL_INT_MAX 2147483647
178
+ #define CL_INT_MIN (-2147483647-1)
179
+ #define CL_UINT_MAX 0xffffffffU
180
+ #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
181
+ #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
182
+ #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
183
+
184
+ #define CL_FLT_DIG 6
185
+ #define CL_FLT_MANT_DIG 24
186
+ #define CL_FLT_MAX_10_EXP +38
187
+ #define CL_FLT_MAX_EXP +128
188
+ #define CL_FLT_MIN_10_EXP -37
189
+ #define CL_FLT_MIN_EXP -125
190
+ #define CL_FLT_RADIX 2
191
+ #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
192
+ #define CL_FLT_MIN 1.175494350822287507969e-38f
193
+ #define CL_FLT_EPSILON 1.1920928955078125e-7f
194
+
195
+ #define CL_HALF_DIG 3
196
+ #define CL_HALF_MANT_DIG 11
197
+ #define CL_HALF_MAX_10_EXP +4
198
+ #define CL_HALF_MAX_EXP +16
199
+ #define CL_HALF_MIN_10_EXP -4
200
+ #define CL_HALF_MIN_EXP -13
201
+ #define CL_HALF_RADIX 2
202
+ #define CL_HALF_MAX 65504.0f
203
+ #define CL_HALF_MIN 6.103515625e-05f
204
+ #define CL_HALF_EPSILON 9.765625e-04f
205
+
206
+ #define CL_DBL_DIG 15
207
+ #define CL_DBL_MANT_DIG 53
208
+ #define CL_DBL_MAX_10_EXP +308
209
+ #define CL_DBL_MAX_EXP +1024
210
+ #define CL_DBL_MIN_10_EXP -307
211
+ #define CL_DBL_MIN_EXP -1021
212
+ #define CL_DBL_RADIX 2
213
+ #define CL_DBL_MAX 1.7976931348623158e+308
214
+ #define CL_DBL_MIN 2.225073858507201383090e-308
215
+ #define CL_DBL_EPSILON 2.220446049250313080847e-16
216
+
217
+ #define CL_M_E 2.7182818284590452354
218
+ #define CL_M_LOG2E 1.4426950408889634074
219
+ #define CL_M_LOG10E 0.43429448190325182765
220
+ #define CL_M_LN2 0.69314718055994530942
221
+ #define CL_M_LN10 2.30258509299404568402
222
+ #define CL_M_PI 3.14159265358979323846
223
+ #define CL_M_PI_2 1.57079632679489661923
224
+ #define CL_M_PI_4 0.78539816339744830962
225
+ #define CL_M_1_PI 0.31830988618379067154
226
+ #define CL_M_2_PI 0.63661977236758134308
227
+ #define CL_M_2_SQRTPI 1.12837916709551257390
228
+ #define CL_M_SQRT2 1.41421356237309504880
229
+ #define CL_M_SQRT1_2 0.70710678118654752440
230
+
231
+ #define CL_M_E_F 2.718281828f
232
+ #define CL_M_LOG2E_F 1.442695041f
233
+ #define CL_M_LOG10E_F 0.434294482f
234
+ #define CL_M_LN2_F 0.693147181f
235
+ #define CL_M_LN10_F 2.302585093f
236
+ #define CL_M_PI_F 3.141592654f
237
+ #define CL_M_PI_2_F 1.570796327f
238
+ #define CL_M_PI_4_F 0.785398163f
239
+ #define CL_M_1_PI_F 0.318309886f
240
+ #define CL_M_2_PI_F 0.636619772f
241
+ #define CL_M_2_SQRTPI_F 1.128379167f
242
+ #define CL_M_SQRT2_F 1.414213562f
243
+ #define CL_M_SQRT1_2_F 0.707106781f
244
+
245
+ #define CL_NAN (CL_INFINITY - CL_INFINITY)
246
+ #define CL_HUGE_VALF ((cl_float) 1e50)
247
+ #define CL_HUGE_VAL ((cl_double) 1e500)
248
+ #define CL_MAXFLOAT CL_FLT_MAX
249
+ #define CL_INFINITY CL_HUGE_VALF
250
+
251
+ #else
252
+
253
+ #include <stdint.h>
254
+
255
+ /* scalar types */
256
+ typedef int8_t cl_char;
257
+ typedef uint8_t cl_uchar;
258
+ typedef int16_t cl_short;
259
+ typedef uint16_t cl_ushort;
260
+ typedef int32_t cl_int;
261
+ typedef uint32_t cl_uint;
262
+ typedef int64_t cl_long;
263
+ typedef uint64_t cl_ulong;
264
+
265
+ typedef uint16_t cl_half;
266
+ typedef float cl_float;
267
+ typedef double cl_double;
268
+
269
+ /* Macro names and corresponding values defined by OpenCL */
270
+ #define CL_CHAR_BIT 8
271
+ #define CL_SCHAR_MAX 127
272
+ #define CL_SCHAR_MIN (-127-1)
273
+ #define CL_CHAR_MAX CL_SCHAR_MAX
274
+ #define CL_CHAR_MIN CL_SCHAR_MIN
275
+ #define CL_UCHAR_MAX 255
276
+ #define CL_SHRT_MAX 32767
277
+ #define CL_SHRT_MIN (-32767-1)
278
+ #define CL_USHRT_MAX 65535
279
+ #define CL_INT_MAX 2147483647
280
+ #define CL_INT_MIN (-2147483647-1)
281
+ #define CL_UINT_MAX 0xffffffffU
282
+ #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
283
+ #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
284
+ #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
285
+
286
+ #define CL_FLT_DIG 6
287
+ #define CL_FLT_MANT_DIG 24
288
+ #define CL_FLT_MAX_10_EXP +38
289
+ #define CL_FLT_MAX_EXP +128
290
+ #define CL_FLT_MIN_10_EXP -37
291
+ #define CL_FLT_MIN_EXP -125
292
+ #define CL_FLT_RADIX 2
293
+ #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
294
+ #define CL_FLT_MIN 1.175494350822287507969e-38f
295
+ #define CL_FLT_EPSILON 1.1920928955078125e-7f
296
+
297
+ #define CL_HALF_DIG 3
298
+ #define CL_HALF_MANT_DIG 11
299
+ #define CL_HALF_MAX_10_EXP +4
300
+ #define CL_HALF_MAX_EXP +16
301
+ #define CL_HALF_MIN_10_EXP -4
302
+ #define CL_HALF_MIN_EXP -13
303
+ #define CL_HALF_RADIX 2
304
+ #define CL_HALF_MAX 65504.0f
305
+ #define CL_HALF_MIN 6.103515625e-05f
306
+ #define CL_HALF_EPSILON 9.765625e-04f
307
+
308
+ #define CL_DBL_DIG 15
309
+ #define CL_DBL_MANT_DIG 53
310
+ #define CL_DBL_MAX_10_EXP +308
311
+ #define CL_DBL_MAX_EXP +1024
312
+ #define CL_DBL_MIN_10_EXP -307
313
+ #define CL_DBL_MIN_EXP -1021
314
+ #define CL_DBL_RADIX 2
315
+ #define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
316
+ #define CL_DBL_MIN 2.225073858507201383090e-308
317
+ #define CL_DBL_EPSILON 2.220446049250313080847e-16
318
+
319
+ #define CL_M_E 2.7182818284590452354
320
+ #define CL_M_LOG2E 1.4426950408889634074
321
+ #define CL_M_LOG10E 0.43429448190325182765
322
+ #define CL_M_LN2 0.69314718055994530942
323
+ #define CL_M_LN10 2.30258509299404568402
324
+ #define CL_M_PI 3.14159265358979323846
325
+ #define CL_M_PI_2 1.57079632679489661923
326
+ #define CL_M_PI_4 0.78539816339744830962
327
+ #define CL_M_1_PI 0.31830988618379067154
328
+ #define CL_M_2_PI 0.63661977236758134308
329
+ #define CL_M_2_SQRTPI 1.12837916709551257390
330
+ #define CL_M_SQRT2 1.41421356237309504880
331
+ #define CL_M_SQRT1_2 0.70710678118654752440
332
+
333
+ #define CL_M_E_F 2.718281828f
334
+ #define CL_M_LOG2E_F 1.442695041f
335
+ #define CL_M_LOG10E_F 0.434294482f
336
+ #define CL_M_LN2_F 0.693147181f
337
+ #define CL_M_LN10_F 2.302585093f
338
+ #define CL_M_PI_F 3.141592654f
339
+ #define CL_M_PI_2_F 1.570796327f
340
+ #define CL_M_PI_4_F 0.785398163f
341
+ #define CL_M_1_PI_F 0.318309886f
342
+ #define CL_M_2_PI_F 0.636619772f
343
+ #define CL_M_2_SQRTPI_F 1.128379167f
344
+ #define CL_M_SQRT2_F 1.414213562f
345
+ #define CL_M_SQRT1_2_F 0.707106781f
346
+
347
+ #if defined( __GNUC__ )
348
+ #define CL_HUGE_VALF __builtin_huge_valf()
349
+ #define CL_HUGE_VAL __builtin_huge_val()
350
+ #define CL_NAN __builtin_nanf( "" )
351
+ #else
352
+ #define CL_HUGE_VALF ((cl_float) 1e50)
353
+ #define CL_HUGE_VAL ((cl_double) 1e500)
354
+ float nanf( const char * );
355
+ #define CL_NAN nanf( "" )
356
+ #endif
357
+ #define CL_MAXFLOAT CL_FLT_MAX
358
+ #define CL_INFINITY CL_HUGE_VALF
359
+
360
+ #endif
361
+
362
+ #include <stddef.h>
363
+
364
+ /*
365
+ * Vector types
366
+ *
367
+ * Note: OpenCL requires that all types be naturally aligned.
368
+ * This means that vector types must be naturally aligned.
369
+ * For example, a vector of four floats must be aligned to
370
+ * a 16 byte boundary (calculated as 4 * the natural 4-byte
371
+ * alignment of the float). The alignment qualifiers here
372
+ * will only function properly if your compiler supports them
373
+ * and if you don't actively work to defeat them. For example,
374
+ * in order for a cl_float4 to be 16 byte aligned in a struct,
375
+ * the start of the struct must itself be 16-byte aligned.
376
+ *
377
+ * Maintaining proper alignment is the user's responsibility.
378
+ */
379
+
380
+ /* Define basic vector types */
381
+ #if defined( __VEC__ )
382
+ #if !defined(__clang__)
383
+ #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
384
+ #endif
385
+ typedef __vector unsigned char __cl_uchar16;
386
+ typedef __vector signed char __cl_char16;
387
+ typedef __vector unsigned short __cl_ushort8;
388
+ typedef __vector signed short __cl_short8;
389
+ typedef __vector unsigned int __cl_uint4;
390
+ typedef __vector signed int __cl_int4;
391
+ typedef __vector float __cl_float4;
392
+ #define __CL_UCHAR16__ 1
393
+ #define __CL_CHAR16__ 1
394
+ #define __CL_USHORT8__ 1
395
+ #define __CL_SHORT8__ 1
396
+ #define __CL_UINT4__ 1
397
+ #define __CL_INT4__ 1
398
+ #define __CL_FLOAT4__ 1
399
+ #endif
400
+
401
+ #if defined( __SSE__ )
402
+ #if defined( __MINGW64__ )
403
+ #include <intrin.h>
404
+ #else
405
+ #include <xmmintrin.h>
406
+ #endif
407
+ #if defined( __GNUC__ )
408
+ typedef float __cl_float4 __attribute__((vector_size(16)));
409
+ #else
410
+ typedef __m128 __cl_float4;
411
+ #endif
412
+ #define __CL_FLOAT4__ 1
413
+ #endif
414
+
415
+ #if defined( __SSE2__ )
416
+ #if defined( __MINGW64__ )
417
+ #include <intrin.h>
418
+ #else
419
+ #include <emmintrin.h>
420
+ #endif
421
+ #if defined( __GNUC__ )
422
+ typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
423
+ typedef cl_char __cl_char16 __attribute__((vector_size(16)));
424
+ typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
425
+ typedef cl_short __cl_short8 __attribute__((vector_size(16)));
426
+ typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));
427
+ typedef cl_int __cl_int4 __attribute__((vector_size(16)));
428
+ typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));
429
+ typedef cl_long __cl_long2 __attribute__((vector_size(16)));
430
+ typedef cl_double __cl_double2 __attribute__((vector_size(16)));
431
+ #else
432
+ typedef __m128i __cl_uchar16;
433
+ typedef __m128i __cl_char16;
434
+ typedef __m128i __cl_ushort8;
435
+ typedef __m128i __cl_short8;
436
+ typedef __m128i __cl_uint4;
437
+ typedef __m128i __cl_int4;
438
+ typedef __m128i __cl_ulong2;
439
+ typedef __m128i __cl_long2;
440
+ typedef __m128d __cl_double2;
441
+ #endif
442
+ #define __CL_UCHAR16__ 1
443
+ #define __CL_CHAR16__ 1
444
+ #define __CL_USHORT8__ 1
445
+ #define __CL_SHORT8__ 1
446
+ #define __CL_INT4__ 1
447
+ #define __CL_UINT4__ 1
448
+ #define __CL_ULONG2__ 1
449
+ #define __CL_LONG2__ 1
450
+ #define __CL_DOUBLE2__ 1
451
+ #endif
452
+
453
+ #if defined( __MMX__ )
454
+ #include <mmintrin.h>
455
+ #if defined( __GNUC__ )
456
+ typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
457
+ typedef cl_char __cl_char8 __attribute__((vector_size(8)));
458
+ typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
459
+ typedef cl_short __cl_short4 __attribute__((vector_size(8)));
460
+ typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));
461
+ typedef cl_int __cl_int2 __attribute__((vector_size(8)));
462
+ typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));
463
+ typedef cl_long __cl_long1 __attribute__((vector_size(8)));
464
+ typedef cl_float __cl_float2 __attribute__((vector_size(8)));
465
+ #else
466
+ typedef __m64 __cl_uchar8;
467
+ typedef __m64 __cl_char8;
468
+ typedef __m64 __cl_ushort4;
469
+ typedef __m64 __cl_short4;
470
+ typedef __m64 __cl_uint2;
471
+ typedef __m64 __cl_int2;
472
+ typedef __m64 __cl_ulong1;
473
+ typedef __m64 __cl_long1;
474
+ typedef __m64 __cl_float2;
475
+ #endif
476
+ #define __CL_UCHAR8__ 1
477
+ #define __CL_CHAR8__ 1
478
+ #define __CL_USHORT4__ 1
479
+ #define __CL_SHORT4__ 1
480
+ #define __CL_INT2__ 1
481
+ #define __CL_UINT2__ 1
482
+ #define __CL_ULONG1__ 1
483
+ #define __CL_LONG1__ 1
484
+ #define __CL_FLOAT2__ 1
485
+ #endif
486
+
487
+ #if defined( __AVX__ )
488
+ #if defined( __MINGW64__ )
489
+ #include <intrin.h>
490
+ #else
491
+ #include <immintrin.h>
492
+ #endif
493
+ #if defined( __GNUC__ )
494
+ typedef cl_float __cl_float8 __attribute__((vector_size(32)));
495
+ typedef cl_double __cl_double4 __attribute__((vector_size(32)));
496
+ #else
497
+ typedef __m256 __cl_float8;
498
+ typedef __m256d __cl_double4;
499
+ #endif
500
+ #define __CL_FLOAT8__ 1
501
+ #define __CL_DOUBLE4__ 1
502
+ #endif
503
+
504
+ /* Define capabilities for anonymous struct members. */
505
+ #if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
506
+ #define __CL_HAS_ANON_STRUCT__ 1
507
+ #define __CL_ANON_STRUCT__
508
+ #elif defined(_WIN32) && defined(_MSC_VER) && !defined(__STDC__)
509
+ #define __CL_HAS_ANON_STRUCT__ 1
510
+ #define __CL_ANON_STRUCT__
511
+ #elif defined(__GNUC__) && ! defined(__STRICT_ANSI__)
512
+ #define __CL_HAS_ANON_STRUCT__ 1
513
+ #define __CL_ANON_STRUCT__ __extension__
514
+ #elif defined(__clang__)
515
+ #define __CL_HAS_ANON_STRUCT__ 1
516
+ #define __CL_ANON_STRUCT__ __extension__
517
+ #else
518
+ #define __CL_HAS_ANON_STRUCT__ 0
519
+ #define __CL_ANON_STRUCT__
520
+ #endif
521
+
522
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
523
+ /* Disable warning C4201: nonstandard extension used : nameless struct/union */
524
+ #pragma warning( push )
525
+ #pragma warning( disable : 4201 )
526
+ #endif
527
+
528
+ /* Define alignment keys */
529
+ #if defined( __GNUC__ ) || defined(__INTEGRITY)
530
+ #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
531
+ #elif defined( _WIN32) && (_MSC_VER)
532
+ /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
533
+ /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
534
+ /* #include <crtdefs.h> */
535
+ /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
536
+ #define CL_ALIGNED(_x)
537
+ #else
538
+ #warning Need to implement some method to align data here
539
+ #define CL_ALIGNED(_x)
540
+ #endif
541
+
542
+ /* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
543
+ #if __CL_HAS_ANON_STRUCT__
544
+ /* .xyzw and .s0123...{f|F} are supported */
545
+ #define CL_HAS_NAMED_VECTOR_FIELDS 1
546
+ /* .hi and .lo are supported */
547
+ #define CL_HAS_HI_LO_VECTOR_FIELDS 1
548
+ #endif
549
+
550
+ /* Define cl_vector types */
551
+
552
+ /* ---- cl_charn ---- */
553
+ typedef union
554
+ {
555
+ cl_char CL_ALIGNED(2) s[2];
556
+ #if __CL_HAS_ANON_STRUCT__
557
+ __CL_ANON_STRUCT__ struct{ cl_char x, y; };
558
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1; };
559
+ __CL_ANON_STRUCT__ struct{ cl_char lo, hi; };
560
+ #endif
561
+ #if defined( __CL_CHAR2__)
562
+ __cl_char2 v2;
563
+ #endif
564
+ }cl_char2;
565
+
566
+ typedef union
567
+ {
568
+ cl_char CL_ALIGNED(4) s[4];
569
+ #if __CL_HAS_ANON_STRUCT__
570
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
571
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; };
572
+ __CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; };
573
+ #endif
574
+ #if defined( __CL_CHAR2__)
575
+ __cl_char2 v2[2];
576
+ #endif
577
+ #if defined( __CL_CHAR4__)
578
+ __cl_char4 v4;
579
+ #endif
580
+ }cl_char4;
581
+
582
+ /* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
583
+ typedef cl_char4 cl_char3;
584
+
585
+ typedef union
586
+ {
587
+ cl_char CL_ALIGNED(8) s[8];
588
+ #if __CL_HAS_ANON_STRUCT__
589
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
590
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
591
+ __CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; };
592
+ #endif
593
+ #if defined( __CL_CHAR2__)
594
+ __cl_char2 v2[4];
595
+ #endif
596
+ #if defined( __CL_CHAR4__)
597
+ __cl_char4 v4[2];
598
+ #endif
599
+ #if defined( __CL_CHAR8__ )
600
+ __cl_char8 v8;
601
+ #endif
602
+ }cl_char8;
603
+
604
+ typedef union
605
+ {
606
+ cl_char CL_ALIGNED(16) s[16];
607
+ #if __CL_HAS_ANON_STRUCT__
608
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
609
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
610
+ __CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; };
611
+ #endif
612
+ #if defined( __CL_CHAR2__)
613
+ __cl_char2 v2[8];
614
+ #endif
615
+ #if defined( __CL_CHAR4__)
616
+ __cl_char4 v4[4];
617
+ #endif
618
+ #if defined( __CL_CHAR8__ )
619
+ __cl_char8 v8[2];
620
+ #endif
621
+ #if defined( __CL_CHAR16__ )
622
+ __cl_char16 v16;
623
+ #endif
624
+ }cl_char16;
625
+
626
+
627
+ /* ---- cl_ucharn ---- */
628
+ typedef union
629
+ {
630
+ cl_uchar CL_ALIGNED(2) s[2];
631
+ #if __CL_HAS_ANON_STRUCT__
632
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y; };
633
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; };
634
+ __CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; };
635
+ #endif
636
+ #if defined( __cl_uchar2__)
637
+ __cl_uchar2 v2;
638
+ #endif
639
+ }cl_uchar2;
640
+
641
+ typedef union
642
+ {
643
+ cl_uchar CL_ALIGNED(4) s[4];
644
+ #if __CL_HAS_ANON_STRUCT__
645
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
646
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; };
647
+ __CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; };
648
+ #endif
649
+ #if defined( __CL_UCHAR2__)
650
+ __cl_uchar2 v2[2];
651
+ #endif
652
+ #if defined( __CL_UCHAR4__)
653
+ __cl_uchar4 v4;
654
+ #endif
655
+ }cl_uchar4;
656
+
657
+ /* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
658
+ typedef cl_uchar4 cl_uchar3;
659
+
660
+ typedef union
661
+ {
662
+ cl_uchar CL_ALIGNED(8) s[8];
663
+ #if __CL_HAS_ANON_STRUCT__
664
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
665
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
666
+ __CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; };
667
+ #endif
668
+ #if defined( __CL_UCHAR2__)
669
+ __cl_uchar2 v2[4];
670
+ #endif
671
+ #if defined( __CL_UCHAR4__)
672
+ __cl_uchar4 v4[2];
673
+ #endif
674
+ #if defined( __CL_UCHAR8__ )
675
+ __cl_uchar8 v8;
676
+ #endif
677
+ }cl_uchar8;
678
+
679
+ typedef union
680
+ {
681
+ cl_uchar CL_ALIGNED(16) s[16];
682
+ #if __CL_HAS_ANON_STRUCT__
683
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
684
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
685
+ __CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; };
686
+ #endif
687
+ #if defined( __CL_UCHAR2__)
688
+ __cl_uchar2 v2[8];
689
+ #endif
690
+ #if defined( __CL_UCHAR4__)
691
+ __cl_uchar4 v4[4];
692
+ #endif
693
+ #if defined( __CL_UCHAR8__ )
694
+ __cl_uchar8 v8[2];
695
+ #endif
696
+ #if defined( __CL_UCHAR16__ )
697
+ __cl_uchar16 v16;
698
+ #endif
699
+ }cl_uchar16;
700
+
701
+
702
+ /* ---- cl_shortn ---- */
703
+ typedef union
704
+ {
705
+ cl_short CL_ALIGNED(4) s[2];
706
+ #if __CL_HAS_ANON_STRUCT__
707
+ __CL_ANON_STRUCT__ struct{ cl_short x, y; };
708
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1; };
709
+ __CL_ANON_STRUCT__ struct{ cl_short lo, hi; };
710
+ #endif
711
+ #if defined( __CL_SHORT2__)
712
+ __cl_short2 v2;
713
+ #endif
714
+ }cl_short2;
715
+
716
+ typedef union
717
+ {
718
+ cl_short CL_ALIGNED(8) s[4];
719
+ #if __CL_HAS_ANON_STRUCT__
720
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
721
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; };
722
+ __CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; };
723
+ #endif
724
+ #if defined( __CL_SHORT2__)
725
+ __cl_short2 v2[2];
726
+ #endif
727
+ #if defined( __CL_SHORT4__)
728
+ __cl_short4 v4;
729
+ #endif
730
+ }cl_short4;
731
+
732
+ /* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
733
+ typedef cl_short4 cl_short3;
734
+
735
+ typedef union
736
+ {
737
+ cl_short CL_ALIGNED(16) s[8];
738
+ #if __CL_HAS_ANON_STRUCT__
739
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
740
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
741
+ __CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; };
742
+ #endif
743
+ #if defined( __CL_SHORT2__)
744
+ __cl_short2 v2[4];
745
+ #endif
746
+ #if defined( __CL_SHORT4__)
747
+ __cl_short4 v4[2];
748
+ #endif
749
+ #if defined( __CL_SHORT8__ )
750
+ __cl_short8 v8;
751
+ #endif
752
+ }cl_short8;
753
+
754
+ typedef union
755
+ {
756
+ cl_short CL_ALIGNED(32) s[16];
757
+ #if __CL_HAS_ANON_STRUCT__
758
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
759
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
760
+ __CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; };
761
+ #endif
762
+ #if defined( __CL_SHORT2__)
763
+ __cl_short2 v2[8];
764
+ #endif
765
+ #if defined( __CL_SHORT4__)
766
+ __cl_short4 v4[4];
767
+ #endif
768
+ #if defined( __CL_SHORT8__ )
769
+ __cl_short8 v8[2];
770
+ #endif
771
+ #if defined( __CL_SHORT16__ )
772
+ __cl_short16 v16;
773
+ #endif
774
+ }cl_short16;
775
+
776
+
777
+ /* ---- cl_ushortn ---- */
778
+ typedef union
779
+ {
780
+ cl_ushort CL_ALIGNED(4) s[2];
781
+ #if __CL_HAS_ANON_STRUCT__
782
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y; };
783
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; };
784
+ __CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; };
785
+ #endif
786
+ #if defined( __CL_USHORT2__)
787
+ __cl_ushort2 v2;
788
+ #endif
789
+ }cl_ushort2;
790
+
791
+ typedef union
792
+ {
793
+ cl_ushort CL_ALIGNED(8) s[4];
794
+ #if __CL_HAS_ANON_STRUCT__
795
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
796
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; };
797
+ __CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; };
798
+ #endif
799
+ #if defined( __CL_USHORT2__)
800
+ __cl_ushort2 v2[2];
801
+ #endif
802
+ #if defined( __CL_USHORT4__)
803
+ __cl_ushort4 v4;
804
+ #endif
805
+ }cl_ushort4;
806
+
807
+ /* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
808
+ typedef cl_ushort4 cl_ushort3;
809
+
810
+ typedef union
811
+ {
812
+ cl_ushort CL_ALIGNED(16) s[8];
813
+ #if __CL_HAS_ANON_STRUCT__
814
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
815
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
816
+ __CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; };
817
+ #endif
818
+ #if defined( __CL_USHORT2__)
819
+ __cl_ushort2 v2[4];
820
+ #endif
821
+ #if defined( __CL_USHORT4__)
822
+ __cl_ushort4 v4[2];
823
+ #endif
824
+ #if defined( __CL_USHORT8__ )
825
+ __cl_ushort8 v8;
826
+ #endif
827
+ }cl_ushort8;
828
+
829
+ typedef union
830
+ {
831
+ cl_ushort CL_ALIGNED(32) s[16];
832
+ #if __CL_HAS_ANON_STRUCT__
833
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
834
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
835
+ __CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; };
836
+ #endif
837
+ #if defined( __CL_USHORT2__)
838
+ __cl_ushort2 v2[8];
839
+ #endif
840
+ #if defined( __CL_USHORT4__)
841
+ __cl_ushort4 v4[4];
842
+ #endif
843
+ #if defined( __CL_USHORT8__ )
844
+ __cl_ushort8 v8[2];
845
+ #endif
846
+ #if defined( __CL_USHORT16__ )
847
+ __cl_ushort16 v16;
848
+ #endif
849
+ }cl_ushort16;
850
+
851
+
852
+ /* ---- cl_halfn ---- */
853
+ typedef union
854
+ {
855
+ cl_half CL_ALIGNED(4) s[2];
856
+ #if __CL_HAS_ANON_STRUCT__
857
+ __CL_ANON_STRUCT__ struct{ cl_half x, y; };
858
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1; };
859
+ __CL_ANON_STRUCT__ struct{ cl_half lo, hi; };
860
+ #endif
861
+ #if defined( __CL_HALF2__)
862
+ __cl_half2 v2;
863
+ #endif
864
+ }cl_half2;
865
+
866
+ typedef union
867
+ {
868
+ cl_half CL_ALIGNED(8) s[4];
869
+ #if __CL_HAS_ANON_STRUCT__
870
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
871
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; };
872
+ __CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; };
873
+ #endif
874
+ #if defined( __CL_HALF2__)
875
+ __cl_half2 v2[2];
876
+ #endif
877
+ #if defined( __CL_HALF4__)
878
+ __cl_half4 v4;
879
+ #endif
880
+ }cl_half4;
881
+
882
+ /* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
883
+ typedef cl_half4 cl_half3;
884
+
885
+ typedef union
886
+ {
887
+ cl_half CL_ALIGNED(16) s[8];
888
+ #if __CL_HAS_ANON_STRUCT__
889
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
890
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; };
891
+ __CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; };
892
+ #endif
893
+ #if defined( __CL_HALF2__)
894
+ __cl_half2 v2[4];
895
+ #endif
896
+ #if defined( __CL_HALF4__)
897
+ __cl_half4 v4[2];
898
+ #endif
899
+ #if defined( __CL_HALF8__ )
900
+ __cl_half8 v8;
901
+ #endif
902
+ }cl_half8;
903
+
904
+ typedef union
905
+ {
906
+ cl_half CL_ALIGNED(32) s[16];
907
+ #if __CL_HAS_ANON_STRUCT__
908
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
909
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
910
+ __CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; };
911
+ #endif
912
+ #if defined( __CL_HALF2__)
913
+ __cl_half2 v2[8];
914
+ #endif
915
+ #if defined( __CL_HALF4__)
916
+ __cl_half4 v4[4];
917
+ #endif
918
+ #if defined( __CL_HALF8__ )
919
+ __cl_half8 v8[2];
920
+ #endif
921
+ #if defined( __CL_HALF16__ )
922
+ __cl_half16 v16;
923
+ #endif
924
+ }cl_half16;
925
+
926
+ /* ---- cl_intn ---- */
927
+ typedef union
928
+ {
929
+ cl_int CL_ALIGNED(8) s[2];
930
+ #if __CL_HAS_ANON_STRUCT__
931
+ __CL_ANON_STRUCT__ struct{ cl_int x, y; };
932
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1; };
933
+ __CL_ANON_STRUCT__ struct{ cl_int lo, hi; };
934
+ #endif
935
+ #if defined( __CL_INT2__)
936
+ __cl_int2 v2;
937
+ #endif
938
+ }cl_int2;
939
+
940
+ typedef union
941
+ {
942
+ cl_int CL_ALIGNED(16) s[4];
943
+ #if __CL_HAS_ANON_STRUCT__
944
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
945
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; };
946
+ __CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; };
947
+ #endif
948
+ #if defined( __CL_INT2__)
949
+ __cl_int2 v2[2];
950
+ #endif
951
+ #if defined( __CL_INT4__)
952
+ __cl_int4 v4;
953
+ #endif
954
+ }cl_int4;
955
+
956
+ /* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
957
+ typedef cl_int4 cl_int3;
958
+
959
+ typedef union
960
+ {
961
+ cl_int CL_ALIGNED(32) s[8];
962
+ #if __CL_HAS_ANON_STRUCT__
963
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
964
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
965
+ __CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; };
966
+ #endif
967
+ #if defined( __CL_INT2__)
968
+ __cl_int2 v2[4];
969
+ #endif
970
+ #if defined( __CL_INT4__)
971
+ __cl_int4 v4[2];
972
+ #endif
973
+ #if defined( __CL_INT8__ )
974
+ __cl_int8 v8;
975
+ #endif
976
+ }cl_int8;
977
+
978
+ typedef union
979
+ {
980
+ cl_int CL_ALIGNED(64) s[16];
981
+ #if __CL_HAS_ANON_STRUCT__
982
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
983
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
984
+ __CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; };
985
+ #endif
986
+ #if defined( __CL_INT2__)
987
+ __cl_int2 v2[8];
988
+ #endif
989
+ #if defined( __CL_INT4__)
990
+ __cl_int4 v4[4];
991
+ #endif
992
+ #if defined( __CL_INT8__ )
993
+ __cl_int8 v8[2];
994
+ #endif
995
+ #if defined( __CL_INT16__ )
996
+ __cl_int16 v16;
997
+ #endif
998
+ }cl_int16;
999
+
1000
+
1001
+ /* ---- cl_uintn ---- */
1002
+ typedef union
1003
+ {
1004
+ cl_uint CL_ALIGNED(8) s[2];
1005
+ #if __CL_HAS_ANON_STRUCT__
1006
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y; };
1007
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1; };
1008
+ __CL_ANON_STRUCT__ struct{ cl_uint lo, hi; };
1009
+ #endif
1010
+ #if defined( __CL_UINT2__)
1011
+ __cl_uint2 v2;
1012
+ #endif
1013
+ }cl_uint2;
1014
+
1015
+ typedef union
1016
+ {
1017
+ cl_uint CL_ALIGNED(16) s[4];
1018
+ #if __CL_HAS_ANON_STRUCT__
1019
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
1020
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; };
1021
+ __CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; };
1022
+ #endif
1023
+ #if defined( __CL_UINT2__)
1024
+ __cl_uint2 v2[2];
1025
+ #endif
1026
+ #if defined( __CL_UINT4__)
1027
+ __cl_uint4 v4;
1028
+ #endif
1029
+ }cl_uint4;
1030
+
1031
+ /* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
1032
+ typedef cl_uint4 cl_uint3;
1033
+
1034
+ typedef union
1035
+ {
1036
+ cl_uint CL_ALIGNED(32) s[8];
1037
+ #if __CL_HAS_ANON_STRUCT__
1038
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
1039
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
1040
+ __CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; };
1041
+ #endif
1042
+ #if defined( __CL_UINT2__)
1043
+ __cl_uint2 v2[4];
1044
+ #endif
1045
+ #if defined( __CL_UINT4__)
1046
+ __cl_uint4 v4[2];
1047
+ #endif
1048
+ #if defined( __CL_UINT8__ )
1049
+ __cl_uint8 v8;
1050
+ #endif
1051
+ }cl_uint8;
1052
+
1053
+ typedef union
1054
+ {
1055
+ cl_uint CL_ALIGNED(64) s[16];
1056
+ #if __CL_HAS_ANON_STRUCT__
1057
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1058
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1059
+ __CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; };
1060
+ #endif
1061
+ #if defined( __CL_UINT2__)
1062
+ __cl_uint2 v2[8];
1063
+ #endif
1064
+ #if defined( __CL_UINT4__)
1065
+ __cl_uint4 v4[4];
1066
+ #endif
1067
+ #if defined( __CL_UINT8__ )
1068
+ __cl_uint8 v8[2];
1069
+ #endif
1070
+ #if defined( __CL_UINT16__ )
1071
+ __cl_uint16 v16;
1072
+ #endif
1073
+ }cl_uint16;
1074
+
1075
+ /* ---- cl_longn ---- */
1076
+ typedef union
1077
+ {
1078
+ cl_long CL_ALIGNED(16) s[2];
1079
+ #if __CL_HAS_ANON_STRUCT__
1080
+ __CL_ANON_STRUCT__ struct{ cl_long x, y; };
1081
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1; };
1082
+ __CL_ANON_STRUCT__ struct{ cl_long lo, hi; };
1083
+ #endif
1084
+ #if defined( __CL_LONG2__)
1085
+ __cl_long2 v2;
1086
+ #endif
1087
+ }cl_long2;
1088
+
1089
+ typedef union
1090
+ {
1091
+ cl_long CL_ALIGNED(32) s[4];
1092
+ #if __CL_HAS_ANON_STRUCT__
1093
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
1094
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; };
1095
+ __CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; };
1096
+ #endif
1097
+ #if defined( __CL_LONG2__)
1098
+ __cl_long2 v2[2];
1099
+ #endif
1100
+ #if defined( __CL_LONG4__)
1101
+ __cl_long4 v4;
1102
+ #endif
1103
+ }cl_long4;
1104
+
1105
+ /* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
1106
+ typedef cl_long4 cl_long3;
1107
+
1108
+ typedef union
1109
+ {
1110
+ cl_long CL_ALIGNED(64) s[8];
1111
+ #if __CL_HAS_ANON_STRUCT__
1112
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
1113
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
1114
+ __CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; };
1115
+ #endif
1116
+ #if defined( __CL_LONG2__)
1117
+ __cl_long2 v2[4];
1118
+ #endif
1119
+ #if defined( __CL_LONG4__)
1120
+ __cl_long4 v4[2];
1121
+ #endif
1122
+ #if defined( __CL_LONG8__ )
1123
+ __cl_long8 v8;
1124
+ #endif
1125
+ }cl_long8;
1126
+
1127
+ typedef union
1128
+ {
1129
+ cl_long CL_ALIGNED(128) s[16];
1130
+ #if __CL_HAS_ANON_STRUCT__
1131
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1132
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1133
+ __CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; };
1134
+ #endif
1135
+ #if defined( __CL_LONG2__)
1136
+ __cl_long2 v2[8];
1137
+ #endif
1138
+ #if defined( __CL_LONG4__)
1139
+ __cl_long4 v4[4];
1140
+ #endif
1141
+ #if defined( __CL_LONG8__ )
1142
+ __cl_long8 v8[2];
1143
+ #endif
1144
+ #if defined( __CL_LONG16__ )
1145
+ __cl_long16 v16;
1146
+ #endif
1147
+ }cl_long16;
1148
+
1149
+
1150
+ /* ---- cl_ulongn ---- */
1151
+ typedef union
1152
+ {
1153
+ cl_ulong CL_ALIGNED(16) s[2];
1154
+ #if __CL_HAS_ANON_STRUCT__
1155
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y; };
1156
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; };
1157
+ __CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; };
1158
+ #endif
1159
+ #if defined( __CL_ULONG2__)
1160
+ __cl_ulong2 v2;
1161
+ #endif
1162
+ }cl_ulong2;
1163
+
1164
+ typedef union
1165
+ {
1166
+ cl_ulong CL_ALIGNED(32) s[4];
1167
+ #if __CL_HAS_ANON_STRUCT__
1168
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
1169
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; };
1170
+ __CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; };
1171
+ #endif
1172
+ #if defined( __CL_ULONG2__)
1173
+ __cl_ulong2 v2[2];
1174
+ #endif
1175
+ #if defined( __CL_ULONG4__)
1176
+ __cl_ulong4 v4;
1177
+ #endif
1178
+ }cl_ulong4;
1179
+
1180
+ /* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
1181
+ typedef cl_ulong4 cl_ulong3;
1182
+
1183
+ typedef union
1184
+ {
1185
+ cl_ulong CL_ALIGNED(64) s[8];
1186
+ #if __CL_HAS_ANON_STRUCT__
1187
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
1188
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
1189
+ __CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; };
1190
+ #endif
1191
+ #if defined( __CL_ULONG2__)
1192
+ __cl_ulong2 v2[4];
1193
+ #endif
1194
+ #if defined( __CL_ULONG4__)
1195
+ __cl_ulong4 v4[2];
1196
+ #endif
1197
+ #if defined( __CL_ULONG8__ )
1198
+ __cl_ulong8 v8;
1199
+ #endif
1200
+ }cl_ulong8;
1201
+
1202
+ typedef union
1203
+ {
1204
+ cl_ulong CL_ALIGNED(128) s[16];
1205
+ #if __CL_HAS_ANON_STRUCT__
1206
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1207
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1208
+ __CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; };
1209
+ #endif
1210
+ #if defined( __CL_ULONG2__)
1211
+ __cl_ulong2 v2[8];
1212
+ #endif
1213
+ #if defined( __CL_ULONG4__)
1214
+ __cl_ulong4 v4[4];
1215
+ #endif
1216
+ #if defined( __CL_ULONG8__ )
1217
+ __cl_ulong8 v8[2];
1218
+ #endif
1219
+ #if defined( __CL_ULONG16__ )
1220
+ __cl_ulong16 v16;
1221
+ #endif
1222
+ }cl_ulong16;
1223
+
1224
+
1225
+ /* --- cl_floatn ---- */
1226
+
1227
+ typedef union
1228
+ {
1229
+ cl_float CL_ALIGNED(8) s[2];
1230
+ #if __CL_HAS_ANON_STRUCT__
1231
+ __CL_ANON_STRUCT__ struct{ cl_float x, y; };
1232
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1; };
1233
+ __CL_ANON_STRUCT__ struct{ cl_float lo, hi; };
1234
+ #endif
1235
+ #if defined( __CL_FLOAT2__)
1236
+ __cl_float2 v2;
1237
+ #endif
1238
+ }cl_float2;
1239
+
1240
+ typedef union
1241
+ {
1242
+ cl_float CL_ALIGNED(16) s[4];
1243
+ #if __CL_HAS_ANON_STRUCT__
1244
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
1245
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; };
1246
+ __CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; };
1247
+ #endif
1248
+ #if defined( __CL_FLOAT2__)
1249
+ __cl_float2 v2[2];
1250
+ #endif
1251
+ #if defined( __CL_FLOAT4__)
1252
+ __cl_float4 v4;
1253
+ #endif
1254
+ }cl_float4;
1255
+
1256
+ /* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
1257
+ typedef cl_float4 cl_float3;
1258
+
1259
+ typedef union
1260
+ {
1261
+ cl_float CL_ALIGNED(32) s[8];
1262
+ #if __CL_HAS_ANON_STRUCT__
1263
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
1264
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
1265
+ __CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; };
1266
+ #endif
1267
+ #if defined( __CL_FLOAT2__)
1268
+ __cl_float2 v2[4];
1269
+ #endif
1270
+ #if defined( __CL_FLOAT4__)
1271
+ __cl_float4 v4[2];
1272
+ #endif
1273
+ #if defined( __CL_FLOAT8__ )
1274
+ __cl_float8 v8;
1275
+ #endif
1276
+ }cl_float8;
1277
+
1278
+ typedef union
1279
+ {
1280
+ cl_float CL_ALIGNED(64) s[16];
1281
+ #if __CL_HAS_ANON_STRUCT__
1282
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1283
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1284
+ __CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; };
1285
+ #endif
1286
+ #if defined( __CL_FLOAT2__)
1287
+ __cl_float2 v2[8];
1288
+ #endif
1289
+ #if defined( __CL_FLOAT4__)
1290
+ __cl_float4 v4[4];
1291
+ #endif
1292
+ #if defined( __CL_FLOAT8__ )
1293
+ __cl_float8 v8[2];
1294
+ #endif
1295
+ #if defined( __CL_FLOAT16__ )
1296
+ __cl_float16 v16;
1297
+ #endif
1298
+ }cl_float16;
1299
+
1300
+ /* --- cl_doublen ---- */
1301
+
1302
+ typedef union
1303
+ {
1304
+ cl_double CL_ALIGNED(16) s[2];
1305
+ #if __CL_HAS_ANON_STRUCT__
1306
+ __CL_ANON_STRUCT__ struct{ cl_double x, y; };
1307
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1; };
1308
+ __CL_ANON_STRUCT__ struct{ cl_double lo, hi; };
1309
+ #endif
1310
+ #if defined( __CL_DOUBLE2__)
1311
+ __cl_double2 v2;
1312
+ #endif
1313
+ }cl_double2;
1314
+
1315
+ typedef union
1316
+ {
1317
+ cl_double CL_ALIGNED(32) s[4];
1318
+ #if __CL_HAS_ANON_STRUCT__
1319
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
1320
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; };
1321
+ __CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; };
1322
+ #endif
1323
+ #if defined( __CL_DOUBLE2__)
1324
+ __cl_double2 v2[2];
1325
+ #endif
1326
+ #if defined( __CL_DOUBLE4__)
1327
+ __cl_double4 v4;
1328
+ #endif
1329
+ }cl_double4;
1330
+
1331
+ /* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
1332
+ typedef cl_double4 cl_double3;
1333
+
1334
+ typedef union
1335
+ {
1336
+ cl_double CL_ALIGNED(64) s[8];
1337
+ #if __CL_HAS_ANON_STRUCT__
1338
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
1339
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
1340
+ __CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; };
1341
+ #endif
1342
+ #if defined( __CL_DOUBLE2__)
1343
+ __cl_double2 v2[4];
1344
+ #endif
1345
+ #if defined( __CL_DOUBLE4__)
1346
+ __cl_double4 v4[2];
1347
+ #endif
1348
+ #if defined( __CL_DOUBLE8__ )
1349
+ __cl_double8 v8;
1350
+ #endif
1351
+ }cl_double8;
1352
+
1353
+ typedef union
1354
+ {
1355
+ cl_double CL_ALIGNED(128) s[16];
1356
+ #if __CL_HAS_ANON_STRUCT__
1357
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1358
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1359
+ __CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; };
1360
+ #endif
1361
+ #if defined( __CL_DOUBLE2__)
1362
+ __cl_double2 v2[8];
1363
+ #endif
1364
+ #if defined( __CL_DOUBLE4__)
1365
+ __cl_double4 v4[4];
1366
+ #endif
1367
+ #if defined( __CL_DOUBLE8__ )
1368
+ __cl_double8 v8[2];
1369
+ #endif
1370
+ #if defined( __CL_DOUBLE16__ )
1371
+ __cl_double16 v16;
1372
+ #endif
1373
+ }cl_double16;
1374
+
1375
+ /* Macro to facilitate debugging
1376
+ * Usage:
1377
+ * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
1378
+ * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
1379
+ * Each line thereafter of OpenCL C source must end with: \n\
1380
+ * The last line ends in ";
1381
+ *
1382
+ * Example:
1383
+ *
1384
+ * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
1385
+ * kernel void foo( int a, float * b ) \n\
1386
+ * { \n\
1387
+ * // my comment \n\
1388
+ * *b[ get_global_id(0)] = a; \n\
1389
+ * } \n\
1390
+ * ";
1391
+ *
1392
+ * This should correctly set up the line, (column) and file information for your source
1393
+ * string so you can do source level debugging.
1394
+ */
1395
+ #define __CL_STRINGIFY( _x ) # _x
1396
+ #define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
1397
+ #define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
1398
+
1399
+ #ifdef __cplusplus
1400
+ }
1401
+ #endif
1402
+
1403
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
1404
+ #pragma warning( pop )
1405
+ #endif
1406
+
1407
+ #endif /* __CL_PLATFORM_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_va_api_media_sharing_intel.h ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2023 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_
18
+ #define OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_
19
+
20
+ /*
21
+ ** This header is generated from the Khronos OpenCL XML API Registry.
22
+ */
23
+
24
+ #include <va/va.h>
25
+
26
+ #include <CL/cl.h>
27
+
28
+ /* CL_NO_PROTOTYPES implies CL_NO_EXTENSION_PROTOTYPES: */
29
+ #if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES)
30
+ #define CL_NO_EXTENSION_PROTOTYPES
31
+ #endif
32
+
33
+ /* CL_NO_EXTENSION_PROTOTYPES implies
34
+ CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES and
35
+ CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES: */
36
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
37
+ !defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES)
38
+ #define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES
39
+ #endif
40
+ #if defined(CL_NO_EXTENSION_PROTOTYPES) && \
41
+ !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
42
+ #define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES
43
+ #endif
44
+
45
+ #ifdef __cplusplus
46
+ extern "C" {
47
+ #endif
48
+
49
+ /***************************************************************
50
+ * cl_intel_sharing_format_query_va_api
51
+ ***************************************************************/
52
+ #define cl_intel_sharing_format_query_va_api 1
53
+ #define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_NAME \
54
+ "cl_intel_sharing_format_query_va_api"
55
+
56
+
57
+ #define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
58
+
59
+ /* when cl_intel_va_api_media_sharing is supported */
60
+
61
+ typedef cl_int CL_API_CALL
62
+ clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t(
63
+ cl_context context,
64
+ cl_mem_flags flags,
65
+ cl_mem_object_type image_type,
66
+ cl_uint plane,
67
+ cl_uint num_entries,
68
+ VAImageFormat* va_api_formats,
69
+ cl_uint* num_surface_formats);
70
+
71
+ typedef clGetSupportedVA_APIMediaSurfaceFormatsINTEL_t *
72
+ clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn ;
73
+
74
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
75
+
76
+ extern CL_API_ENTRY cl_int CL_API_CALL
77
+ clGetSupportedVA_APIMediaSurfaceFormatsINTEL(
78
+ cl_context context,
79
+ cl_mem_flags flags,
80
+ cl_mem_object_type image_type,
81
+ cl_uint plane,
82
+ cl_uint num_entries,
83
+ VAImageFormat* va_api_formats,
84
+ cl_uint* num_surface_formats) ;
85
+
86
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
87
+
88
+ /***************************************************************
89
+ * cl_intel_va_api_media_sharing
90
+ ***************************************************************/
91
+ #define cl_intel_va_api_media_sharing 1
92
+ #define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_NAME \
93
+ "cl_intel_va_api_media_sharing"
94
+
95
+
96
+ #define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_VERSION CL_MAKE_VERSION(0, 0, 0)
97
+
98
+ typedef cl_uint cl_va_api_device_source_intel;
99
+ typedef cl_uint cl_va_api_device_set_intel;
100
+
101
+ /* Error codes */
102
+ #define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
103
+ #define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
104
+ #define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
105
+ #define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
106
+
107
+ /* cl_va_api_device_source_intel */
108
+ #define CL_VA_API_DISPLAY_INTEL 0x4094
109
+
110
+ /* cl_va_api_device_set_intel */
111
+ #define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
112
+ #define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
113
+
114
+ /* cl_context_info */
115
+ #define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
116
+
117
+ /* cl_mem_info */
118
+ #define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
119
+
120
+ /* cl_image_info */
121
+ #define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
122
+
123
+ /* cl_command_type */
124
+ #define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
125
+ #define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
126
+
127
+
128
+ typedef cl_int CL_API_CALL
129
+ clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t(
130
+ cl_platform_id platform,
131
+ cl_va_api_device_source_intel media_adapter_type,
132
+ void* media_adapter,
133
+ cl_va_api_device_set_intel media_adapter_set,
134
+ cl_uint num_entries,
135
+ cl_device_id* devices,
136
+ cl_uint* num_devices);
137
+
138
+ typedef clGetDeviceIDsFromVA_APIMediaAdapterINTEL_t *
139
+ clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn CL_API_SUFFIX__VERSION_1_2;
140
+
141
+ typedef cl_mem CL_API_CALL
142
+ clCreateFromVA_APIMediaSurfaceINTEL_t(
143
+ cl_context context,
144
+ cl_mem_flags flags,
145
+ VASurfaceID* surface,
146
+ cl_uint plane,
147
+ cl_int* errcode_ret);
148
+
149
+ typedef clCreateFromVA_APIMediaSurfaceINTEL_t *
150
+ clCreateFromVA_APIMediaSurfaceINTEL_fn CL_API_SUFFIX__VERSION_1_2;
151
+
152
+ typedef cl_int CL_API_CALL
153
+ clEnqueueAcquireVA_APIMediaSurfacesINTEL_t(
154
+ cl_command_queue command_queue,
155
+ cl_uint num_objects,
156
+ const cl_mem* mem_objects,
157
+ cl_uint num_events_in_wait_list,
158
+ const cl_event* event_wait_list,
159
+ cl_event* event);
160
+
161
+ typedef clEnqueueAcquireVA_APIMediaSurfacesINTEL_t *
162
+ clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2;
163
+
164
+ typedef cl_int CL_API_CALL
165
+ clEnqueueReleaseVA_APIMediaSurfacesINTEL_t(
166
+ cl_command_queue command_queue,
167
+ cl_uint num_objects,
168
+ const cl_mem* mem_objects,
169
+ cl_uint num_events_in_wait_list,
170
+ const cl_event* event_wait_list,
171
+ cl_event* event);
172
+
173
+ typedef clEnqueueReleaseVA_APIMediaSurfacesINTEL_t *
174
+ clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn CL_API_SUFFIX__VERSION_1_2;
175
+
176
+ #if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES)
177
+
178
+ extern CL_API_ENTRY cl_int CL_API_CALL
179
+ clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
180
+ cl_platform_id platform,
181
+ cl_va_api_device_source_intel media_adapter_type,
182
+ void* media_adapter,
183
+ cl_va_api_device_set_intel media_adapter_set,
184
+ cl_uint num_entries,
185
+ cl_device_id* devices,
186
+ cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
187
+
188
+ extern CL_API_ENTRY cl_mem CL_API_CALL
189
+ clCreateFromVA_APIMediaSurfaceINTEL(
190
+ cl_context context,
191
+ cl_mem_flags flags,
192
+ VASurfaceID* surface,
193
+ cl_uint plane,
194
+ cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
195
+
196
+ extern CL_API_ENTRY cl_int CL_API_CALL
197
+ clEnqueueAcquireVA_APIMediaSurfacesINTEL(
198
+ cl_command_queue command_queue,
199
+ cl_uint num_objects,
200
+ const cl_mem* mem_objects,
201
+ cl_uint num_events_in_wait_list,
202
+ const cl_event* event_wait_list,
203
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
204
+
205
+ extern CL_API_ENTRY cl_int CL_API_CALL
206
+ clEnqueueReleaseVA_APIMediaSurfacesINTEL(
207
+ cl_command_queue command_queue,
208
+ cl_uint num_objects,
209
+ const cl_mem* mem_objects,
210
+ cl_uint num_events_in_wait_list,
211
+ const cl_event* event_wait_list,
212
+ cl_event* event) CL_API_SUFFIX__VERSION_1_2;
213
+
214
+ #endif /* !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) */
215
+
216
+ #ifdef __cplusplus
217
+ }
218
+ #endif
219
+
220
+ #endif /* OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_ */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/cl_version.h ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2018-2020 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef __CL_VERSION_H
18
+ #define __CL_VERSION_H
19
+
20
+ /* Detect which version to target */
21
+ #if !defined(CL_TARGET_OPENCL_VERSION)
22
+ #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 300 (OpenCL 3.0)")
23
+ #define CL_TARGET_OPENCL_VERSION 300
24
+ #endif
25
+ #if CL_TARGET_OPENCL_VERSION != 100 && \
26
+ CL_TARGET_OPENCL_VERSION != 110 && \
27
+ CL_TARGET_OPENCL_VERSION != 120 && \
28
+ CL_TARGET_OPENCL_VERSION != 200 && \
29
+ CL_TARGET_OPENCL_VERSION != 210 && \
30
+ CL_TARGET_OPENCL_VERSION != 220 && \
31
+ CL_TARGET_OPENCL_VERSION != 300
32
+ #pragma message("cl_version: CL_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120, 200, 210, 220, 300). Defaulting to 300 (OpenCL 3.0)")
33
+ #undef CL_TARGET_OPENCL_VERSION
34
+ #define CL_TARGET_OPENCL_VERSION 300
35
+ #endif
36
+
37
+
38
+ /* OpenCL Version */
39
+ #if CL_TARGET_OPENCL_VERSION >= 300 && !defined(CL_VERSION_3_0)
40
+ #define CL_VERSION_3_0 1
41
+ #endif
42
+ #if CL_TARGET_OPENCL_VERSION >= 220 && !defined(CL_VERSION_2_2)
43
+ #define CL_VERSION_2_2 1
44
+ #endif
45
+ #if CL_TARGET_OPENCL_VERSION >= 210 && !defined(CL_VERSION_2_1)
46
+ #define CL_VERSION_2_1 1
47
+ #endif
48
+ #if CL_TARGET_OPENCL_VERSION >= 200 && !defined(CL_VERSION_2_0)
49
+ #define CL_VERSION_2_0 1
50
+ #endif
51
+ #if CL_TARGET_OPENCL_VERSION >= 120 && !defined(CL_VERSION_1_2)
52
+ #define CL_VERSION_1_2 1
53
+ #endif
54
+ #if CL_TARGET_OPENCL_VERSION >= 110 && !defined(CL_VERSION_1_1)
55
+ #define CL_VERSION_1_1 1
56
+ #endif
57
+ #if CL_TARGET_OPENCL_VERSION >= 100 && !defined(CL_VERSION_1_0)
58
+ #define CL_VERSION_1_0 1
59
+ #endif
60
+
61
+ /* Allow deprecated APIs for older OpenCL versions. */
62
+ #if CL_TARGET_OPENCL_VERSION <= 220 && !defined(CL_USE_DEPRECATED_OPENCL_2_2_APIS)
63
+ #define CL_USE_DEPRECATED_OPENCL_2_2_APIS
64
+ #endif
65
+ #if CL_TARGET_OPENCL_VERSION <= 210 && !defined(CL_USE_DEPRECATED_OPENCL_2_1_APIS)
66
+ #define CL_USE_DEPRECATED_OPENCL_2_1_APIS
67
+ #endif
68
+ #if CL_TARGET_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS)
69
+ #define CL_USE_DEPRECATED_OPENCL_2_0_APIS
70
+ #endif
71
+ #if CL_TARGET_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS)
72
+ #define CL_USE_DEPRECATED_OPENCL_1_2_APIS
73
+ #endif
74
+ #if CL_TARGET_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS)
75
+ #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
76
+ #endif
77
+ #if CL_TARGET_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS)
78
+ #define CL_USE_DEPRECATED_OPENCL_1_0_APIS
79
+ #endif
80
+
81
+ #endif /* __CL_VERSION_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/opencl.h ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2021 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef __OPENCL_H
18
+ #define __OPENCL_H
19
+
20
+ #ifdef __cplusplus
21
+ extern "C" {
22
+ #endif
23
+
24
+ #include <CL/cl.h>
25
+ #include <CL/cl_gl.h>
26
+ #include <CL/cl_ext.h>
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
31
+
32
+ #endif /* __OPENCL_H */
OpenCL-SDK-v2025.07.23-Win-x64/include/CL/opencl.hpp ADDED
The diff for this file is too large to render. See raw diff
 
OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCL.lib ADDED
Binary file (28.8 kB). View file
 
OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLExt.lib ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:23f72e2fa4906dd35f8b4690dc5061a5121ca1f929a85db74e87b2215bbeb5fc
3
+ size 127102
OpenCL-SDK-v2025.07.23-Win-x64/lib/OpenCLUtils.lib ADDED
Binary file (60.5 kB). View file