pyopencl 2025.1__cp313-cp313-macosx_11_0_arm64.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 (42) hide show
  1. pyopencl/__init__.py +2410 -0
  2. pyopencl/_cl.cpython-313-darwin.so +0 -0
  3. pyopencl/_cluda.py +54 -0
  4. pyopencl/_mymako.py +14 -0
  5. pyopencl/algorithm.py +1449 -0
  6. pyopencl/array.py +3362 -0
  7. pyopencl/bitonic_sort.py +242 -0
  8. pyopencl/bitonic_sort_templates.py +594 -0
  9. pyopencl/cache.py +535 -0
  10. pyopencl/capture_call.py +177 -0
  11. pyopencl/characterize/__init__.py +456 -0
  12. pyopencl/characterize/performance.py +237 -0
  13. pyopencl/cl/pyopencl-airy.cl +324 -0
  14. pyopencl/cl/pyopencl-bessel-j-complex.cl +238 -0
  15. pyopencl/cl/pyopencl-bessel-j.cl +1084 -0
  16. pyopencl/cl/pyopencl-bessel-y.cl +435 -0
  17. pyopencl/cl/pyopencl-complex.h +303 -0
  18. pyopencl/cl/pyopencl-eval-tbl.cl +120 -0
  19. pyopencl/cl/pyopencl-hankel-complex.cl +444 -0
  20. pyopencl/cl/pyopencl-random123/array.h +325 -0
  21. pyopencl/cl/pyopencl-random123/openclfeatures.h +93 -0
  22. pyopencl/cl/pyopencl-random123/philox.cl +486 -0
  23. pyopencl/cl/pyopencl-random123/threefry.cl +864 -0
  24. pyopencl/clmath.py +280 -0
  25. pyopencl/clrandom.py +409 -0
  26. pyopencl/cltypes.py +137 -0
  27. pyopencl/compyte/.gitignore +21 -0
  28. pyopencl/compyte/__init__.py +0 -0
  29. pyopencl/compyte/array.py +214 -0
  30. pyopencl/compyte/dtypes.py +290 -0
  31. pyopencl/compyte/pyproject.toml +54 -0
  32. pyopencl/elementwise.py +1171 -0
  33. pyopencl/invoker.py +421 -0
  34. pyopencl/ipython_ext.py +68 -0
  35. pyopencl/reduction.py +786 -0
  36. pyopencl/scan.py +1915 -0
  37. pyopencl/tools.py +1527 -0
  38. pyopencl/version.py +9 -0
  39. pyopencl-2025.1.dist-info/METADATA +108 -0
  40. pyopencl-2025.1.dist-info/RECORD +42 -0
  41. pyopencl-2025.1.dist-info/WHEEL +5 -0
  42. pyopencl-2025.1.dist-info/licenses/LICENSE +282 -0
Binary file
pyopencl/_cluda.py ADDED
@@ -0,0 +1,54 @@
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
+ CLUDA_PREAMBLE = """
24
+ #define local_barrier() barrier(CLK_LOCAL_MEM_FENCE);
25
+
26
+ #define WITHIN_KERNEL /* empty */
27
+ #define KERNEL __kernel
28
+ #define GLOBAL_MEM __global
29
+ #define LOCAL_MEM __local
30
+ #define LOCAL_MEM_ARG __local
31
+ #define REQD_WG_SIZE(X,Y,Z) __attribute__((reqd_work_group_size(X, Y, Z)))
32
+
33
+ #define LID_0 ((ptrdiff_t) get_local_id(0))
34
+ #define LID_1 ((ptrdiff_t) get_local_id(1))
35
+ #define LID_2 ((ptrdiff_t) get_local_id(2))
36
+
37
+ #define GID_0 ((ptrdiff_t) get_group_id(0))
38
+ #define GID_1 ((ptrdiff_t) get_group_id(1))
39
+ #define GID_2 ((ptrdiff_t) get_group_id(2))
40
+
41
+ #define LDIM_0 ((ptrdiff_t) get_local_size(0))
42
+ #define LDIM_1 ((ptrdiff_t) get_local_size(1))
43
+ #define LDIM_2 ((ptrdiff_t) get_local_size(2))
44
+
45
+ #define GDIM_0 ((ptrdiff_t) get_num_groups(0))
46
+ #define GDIM_1 ((ptrdiff_t) get_num_groups(1))
47
+ #define GDIM_2 ((ptrdiff_t) get_num_groups(2))
48
+
49
+ % if double_support:
50
+ #if __OPENCL_C_VERSION__ < 120
51
+ #pragma OPENCL EXTENSION cl_khr_fp64: enable
52
+ #endif
53
+ % endif
54
+ """
pyopencl/_mymako.py ADDED
@@ -0,0 +1,14 @@
1
+ try:
2
+ import mako.template # noqa: F401
3
+ except ImportError as err:
4
+ raise ImportError(
5
+ "Some of PyOpenCL's facilities require the Mako templating engine.\n"
6
+ "You or a piece of software you have used has tried to call such a\n"
7
+ "part of PyOpenCL, but there was a problem importing Mako.\n\n"
8
+ "You may install mako now by typing one of:\n"
9
+ "- easy_install Mako\n"
10
+ "- pip install Mako\n"
11
+ "- aptitude install python-mako\n"
12
+ "\nor whatever else is appropriate for your system.") from err
13
+
14
+ from mako import * # noqa: F403