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,369 +0,0 @@
1
- // Wrap CL
2
- //
3
- // Copyright (C) 2009-18 Andreas Kloeckner
4
- //
5
- // Permission is hereby granted, free of charge, to any person
6
- // obtaining a copy of this software and associated documentation
7
- // files (the "Software"), to deal in the Software without
8
- // restriction, including without limitation the rights to use,
9
- // copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- // copies of the Software, and to permit persons to whom the
11
- // Software is furnished to do so, subject to the following
12
- // conditions:
13
- //
14
- // The above copyright notice and this permission notice shall be
15
- // included in all copies or substantial portions of the Software.
16
- //
17
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
- // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
- // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
- // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
- // OTHER DEALINGS IN THE SOFTWARE.
25
-
26
-
27
- #define NO_IMPORT_ARRAY
28
- #define PY_ARRAY_UNIQUE_SYMBOL pyopencl_ARRAY_API
29
-
30
- #include "wrap_cl.hpp"
31
-
32
-
33
- using namespace pyopencl;
34
-
35
-
36
- void pyopencl_expose_part_1(py::module_ &m)
37
- {
38
- m.def("get_cl_header_version", get_cl_header_version);
39
- m.def("_sizeof_size_t", [](){ return sizeof(size_t); });
40
-
41
- // {{{ platform
42
- DEF_SIMPLE_FUNCTION(get_platforms);
43
-
44
- {
45
- typedef platform cls;
46
- py::class_<cls>(m, "Platform", py::dynamic_attr())
47
- .DEF_SIMPLE_METHOD(get_info)
48
- .def("get_devices", &cls::get_devices,
49
- py::arg("device_type")=CL_DEVICE_TYPE_ALL)
50
- .def("__hash__", &cls::hash)
51
- PYOPENCL_EXPOSE_EQUALITY_TESTS
52
- PYOPENCL_EXPOSE_TO_FROM_INT_PTR(cl_platform_id)
53
- ;
54
- }
55
-
56
- // }}}
57
-
58
- // {{{ device
59
- {
60
- typedef device cls;
61
- py::class_<cls>(m, "Device", py::dynamic_attr())
62
- .DEF_SIMPLE_METHOD(get_info)
63
- PYOPENCL_EXPOSE_EQUALITY_TESTS
64
- .def("__hash__", &cls::hash)
65
- #if PYOPENCL_CL_VERSION >= 0x1020
66
- .DEF_SIMPLE_METHOD(create_sub_devices)
67
- #endif
68
- PYOPENCL_EXPOSE_TO_FROM_INT_PTR(cl_device_id)
69
- #if PYOPENCL_CL_VERSION >= 0x2010
70
- .DEF_SIMPLE_METHOD(device_and_host_timer)
71
- .DEF_SIMPLE_METHOD(host_timer)
72
- #endif
73
- ;
74
- }
75
-
76
- // }}}
77
-
78
- // {{{ context
79
-
80
- {
81
- typedef context cls;
82
- py::class_<cls>(m, "Context", py::dynamic_attr(), py::is_weak_referenceable())
83
- .def(
84
- "__init__",
85
- [](cls *self, py::object py_devices, py::object py_properties,
86
- py::object py_dev_type)
87
- {
88
- PYOPENCL_RETRY_IF_MEM_ERROR(
89
- create_context_inner(
90
- self,
91
- py_devices,
92
- py_properties,
93
- py_dev_type);
94
- )
95
- },
96
- py::arg("devices").none(true)=py::none(),
97
- py::arg("properties").none(true)=py::none(),
98
- py::arg("dev_type").none(true)=py::none()
99
- )
100
- .DEF_SIMPLE_METHOD(get_info)
101
- PYOPENCL_EXPOSE_EQUALITY_TESTS
102
- .def("__hash__", &cls::hash)
103
- PYOPENCL_EXPOSE_TO_FROM_INT_PTR(cl_context)
104
- #if PYOPENCL_CL_VERSION >= 0x2010
105
- .DEF_SIMPLE_METHOD(set_default_device_command_queue)
106
- #endif
107
- ;
108
- }
109
-
110
- // }}}
111
-
112
- // {{{ command queue
113
- {
114
- typedef command_queue cls;
115
- py::class_<cls>(m, "CommandQueue", py::dynamic_attr())
116
- .def(
117
- py::init<const context &, const device *, py::object>(),
118
- py::arg("context"),
119
- py::arg("device").none(true)=py::none(),
120
- py::arg("properties")=py::cast(0))
121
- .def("_finalize", &cls::finalize)
122
- .DEF_SIMPLE_METHOD(get_info)
123
- #if PYOPENCL_CL_VERSION < 0x1010
124
- .DEF_SIMPLE_METHOD(set_property)
125
- #endif
126
- .DEF_SIMPLE_METHOD(flush)
127
- .DEF_SIMPLE_METHOD(finish)
128
- PYOPENCL_EXPOSE_EQUALITY_TESTS
129
- .def("__hash__", &cls::hash)
130
- PYOPENCL_EXPOSE_TO_FROM_INT_PTR(cl_command_queue)
131
- ;
132
- }
133
-
134
- // }}}
135
-
136
- // {{{ events/synchronization
137
- {
138
- typedef event cls;
139
- py::class_<cls>(m, "Event")
140
- .DEF_SIMPLE_METHOD(get_info)
141
- .DEF_SIMPLE_METHOD(get_profiling_info)
142
- .DEF_SIMPLE_METHOD(wait)
143
- PYOPENCL_EXPOSE_EQUALITY_TESTS
144
- .def("__hash__", &cls::hash)
145
- PYOPENCL_EXPOSE_TO_FROM_INT_PTR(cl_event)
146
- #if PYOPENCL_CL_VERSION >= 0x1010
147
- .DEF_SIMPLE_METHOD(set_callback)
148
- #endif
149
- ;
150
- }
151
- {
152
- typedef nanny_event cls;
153
- py::class_<cls, event>(m, "NannyEvent", py::dynamic_attr())
154
- .DEF_SIMPLE_METHOD(get_ward)
155
- ;
156
- }
157
-
158
- DEF_SIMPLE_FUNCTION(wait_for_events);
159
-
160
- #if PYOPENCL_CL_VERSION >= 0x1020
161
- m.def("_enqueue_marker_with_wait_list", enqueue_marker_with_wait_list,
162
- py::arg("queue"), py::arg("wait_for").none(true)=py::none()
163
- );
164
- #endif
165
- m.def("_enqueue_marker", enqueue_marker,
166
- py::arg("queue")
167
- );
168
- m.def("_enqueue_wait_for_events", enqueue_wait_for_events,
169
- py::arg("queue"), py::arg("wait_for").none(true)=py::none());
170
-
171
- #if PYOPENCL_CL_VERSION >= 0x1020
172
- m.def("_enqueue_barrier_with_wait_list", enqueue_barrier_with_wait_list,
173
- py::arg("queue"), py::arg("wait_for").none(true)=py::none()
174
- );
175
- #endif
176
- m.def("_enqueue_barrier", enqueue_barrier, py::arg("queue"));
177
-
178
- #if PYOPENCL_CL_VERSION >= 0x1010
179
- {
180
- typedef user_event cls;
181
- py::class_<cls, event>(m, "UserEvent", py::dynamic_attr())
182
- .def("__init__",
183
- [](cls *self, context &ctx)
184
- { create_user_event(self, ctx); },
185
- py::arg("context"))
186
- .DEF_SIMPLE_METHOD(set_status)
187
- ;
188
- }
189
- #endif
190
-
191
- // }}}
192
-
193
- // {{{ memory_object
194
-
195
- {
196
- typedef memory_object_holder cls;
197
- py::class_<cls>(m, "MemoryObjectHolder", py::dynamic_attr())
198
- .DEF_SIMPLE_METHOD(get_info)
199
- // FIXME: Reenable in pypy
200
- #ifndef PYPY_VERSION
201
- .def("get_host_array", get_mem_obj_host_array,
202
- py::arg("shape"),
203
- py::arg("dtype"),
204
- py::arg("order")="C")
205
- #endif
206
- PYOPENCL_EXPOSE_EQUALITY_TESTS
207
- .def("__hash__", &cls::hash)
208
-
209
- .def_prop_ro("int_ptr", to_int_ptr<cls>,
210
- "Return an integer corresponding to the pointer value "
211
- "of the underlying :c:type:`cl_mem`. "
212
- "Use :meth:`from_int_ptr` to turn back into a Python object."
213
- "\n\n.. versionadded:: 2013.2\n")
214
- ;
215
- }
216
- {
217
- typedef memory_object cls;
218
- py::class_<cls, memory_object_holder>(m, "MemoryObject", py::dynamic_attr())
219
- .DEF_SIMPLE_METHOD(release)
220
- .def_prop_ro("hostbuf", &cls::hostbuf)
221
-
222
- .def_static("from_int_ptr", memory_object_from_int,
223
- "(static method) Return a new Python object referencing the C-level "
224
- ":c:type:`cl_mem` object at the location pointed to "
225
- "by *int_ptr_value*. The relevant ``clRetain*`` function "
226
- "will be called if *retain* is True."
227
- "If the previous owner of the object will *not* release the reference, "
228
- "*retain* should be set to *False*, to effectively transfer ownership to "
229
- ":mod:`pyopencl`."
230
- "\n\n.. versionadded:: 2013.2\n"
231
- "\n\n.. versionchanged:: 2016.1\n\n *retain* added.",
232
- py::arg("int_ptr_value"),
233
- py::arg("retain")=true)
234
- ;
235
- }
236
-
237
- #if PYOPENCL_CL_VERSION >= 0x1020
238
- m.def("enqueue_migrate_mem_objects", enqueue_migrate_mem_objects,
239
- py::arg("queue"),
240
- py::arg("mem_objects"),
241
- py::arg("flags")=0,
242
- py::arg("wait_for").none(true)=py::none()
243
- );
244
- #endif
245
-
246
- // }}}
247
-
248
- // {{{ buffer
249
- {
250
- typedef buffer cls;
251
- py::class_<cls, memory_object>(m, "Buffer", py::dynamic_attr())
252
- .def(
253
- "__init__",
254
- [](cls *self, context &ctx, cl_mem_flags flags, size_t size, py::object py_hostbuf)
255
- { create_buffer_py(self, ctx, flags, size, py_hostbuf); },
256
- py::arg("context"),
257
- py::arg("flags"),
258
- py::arg("size")=0,
259
- py::arg("hostbuf").none(true)=py::none()
260
- )
261
- #if PYOPENCL_CL_VERSION >= 0x1010
262
- .def("get_sub_region", &cls::get_sub_region,
263
- py::arg("origin"),
264
- py::arg("size"),
265
- py::arg("flags")=0
266
- )
267
- .def("__getitem__", &cls::getitem)
268
- #endif
269
- ;
270
- }
271
-
272
- // }}}
273
-
274
- // {{{ transfers
275
-
276
- // {{{ byte-for-byte
277
-
278
- m.def("_enqueue_read_buffer", enqueue_read_buffer,
279
- py::arg("queue"),
280
- py::arg("mem"),
281
- py::arg("hostbuf"),
282
- py::arg("src_offset")=0,
283
- py::arg("wait_for").none(true)=py::none(),
284
- py::arg("is_blocking")=true
285
- );
286
- m.def("_enqueue_write_buffer", enqueue_write_buffer,
287
- py::arg("queue"),
288
- py::arg("mem"),
289
- py::arg("hostbuf"),
290
- py::arg("dst_offset")=0,
291
- py::arg("wait_for").none(true)=py::none(),
292
- py::arg("is_blocking")=true
293
- );
294
- m.def("_enqueue_copy_buffer", enqueue_copy_buffer,
295
- py::arg("queue"),
296
- py::arg("src"),
297
- py::arg("dst"),
298
- py::arg("byte_count")=-1,
299
- py::arg("src_offset")=0,
300
- py::arg("dst_offset")=0,
301
- py::arg("wait_for").none(true)=py::none()
302
- );
303
-
304
- #ifdef CL_DEVICE_P2P_DEVICES_AMD
305
- m.def("enqueue_copy_buffer_p2p_amd", enqueue_copy_buffer_p2p_amd,
306
- py::arg("platform"),
307
- py::arg("queue"),
308
- py::arg("src"),
309
- py::arg("dst"),
310
- py::arg("byte_count").none(true)=py::none(),
311
- py::arg("wait_for").none(true)=py::none()
312
- );
313
- #endif
314
-
315
- // }}}
316
-
317
- // {{{ rectangular
318
-
319
- #if PYOPENCL_CL_VERSION >= 0x1010
320
- m.def("_enqueue_read_buffer_rect", enqueue_read_buffer_rect,
321
- py::arg("queue"),
322
- py::arg("mem"),
323
- py::arg("hostbuf"),
324
- py::arg("buffer_origin"),
325
- py::arg("host_origin"),
326
- py::arg("region"),
327
- py::arg("buffer_pitches").none(true)=py::none(),
328
- py::arg("host_pitches").none(true)=py::none(),
329
- py::arg("wait_for").none(true)=py::none(),
330
- py::arg("is_blocking")=true
331
- );
332
- m.def("_enqueue_write_buffer_rect", enqueue_write_buffer_rect,
333
- py::arg("queue"),
334
- py::arg("mem"),
335
- py::arg("hostbuf"),
336
- py::arg("buffer_origin"),
337
- py::arg("host_origin"),
338
- py::arg("region"),
339
- py::arg("buffer_pitches").none(true)=py::none(),
340
- py::arg("host_pitches").none(true)=py::none(),
341
- py::arg("wait_for").none(true)=py::none(),
342
- py::arg("is_blocking")=true
343
- );
344
- m.def("_enqueue_copy_buffer_rect", enqueue_copy_buffer_rect,
345
- py::arg("queue"),
346
- py::arg("src"),
347
- py::arg("dst"),
348
- py::arg("src_origin"),
349
- py::arg("dst_origin"),
350
- py::arg("region"),
351
- py::arg("src_pitches").none(true)=py::none(),
352
- py::arg("dst_pitches").none(true)=py::none(),
353
- py::arg("wait_for").none(true)=py::none()
354
- );
355
- #endif
356
-
357
- // }}}
358
-
359
- // }}}
360
-
361
- #if PYOPENCL_CL_VERSION >= 0x1020
362
- m.def("_enqueue_fill_buffer", enqueue_fill_buffer,
363
- py::arg("queue"), py::arg("mem"), py::arg("pattern"),
364
- py::arg("offset"), py::arg("size"),
365
- py::arg("wait_for").none(true)=py::none());
366
- #endif
367
- }
368
-
369
- // vim: foldmethod=marker