pyopencl 2024.2.2__cp39-cp39-win_amd64.whl → 2024.2.5__cp39-cp39-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyopencl might be problematic. Click here for more details.

Files changed (99) hide show
  1. pyopencl/__init__.py +16 -4
  2. pyopencl/_cl.cp39-win_amd64.pyd +0 -0
  3. pyopencl/algorithm.py +3 -1
  4. pyopencl/bitonic_sort.py +2 -0
  5. pyopencl/characterize/__init__.py +23 -0
  6. pyopencl/compyte/.git +1 -0
  7. pyopencl/compyte/.gitignore +21 -0
  8. pyopencl/compyte/ndarray/Makefile +31 -0
  9. pyopencl/compyte/ndarray/gpu_ndarray.h +35 -0
  10. pyopencl/compyte/ndarray/pygpu_language.h +207 -0
  11. pyopencl/compyte/ndarray/pygpu_language_cuda.cu +622 -0
  12. pyopencl/compyte/ndarray/pygpu_language_opencl.cpp +317 -0
  13. pyopencl/compyte/ndarray/pygpu_ndarray.cpp +1546 -0
  14. pyopencl/compyte/ndarray/pygpu_ndarray.h +71 -0
  15. pyopencl/compyte/ndarray/pygpu_ndarray_object.h +232 -0
  16. pyopencl/tools.py +60 -56
  17. pyopencl/version.py +9 -3
  18. {pyopencl-2024.2.2.dist-info → pyopencl-2024.2.5.dist-info}/METADATA +105 -105
  19. pyopencl-2024.2.5.dist-info/RECORD +56 -0
  20. {pyopencl-2024.2.2.dist-info → pyopencl-2024.2.5.dist-info}/WHEEL +1 -1
  21. pyopencl-2024.2.2.data/data/CITATION.cff +0 -74
  22. pyopencl-2024.2.2.data/data/CMakeLists.txt +0 -83
  23. pyopencl-2024.2.2.data/data/Makefile.in +0 -21
  24. pyopencl-2024.2.2.data/data/README.rst +0 -70
  25. pyopencl-2024.2.2.data/data/README_SETUP.txt +0 -34
  26. pyopencl-2024.2.2.data/data/aksetup_helper.py +0 -1013
  27. pyopencl-2024.2.2.data/data/configure.py +0 -6
  28. pyopencl-2024.2.2.data/data/contrib/cldis.py +0 -91
  29. pyopencl-2024.2.2.data/data/contrib/fortran-to-opencl/README +0 -29
  30. pyopencl-2024.2.2.data/data/contrib/fortran-to-opencl/translate.py +0 -1441
  31. pyopencl-2024.2.2.data/data/contrib/pyopencl.vim +0 -84
  32. pyopencl-2024.2.2.data/data/doc/Makefile +0 -23
  33. pyopencl-2024.2.2.data/data/doc/algorithm.rst +0 -214
  34. pyopencl-2024.2.2.data/data/doc/array.rst +0 -305
  35. pyopencl-2024.2.2.data/data/doc/conf.py +0 -26
  36. pyopencl-2024.2.2.data/data/doc/howto.rst +0 -105
  37. pyopencl-2024.2.2.data/data/doc/index.rst +0 -137
  38. pyopencl-2024.2.2.data/data/doc/make_constants.py +0 -561
  39. pyopencl-2024.2.2.data/data/doc/misc.rst +0 -885
  40. pyopencl-2024.2.2.data/data/doc/runtime.rst +0 -51
  41. pyopencl-2024.2.2.data/data/doc/runtime_const.rst +0 -30
  42. pyopencl-2024.2.2.data/data/doc/runtime_gl.rst +0 -78
  43. pyopencl-2024.2.2.data/data/doc/runtime_memory.rst +0 -527
  44. pyopencl-2024.2.2.data/data/doc/runtime_platform.rst +0 -184
  45. pyopencl-2024.2.2.data/data/doc/runtime_program.rst +0 -364
  46. pyopencl-2024.2.2.data/data/doc/runtime_queue.rst +0 -182
  47. pyopencl-2024.2.2.data/data/doc/subst.rst +0 -36
  48. pyopencl-2024.2.2.data/data/doc/tools.rst +0 -4
  49. pyopencl-2024.2.2.data/data/doc/types.rst +0 -42
  50. pyopencl-2024.2.2.data/data/examples/black-hole-accretion.py +0 -2227
  51. pyopencl-2024.2.2.data/data/examples/demo-struct-reduce.py +0 -75
  52. pyopencl-2024.2.2.data/data/examples/demo.py +0 -39
  53. pyopencl-2024.2.2.data/data/examples/demo_array.py +0 -32
  54. pyopencl-2024.2.2.data/data/examples/demo_array_svm.py +0 -37
  55. pyopencl-2024.2.2.data/data/examples/demo_elementwise.py +0 -34
  56. pyopencl-2024.2.2.data/data/examples/demo_elementwise_complex.py +0 -53
  57. pyopencl-2024.2.2.data/data/examples/demo_mandelbrot.py +0 -183
  58. pyopencl-2024.2.2.data/data/examples/demo_meta_codepy.py +0 -56
  59. pyopencl-2024.2.2.data/data/examples/demo_meta_template.py +0 -55
  60. pyopencl-2024.2.2.data/data/examples/dump-performance.py +0 -38
  61. pyopencl-2024.2.2.data/data/examples/dump-properties.py +0 -86
  62. pyopencl-2024.2.2.data/data/examples/gl_interop_demo.py +0 -84
  63. pyopencl-2024.2.2.data/data/examples/gl_particle_animation.py +0 -218
  64. pyopencl-2024.2.2.data/data/examples/ipython-demo.ipynb +0 -203
  65. pyopencl-2024.2.2.data/data/examples/median-filter.py +0 -99
  66. pyopencl-2024.2.2.data/data/examples/n-body.py +0 -1070
  67. pyopencl-2024.2.2.data/data/examples/narray.py +0 -37
  68. pyopencl-2024.2.2.data/data/examples/noisyImage.jpg +0 -0
  69. pyopencl-2024.2.2.data/data/examples/pi-monte-carlo.py +0 -1166
  70. pyopencl-2024.2.2.data/data/examples/svm.py +0 -82
  71. pyopencl-2024.2.2.data/data/examples/transpose.py +0 -229
  72. pyopencl-2024.2.2.data/data/pytest.ini +0 -3
  73. pyopencl-2024.2.2.data/data/src/bitlog.cpp +0 -51
  74. pyopencl-2024.2.2.data/data/src/bitlog.hpp +0 -83
  75. pyopencl-2024.2.2.data/data/src/clinfo_ext.h +0 -134
  76. pyopencl-2024.2.2.data/data/src/mempool.hpp +0 -444
  77. pyopencl-2024.2.2.data/data/src/pyopencl_ext.h +0 -77
  78. pyopencl-2024.2.2.data/data/src/tools.hpp +0 -90
  79. pyopencl-2024.2.2.data/data/src/wrap_cl.cpp +0 -61
  80. pyopencl-2024.2.2.data/data/src/wrap_cl.hpp +0 -5853
  81. pyopencl-2024.2.2.data/data/src/wrap_cl_part_1.cpp +0 -369
  82. pyopencl-2024.2.2.data/data/src/wrap_cl_part_2.cpp +0 -702
  83. pyopencl-2024.2.2.data/data/src/wrap_constants.cpp +0 -1274
  84. pyopencl-2024.2.2.data/data/src/wrap_helpers.hpp +0 -213
  85. pyopencl-2024.2.2.data/data/src/wrap_mempool.cpp +0 -738
  86. pyopencl-2024.2.2.data/data/test/add-vectors-32.spv +0 -0
  87. pyopencl-2024.2.2.data/data/test/add-vectors-64.spv +0 -0
  88. pyopencl-2024.2.2.data/data/test/empty-header.h +0 -1
  89. pyopencl-2024.2.2.data/data/test/test_algorithm.py +0 -1180
  90. pyopencl-2024.2.2.data/data/test/test_array.py +0 -2392
  91. pyopencl-2024.2.2.data/data/test/test_arrays_in_structs.py +0 -100
  92. pyopencl-2024.2.2.data/data/test/test_clmath.py +0 -529
  93. pyopencl-2024.2.2.data/data/test/test_clrandom.py +0 -75
  94. pyopencl-2024.2.2.data/data/test/test_enqueue_copy.py +0 -271
  95. pyopencl-2024.2.2.data/data/test/test_wrapper.py +0 -1565
  96. pyopencl-2024.2.2.dist-info/LICENSE +0 -282
  97. pyopencl-2024.2.2.dist-info/RECORD +0 -123
  98. pyopencl-2024.2.2.dist-info/top_level.txt +0 -1
  99. {pyopencl-2024.2.2.data/data → pyopencl-2024.2.5.dist-info/licenses}/LICENSE +0 -0
@@ -1,561 +0,0 @@
1
- __copyright__ = "Copyright (C) 2009 Andreas Kloeckner"
2
-
3
- __license__ = """
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in
12
- all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
21
- """
22
-
23
- import pyopencl as cl
24
-
25
-
26
- fission = ("cl_ext_device_fission", "2011.1")
27
- nv_devattr = ("cl_nv_device_attribute_query", "0.92")
28
- gl_sharing = ("cl_khr_gl_sharing", "0.92")
29
- cl_spir_devattr = ("cl_khr_spir", "2016.2")
30
- cl_11 = ("CL_1.1", "0.92")
31
- cl_12 = ("CL_1.2", "2011.2")
32
- cl_12_2015 = ("CL_1.2", "2015.2")
33
- cl_20 = ("CL_2.0", "2015.2")
34
- cl_21_late = ("CL_2.1", "2020.3")
35
- cl_21 = ("CL_2.1", "2016.2")
36
- cl_22 = ("CL_2.1", "2020.3")
37
- cl_30 = ("CL_3.0", "2020.3")
38
- amd_devattr = ("cl_amd_device_attribute_query", "2013.2")
39
- qcom_hp_devattr = ("cl_qcom_ext_host_ptr", "2016.2")
40
- intel_me_devattr = ("cl_intel_advanced_motion_estimation", "2016.2")
41
- intel_ss_devattr = ("cl_intel_simultaneous_sharing", "2016.2")
42
- altera_temp_devattr = ("cl_altera_device_temperature", "2016.2")
43
-
44
-
45
- def get_extra_lines(tup):
46
- ext_name, pyopencl_ver = tup
47
- if ext_name is not None:
48
- if ext_name.startswith("CL_"):
49
- # capital letters -> CL version, not extension
50
- yield ""
51
- yield " Available with OpenCL %s." % (
52
- ext_name[3:])
53
- yield ""
54
-
55
- else:
56
- yield ""
57
- yield " Available with the ``%s`` extension." % ext_name
58
- yield ""
59
-
60
- if pyopencl_ver is not None:
61
- yield ""
62
- yield " .. versionadded:: %s" % pyopencl_ver
63
- yield ""
64
-
65
-
66
- const_ext_lookup = {
67
- cl.status_code: {
68
- "PLATFORM_NOT_FOUND_KHR": ("cl_khr_icd", "2011.1"),
69
-
70
- "INVALID_GL_SHAREGROUP_REFERENCE_KHR": gl_sharing,
71
-
72
- "MISALIGNED_SUB_BUFFER_OFFSET": cl_11,
73
- "EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST": cl_11,
74
- "INVALID_GLOBAL_WORK_SIZE": cl_11,
75
-
76
- "COMPILE_PROGRAM_FAILURE": cl_12,
77
- "LINKER_NOT_AVAILABLE": cl_12,
78
- "LINK_PROGRAM_FAILURE": cl_12,
79
- "DEVICE_PARTITION_FAILED": cl_12,
80
- "KERNEL_ARG_INFO_NOT_AVAILABLE": cl_12,
81
- "INVALID_IMAGE_DESCRIPTOR": cl_12,
82
- "INVALID_COMPILER_OPTIONS": cl_12,
83
- "INVALID_LINKER_OPTIONS": cl_12,
84
- "INVALID_DEVICE_PARTITION_COUNT": cl_12,
85
-
86
- "INVALID_PIPE_SIZE": cl_20,
87
- "INVALID_DEVICE_QUEUE": cl_20,
88
-
89
- "INVALID_SPEC_ID": cl_22,
90
- "MAX_SIZE_RESTRICTION_EXCEEDED": cl_22,
91
-
92
- },
93
-
94
- cl.device_info: {
95
- "PREFERRED_VECTOR_WIDTH_HALF": cl_11,
96
- "HOST_UNIFIED_MEMORY": cl_11,
97
- "NATIVE_VECTOR_WIDTH_CHAR": cl_11,
98
- "NATIVE_VECTOR_WIDTH_SHORT": cl_11,
99
- "NATIVE_VECTOR_WIDTH_INT": cl_11,
100
- "NATIVE_VECTOR_WIDTH_LONG": cl_11,
101
- "NATIVE_VECTOR_WIDTH_FLOAT": cl_11,
102
- "NATIVE_VECTOR_WIDTH_DOUBLE": cl_11,
103
- "NATIVE_VECTOR_WIDTH_HALF": cl_11,
104
- "OPENCL_C_VERSION": cl_11,
105
- "SPIR_VERSIONS": cl_spir_devattr,
106
- "COMPUTE_CAPABILITY_MAJOR_NV": nv_devattr,
107
- "COMPUTE_CAPABILITY_MINOR_NV": nv_devattr,
108
- "REGISTERS_PER_BLOCK_NV": nv_devattr,
109
- "WARP_SIZE_NV": nv_devattr,
110
- "GPU_OVERLAP_NV": nv_devattr,
111
- "KERNEL_EXEC_TIMEOUT_NV": nv_devattr,
112
- "INTEGRATED_MEMORY_NV": nv_devattr,
113
- "ATTRIBUTE_ASYNC_ENGINE_COUNT_NV": nv_devattr,
114
- "PCI_BUS_ID_NV": nv_devattr,
115
- "PCI_SLOT_ID_NV": nv_devattr,
116
- "PCI_DOMAIN_ID_NV": nv_devattr,
117
-
118
- "DOUBLE_FP_CONFIG":
119
- ("cl_khr_fp64", "2011.1"),
120
- "HALF_FP_CONFIG":
121
- ("cl_khr_fp16", "2011.1"),
122
-
123
- "PROFILING_TIMER_OFFSET_AMD": amd_devattr,
124
- "TOPOLOGY_AMD": amd_devattr,
125
- "BOARD_NAME_AMD": amd_devattr,
126
- "GLOBAL_FREE_MEMORY_AMD": amd_devattr,
127
- "SIMD_PER_COMPUTE_UNIT_AMD": amd_devattr,
128
- "SIMD_WIDTH_AMD": amd_devattr,
129
- "SIMD_INSTRUCTION_WIDTH_AMD": amd_devattr,
130
- "WAVEFRONT_WIDTH_AMD": amd_devattr,
131
- "GLOBAL_MEM_CHANNELS_AMD": amd_devattr,
132
- "GLOBAL_MEM_CHANNEL_BANKS_AMD": amd_devattr,
133
- "GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD": amd_devattr,
134
- "LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD": amd_devattr,
135
- "LOCAL_MEM_BANKS_AMD": amd_devattr,
136
- "THREAD_TRACE_SUPPORTED_AMD": amd_devattr,
137
- "GFXIP_MAJOR_AMD": amd_devattr,
138
- "GFXIP_MINOR_AMD": amd_devattr,
139
- "AVAILABLE_ASYNC_QUEUES_AMD": amd_devattr,
140
-
141
- "ME_VERSION_INTEL": intel_me_devattr,
142
- "SIMULTANEOUS_INTEROPS_INTEL": intel_ss_devattr,
143
- "NUM_SIMULTANEOUS_INTEROPS_INTEL": intel_ss_devattr,
144
-
145
- "EXT_MEM_PADDING_IN_BYTES_QCOM": qcom_hp_devattr,
146
- "PAGE_SIZE_QCOM": qcom_hp_devattr,
147
-
148
- "CORE_TEMPERATURE_ALTERA": altera_temp_devattr,
149
-
150
- "MAX_ATOMIC_COUNTERS_EXT":
151
- ("cl_ext_atomic_counters_64", "2013.2"),
152
-
153
- "PARENT_DEVICE_EXT":
154
- fission,
155
- "PARTITION_TYPES_EXT":
156
- fission,
157
- "AFFINITY_DOMAINS_EXT":
158
- fission,
159
- "REFERENCE_COUNT_EXT":
160
- fission,
161
- "PARTITION_STYLE_EXT": fission,
162
-
163
- "LINKER_AVAILABLE": cl_12,
164
- "BUILT_IN_KERNELS": cl_12,
165
- "IMAGE_MAX_BUFFER_SIZE": cl_12,
166
- "IMAGE_MAX_ARRAY_SIZE": cl_12,
167
- "PARENT_DEVICE": cl_12,
168
- "PARTITION_MAX_SUB_DEVICES": cl_12,
169
- "PARTITION_PROPERTIES": cl_12,
170
- "PARTITION_AFFINITY_DOMAIN": cl_12,
171
- "PARTITION_TYPE": cl_12,
172
- "REFERENCE_COUNT": cl_12,
173
- "PREFERRED_INTEROP_USER_SYNC": cl_12,
174
- "PRINTF_BUFFER_SIZE": cl_12,
175
-
176
- "DEVICE_ON_HOST_PROPERTIES": cl_20,
177
-
178
- "MAX_READ_WRITE_IMAGE_ARGS": cl_20,
179
- "MAX_GLOBAL_VARIABLE_SIZE": cl_20,
180
- "QUEUE_ON_DEVICE_PROPERTIES": cl_20,
181
- "QUEUE_ON_DEVICE_PREFERRED_SIZE": cl_20,
182
- "QUEUE_ON_DEVICE_MAX_SIZE": cl_20,
183
- "MAX_ON_DEVICE_QUEUES": cl_20,
184
- "MAX_ON_DEVICE_EVENTS": cl_20,
185
- "SVM_CAPABILITIES": cl_20,
186
- "GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE": cl_20,
187
- "MAX_PIPE_ARGS": cl_20,
188
- "PIPE_MAX_ACTIVE_RESERVATIONS": cl_20,
189
- "PIPE_MAX_PACKET_SIZE": cl_20,
190
- "PREFERRED_PLATFORM_ATOMIC_ALIGNMENT": cl_20,
191
- "PREFERRED_GLOBAL_ATOMIC_ALIGNMENT": cl_20,
192
- "PREFERRED_LOCAL_ATOMIC_ALIGNMENT": cl_20,
193
- "IL_VERSION": cl_21,
194
- "MAX_NUM_SUB_GROUPS": cl_21,
195
- "SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS": cl_21,
196
-
197
- "NUMERIC_VERSION": cl_30,
198
- "EXTENSIONS_WITH_VERSION": cl_30,
199
- "ILS_WITH_VERSION": cl_30,
200
- "BUILT_IN_KERNELS_WITH_VERSION": cl_30,
201
- "ATOMIC_MEMORY_CAPABILITIES": cl_30,
202
- "ATOMIC_FENCE_CAPABILITIES": cl_30,
203
- "NON_UNIFORM_WORK_GROUP_SUPPORT": cl_30,
204
- "OPENCL_C_ALL_VERSIONS": cl_30,
205
- "PREFERRED_WORK_GROUP_SIZE_MULTIPLE": cl_30,
206
- "WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT": cl_30,
207
- "GENERIC_ADDRESS_SPACE_SUPPORT": cl_30,
208
- "OPENCL_C_FEATURES": cl_30,
209
- "DEVICE_ENQUEUE_CAPABILITIES": cl_30,
210
- "PIPE_SUPPORT": cl_30,
211
- },
212
-
213
- cl.device_topology_type_amd: {
214
- "PCIE": amd_devattr,
215
- },
216
-
217
- cl.mem_object_type: {
218
- "IMAGE2D_ARRAY": cl_12,
219
- "IMAGE1D": cl_12,
220
- "IMAGE1D_ARRAY": cl_12,
221
- "IMAGE1D_BUFFER": cl_12,
222
-
223
- "PIPE": cl_20,
224
- },
225
-
226
- cl.device_type: {
227
- "CUSTOM": cl_12,
228
- },
229
-
230
- cl.context_properties: {
231
- "GL_CONTEXT_KHR": gl_sharing,
232
- "EGL_DISPLAY_KHR": gl_sharing,
233
- "GLX_DISPLAY_KHR": gl_sharing,
234
- "WGL_HDC_KHR": gl_sharing,
235
- "CGL_SHAREGROUP_KHR": gl_sharing,
236
-
237
- "OFFLINE_DEVICES_AMD":
238
- ("cl_amd_offline_devices", "2011.1"),
239
- },
240
-
241
- cl.device_fp_config: {
242
- "SOFT_FLOAT": cl_11,
243
- "CORRECTLY_ROUNDED_DIVIDE_SQRT": cl_12,
244
- },
245
-
246
- cl.command_queue_properties: {
247
- "ON_DEVICE": cl_20,
248
- "ON_DEVICE_DEFAULT": cl_20,
249
- },
250
-
251
- cl.context_info: {
252
- "NUM_DEVICES": cl_11,
253
- "INTEROP_USER_SYNC": cl_12,
254
- },
255
-
256
- cl.channel_type: {
257
- "UNORM_INT24": ("CL_1.2", "2020.3"),
258
- "UNORM_INT_101010_2": ("CL_2.1", "2020.3"),
259
- },
260
-
261
- cl.channel_order: {
262
- "Rx": cl_11,
263
- "RGx": cl_11,
264
- "RGBx": cl_11,
265
-
266
- "sRGB": cl_20,
267
- "sRGBx": cl_20,
268
- "sRGBA": cl_20,
269
- "sBGRA": cl_20,
270
- "ABGR": cl_20,
271
- },
272
-
273
- cl.kernel_work_group_info: {
274
- "PREFERRED_WORK_GROUP_SIZE_MULTIPLE": cl_11,
275
- "PRIVATE_MEM_SIZE": cl_11,
276
- "GLOBAL_WORK_SIZE": cl_12,
277
- },
278
-
279
- cl.kernel_sub_group_info: {
280
- "MAX_SUB_GROUP_SIZE_FOR_NDRANGE": cl_21_late,
281
- "SUB_GROUP_COUNT_FOR_NDRANGE": cl_21_late,
282
- "LOCAL_SIZE_FOR_SUB_GROUP_COUNT": cl_21_late,
283
- "MAX_NUM_SUB_GROUPS": cl_21_late,
284
- "COMPILE_NUM_SUB_GROUPS": cl_21_late,
285
- },
286
-
287
- cl.addressing_mode: {
288
- "MIRRORED_REPEAT": cl_11,
289
- },
290
-
291
- cl.sampler_info: {
292
- "MIP_FILTER_MODE": ("(deprecated)", "2015.2"),
293
- "LOD_MIN": ("(deprecated)", "2015.2"),
294
- "LOD_MAX": ("(deprecated)", "2015.2"),
295
- "MIP_FILTER_MODE_KHR": ("cl_khr_mipmap_image", "2020.3"),
296
- "LOD_MIN_KHR": ("cl_khr_mipmap_image", "2020.3"),
297
- "LOD_MAX_KHR": ("cl_khr_mipmap_image", "2020.3"),
298
- "PROPERTIES": cl_30,
299
- },
300
-
301
- cl.event_info: {
302
- "CONTEXT": cl_11,
303
- },
304
-
305
- cl.mem_info: {
306
- "ASSOCIATED_MEMOBJECT": cl_11,
307
- "OFFSET": cl_11,
308
-
309
- "USES_SVM_POINTER": cl_20,
310
- },
311
-
312
- cl.image_info: {
313
- "ARRAY_SIZE": cl_12,
314
- "BUFFER": cl_12,
315
- "NUM_MIP_LEVELS": cl_12,
316
- "NUM_SAMPLES": cl_12,
317
- },
318
-
319
- cl.pipe_info: {
320
- "PACKET_SIZE": ("CL_2.0", "2020.3"),
321
- "MAX_PACKETS": ("CL_2.0", "2020.3"),
322
- "PROPERTIES": cl_30,
323
- },
324
-
325
- cl.pipe_properties: {
326
- "PACKET_SIZE": ("CL_2.0", "2020.3"),
327
- "MAX_PACKETS": ("CL_2.0", "2020.3"),
328
- },
329
-
330
- cl.map_flags: {
331
- "WRITE_INVALIDATE_REGION": cl_12,
332
- },
333
-
334
- cl.program_info: {
335
- "NUM_KERNELS": cl_12,
336
- "KERNEL_NAMES": cl_12,
337
- "PROGRAM_IL": cl_21_late,
338
- "SCOPE_GLOBAL_CTORS_PRESENT": cl_22,
339
- "SCOPE_GLOBAL_DTORS_PRESENT": cl_22,
340
- },
341
-
342
- cl.program_build_info: {
343
- "BINARY_TYPE": cl_12,
344
-
345
- "GLOBAL_VARIABLE_TOTAL_SIZE": cl_20,
346
- },
347
-
348
- cl.program_binary_type: {
349
- "NONE": cl_12,
350
- "COMPILED_OBJECT": cl_12,
351
- "LIBRARY": cl_12,
352
- "EXECUTABLE": cl_12,
353
- },
354
-
355
- cl.kernel_info: {
356
- "ATTRIBUTES": cl_12,
357
- },
358
-
359
- cl.kernel_arg_info: {
360
- "ADDRESS_QUALIFIER": cl_12,
361
- "ACCESS_QUALIFIER": cl_12,
362
- "TYPE_NAME": cl_12,
363
- "TYPE_QUALIFIER": cl_12_2015,
364
- "ARG_NAME": cl_12,
365
- },
366
-
367
- cl.kernel_arg_address_qualifier: {
368
- "GLOBAL": cl_12,
369
- "LOCAL": cl_12,
370
- "CONSTANT": cl_12,
371
- "PRIVATE": cl_12,
372
- },
373
-
374
- cl.kernel_arg_access_qualifier: {
375
- "READ_ONLY": cl_12,
376
- "WRITE_ONLY": cl_12,
377
- "READ_WRITE": cl_12,
378
- "NONE": cl_12,
379
- },
380
-
381
- cl.kernel_arg_type_qualifier: {
382
- "NONE": cl_12_2015,
383
- "CONST": cl_12_2015,
384
- "RESTRICT": cl_12_2015,
385
- "VOLATILE": cl_12_2015,
386
-
387
- "PIPE": cl_20,
388
- },
389
-
390
- cl.command_type: {
391
- "READ_BUFFER_RECT": cl_11,
392
- "WRITE_BUFFER_RECT": cl_11,
393
- "COPY_BUFFER_RECT": cl_11,
394
- "USER": cl_11,
395
- "BARRIER": cl_12,
396
- "MIGRATE_MEM_OBJECTS": cl_12,
397
- "FILL_BUFFER": cl_12,
398
- "FILL_IMAGE": cl_12,
399
-
400
- "SVM_FREE": cl_20,
401
- "SVM_MEMCPY": cl_20,
402
- "SVM_MEMFILL": cl_20,
403
- "SVM_MAP": cl_20,
404
- "SVM_UNMAP": cl_20,
405
- "SVM_MIGRATE_MEM": cl_30,
406
- },
407
-
408
- cl.command_queue_info: {
409
- "SIZE": cl_20,
410
- },
411
-
412
- cl.queue_properties: {
413
- "PROPERTIES": cl_20,
414
- "SIZE": cl_20,
415
- },
416
-
417
- cl.mem_flags: {
418
- "USE_PERSISTENT_MEM_AMD":
419
- ("cl_amd_device_memory_flags", "2011.1"),
420
- "HOST_WRITE_ONLY": cl_12,
421
- "KERNEL_READ_AND_WRITE": cl_20,
422
- },
423
-
424
- cl.svm_mem_flags: {
425
- "READ_WRITE": cl_20,
426
- "WRITE_ONLY": cl_20,
427
- "READ_ONLY": cl_20,
428
- "SVM_FINE_GRAIN_BUFFER": cl_20,
429
- "SVM_ATOMICS": cl_20,
430
- },
431
-
432
- cl.device_svm_capabilities: {
433
- "COARSE_GRAIN_BUFFER": cl_20,
434
- "FINE_GRAIN_BUFFER": cl_20,
435
- "FINE_GRAIN_SYSTEM": cl_20,
436
- "ATOMICS": cl_20,
437
- },
438
-
439
- cl.device_partition_property: {
440
- "EQUALLY": cl_12,
441
- "BY_COUNTS": cl_12,
442
- "BY_NAMES": cl_12,
443
- "BY_AFFINITY_DOMAIN": cl_12,
444
-
445
- "PROPERTIES_LIST_END": cl_12,
446
- "PARTITION_BY_COUNTS_LIST_END": cl_12,
447
- "PARTITION_BY_NAMES_LIST_END": cl_12,
448
- },
449
-
450
- cl.device_affinity_domain: {
451
- "NUMA": cl_12,
452
- "L4_CACHE": cl_12,
453
- "L3_CACHE": cl_12,
454
- "L2_CACHE": cl_12,
455
- "L1_CACHE": cl_12,
456
- "NEXT_PARITIONNABLE": cl_12,
457
- },
458
-
459
- cl.device_atomic_capabilities: {
460
- "ORDER_RELAXED": cl_30,
461
- "ORDER_ACQ_REL": cl_30,
462
- "ORDER_SEQ_CST": cl_30,
463
- "SCOPE_WORK_ITEM": cl_30,
464
- "SCOPE_WORK_GROUP": cl_30,
465
- "SCOPE_DEVICE": cl_30,
466
- "SCOPE_ALL_DEVICES": cl_30,
467
- },
468
-
469
- cl.device_device_enqueue_capabilities: {
470
- "SUPPORTED": cl_30,
471
- "REPLACEABLE_DEFAULT": cl_30,
472
- },
473
-
474
- cl.profiling_info: {
475
- "COMPLETE": cl_20,
476
- },
477
-
478
- cl.mem_migration_flags: {
479
- "HOST": cl_12,
480
- "CONTENT_UNDEFINED": cl_12,
481
- },
482
-
483
- cl.version_bits: {
484
- "MAJOR_BITS": cl_30,
485
- "MINOR_BITS": cl_30,
486
- "PATCH_BITS": cl_30,
487
- "MAJOR_MASK": cl_30,
488
- "MINOR_MASK": cl_30,
489
- "PATCH_MASK": cl_30,
490
- },
491
-
492
- cl.khronos_vendor_id: {
493
- "CODEPLAY": cl_30,
494
- },
495
- }
496
- try:
497
- gl_ci = cl.gl_context_info
498
- except AttributeError:
499
- pass
500
- else:
501
- const_ext_lookup[gl_ci] = {
502
- getattr(gl_ci, "CURRENT_DEVICE_FOR_GL_CONTEXT_KHR", None):
503
- gl_sharing,
504
-
505
- getattr(gl_ci, "DEVICES_FOR_GL_CONTEXT_KHR", None):
506
- gl_sharing,
507
- }
508
-
509
- cls_ext_lookup = {
510
- #cl.buffer_create_type: ("CL_1.1", "0.92"),
511
- }
512
-
513
-
514
- def doc_class(cls):
515
- print(".. class :: %s" % cls.__name__)
516
- print()
517
- if cls.__name__.startswith("gl_"):
518
- print(" Only available when PyOpenCL is compiled with GL support.")
519
- print(" See :func:`have_gl`.")
520
- print()
521
-
522
- if cls in cls_ext_lookup:
523
- for ln in get_extra_lines(cls_ext_lookup[cls]):
524
- print(ln)
525
-
526
- cls_const_ext = const_ext_lookup.get(cls, {})
527
- for name in sorted(dir(cls)):
528
- if not name.startswith("_") and name not in ["to_string", "names", "values"]:
529
- print(" .. attribute :: %s" % name)
530
-
531
- if name in cls_const_ext:
532
- for ln in get_extra_lines(cls_const_ext[name]):
533
- print(" "+ln)
534
-
535
- print(" .. method :: to_string(value)")
536
- print()
537
- print(" Returns a :class:`str` representing *value*.")
538
- print()
539
- print(" .. versionadded:: 0.91")
540
- print()
541
-
542
-
543
- if not cl.have_gl():
544
- print(".. warning::")
545
- print()
546
- print(" This set of PyOpenCL documentation is incomplete because it")
547
- print(" was generated on a PyOpenCL build that did not support OpenGL.")
548
- print()
549
-
550
- import inspect
551
-
552
-
553
- CONSTANT_CLASSES = [
554
- getattr(cl, name) for name in dir(cl)
555
- if inspect.isclass(getattr(cl, name))
556
- and name[0].islower() and name not in ["zip", "map", "range"]]
557
-
558
- print(".. This is an automatically generated file. DO NOT EDIT")
559
- print()
560
- for cls in CONSTANT_CLASSES:
561
- doc_class(cls)