pyopencl 2025.2.6__tar.gz → 2025.2.7__tar.gz
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.
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/PKG-INFO +1 -1
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/array.rst +2 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/conf.py +10 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/index.rst +6 -2
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/array.py +5 -1
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/compyte/array.py +9 -39
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/compyte/dtypes.py +9 -11
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/compyte/pyproject.toml +0 -3
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/tools.py +1 -1
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyproject.toml +4 -5
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_array.py +1 -1
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/.gitignore +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/.gitlab-ci.yml +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/.gitmodules +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/.test-conda-env-py3.yml +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/CITATION.cff +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/CMakeLists.txt +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/LICENSE +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/README.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/contrib/cldis.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/contrib/fortran-to-opencl/README +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/contrib/fortran-to-opencl/translate.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/contrib/pyopencl.vim +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/.gitignore +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/Makefile +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/algorithm.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/howto.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/make_constants.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/misc.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime_const.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime_gl.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime_memory.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime_platform.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime_program.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/runtime_queue.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/subst.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/tools.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/doc/types.rst +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/.gitignore +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/black-hole-accretion.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo-struct-reduce.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_array.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_array_svm.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_elementwise.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_elementwise_complex.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_mandelbrot.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_meta_codepy.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/demo_meta_template.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/dump-performance.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/dump-properties.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/gl_interop_demo.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/gl_particle_animation.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/image_filters_using_image2d_t.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/ipython-demo.ipynb +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/median-filter.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/n-body.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/narray.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/noisyImage.jpg +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/pi-monte-carlo.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/svm.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/examples/transpose.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/__init__.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/_cl.pyi +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/_cluda.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/_monkeypatch.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/_mymako.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/algorithm.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/bitonic_sort.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/bitonic_sort_templates.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cache.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/capture_call.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/characterize/__init__.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/characterize/performance.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-airy.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-bessel-j-complex.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-bessel-j.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-bessel-y.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-complex.h +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-eval-tbl.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-hankel-complex.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-random123/array.h +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-random123/openclfeatures.h +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-random123/philox.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cl/pyopencl-random123/threefry.cl +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/clmath.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/clrandom.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/cltypes.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/compyte/.gitignore +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/compyte/__init__.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/elementwise.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/invoker.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/ipython_ext.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/py.typed +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/reduction.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/scan.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/typing.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/pyopencl/version.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/scripts/build-ocl-macos.sh +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/scripts/build-ocl-windows.sh +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/scripts/build-ocl.sh +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/bitlog.cpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/bitlog.hpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/clinfo_ext.h +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/mempool.hpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/pyopencl_ext.h +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/tools.hpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_cl.cpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_cl.hpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_cl_part_1.cpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_cl_part_2.cpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_constants.cpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_helpers.hpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/src/wrap_mempool.cpp +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/stubgen/stubgen.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/add-vectors-32.spv +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/add-vectors-64.spv +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/empty-header.h +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_algorithm.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_arrays_in_structs.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_clmath.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_clrandom.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_enqueue_copy.py +0 -0
- {pyopencl-2025.2.6 → pyopencl-2025.2.7}/test/test_wrapper.py +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from urllib.request import urlopen
|
|
2
2
|
|
|
3
|
+
from sphinx.application import Sphinx
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
_conf_url = \
|
|
5
7
|
"https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
|
|
@@ -31,3 +33,11 @@ intersphinx_mapping = {
|
|
|
31
33
|
"mako": ("https://docs.makotemplates.org/en/latest", None),
|
|
32
34
|
"pytools": ("https://documen.tician.de/pytools", None),
|
|
33
35
|
}
|
|
36
|
+
|
|
37
|
+
sphinxconfig_missing_reference_aliases: dict[str, str] = {
|
|
38
|
+
"np.dtype": "class:numpy.dtype",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def setup(app: Sphinx) -> None:
|
|
43
|
+
app.connect("missing-reference", process_autodoc_missing_reference) # noqa: F821
|
|
@@ -61,8 +61,8 @@ Tutorials
|
|
|
61
61
|
`Problem set 2 <https://tiker.net/pub/simula-pyopencl-probset2.pdf>`__
|
|
62
62
|
* Ian Johnson's `PyOpenCL tutorial <https://web.archive.org/web/20170907175053/http://enja.org:80/2011/02/22/adventures-in-pyopencl-part-1-getting-started-with-python>`__.
|
|
63
63
|
|
|
64
|
-
Software
|
|
65
|
-
|
|
64
|
+
Software related to PyOpenCL
|
|
65
|
+
============================
|
|
66
66
|
|
|
67
67
|
* Jon Roose's `pyclblas <https://pyclblas.readthedocs.io/en/latest/index.html>`__
|
|
68
68
|
(`code <https://github.com/jroose/pyclblas>`__)
|
|
@@ -97,6 +97,10 @@ Software that works with or enhances PyOpenCL
|
|
|
97
97
|
* Vincent Favre-Nicolin's `pyvkfft <https://github.com/vincefn/pyvkfft/>`__
|
|
98
98
|
makes `vkfft <https://github.com/DTolm/VkFFT>`__ accessible from PyOpenCL.
|
|
99
99
|
|
|
100
|
+
* Want something like PyOpenCL but for Apple's `Metal <https://en.wikipedia.org/wiki/Metal_(API)>`__?
|
|
101
|
+
Sean True's `PyMetallic <https://github.com/seantrue/pymetallic/>`__ may be
|
|
102
|
+
worth considering.
|
|
103
|
+
|
|
100
104
|
If you know of a piece of software you feel that should be on this list, please
|
|
101
105
|
let me know, or, even better, send a patch!
|
|
102
106
|
|
|
@@ -40,6 +40,7 @@ from typing import (
|
|
|
40
40
|
Literal,
|
|
41
41
|
ParamSpec,
|
|
42
42
|
TypeAlias,
|
|
43
|
+
TypeVar,
|
|
43
44
|
cast,
|
|
44
45
|
)
|
|
45
46
|
from warnings import warn
|
|
@@ -75,6 +76,9 @@ else:
|
|
|
75
76
|
_SVMPointer_or_nothing = ()
|
|
76
77
|
|
|
77
78
|
|
|
79
|
+
ArrayT = TypeVar("ArrayT", bound="Array")
|
|
80
|
+
|
|
81
|
+
|
|
78
82
|
class _NoValue:
|
|
79
83
|
pass
|
|
80
84
|
|
|
@@ -2424,7 +2428,7 @@ def empty_like(
|
|
|
2424
2428
|
allocator=allocator)
|
|
2425
2429
|
|
|
2426
2430
|
|
|
2427
|
-
def zeros_like(ary):
|
|
2431
|
+
def zeros_like(ary: ArrayT) -> ArrayT:
|
|
2428
2432
|
"""Make a new, zero-initialized :class:`Array` having the same properties
|
|
2429
2433
|
as *other_ary*.
|
|
2430
2434
|
"""
|
|
@@ -63,7 +63,7 @@ def equal_strides(
|
|
|
63
63
|
if len(strides1) != len(strides2) or len(strides2) != len(shape):
|
|
64
64
|
return False
|
|
65
65
|
|
|
66
|
-
for s, st1, st2 in zip(shape, strides1, strides2):
|
|
66
|
+
for s, st1, st2 in zip(shape, strides1, strides2, strict=True):
|
|
67
67
|
if s != 1 and st1 != st2:
|
|
68
68
|
return False
|
|
69
69
|
|
|
@@ -98,30 +98,27 @@ class ArrayIsh(Protocol):
|
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
class ArrayFlags:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
forc: bool
|
|
104
|
-
|
|
105
|
-
def __init__(self, ary: ArrayIsh):
|
|
106
|
-
self.f_contiguous = is_f_contiguous_strides(
|
|
101
|
+
def __init__(self, ary: ArrayIsh) -> None:
|
|
102
|
+
self.f_contiguous: bool = is_f_contiguous_strides(
|
|
107
103
|
ary.strides, ary.dtype.itemsize, ary.shape)
|
|
108
|
-
self.c_contiguous = is_c_contiguous_strides(
|
|
104
|
+
self.c_contiguous: bool = is_c_contiguous_strides(
|
|
109
105
|
ary.strides, ary.dtype.itemsize, ary.shape)
|
|
110
|
-
self.forc = self.f_contiguous or self.c_contiguous
|
|
106
|
+
self.forc: bool = self.f_contiguous or self.c_contiguous
|
|
111
107
|
|
|
112
108
|
@override
|
|
113
|
-
def __repr__(self):
|
|
109
|
+
def __repr__(self) -> str:
|
|
114
110
|
return (
|
|
115
111
|
f" C_CONTIGUOUS : {self.c_contiguous}\n"
|
|
116
112
|
f" F_CONTIGUOUS : {self.f_contiguous}"
|
|
117
113
|
)
|
|
118
114
|
|
|
119
115
|
@override
|
|
120
|
-
def __str__(self):
|
|
116
|
+
def __str__(self) -> str:
|
|
121
117
|
return repr(self)
|
|
122
118
|
|
|
123
119
|
|
|
124
|
-
def get_common_dtype(obj1, obj2,
|
|
120
|
+
def get_common_dtype(obj1: ArrayIsh, obj2: ArrayIsh,
|
|
121
|
+
allow_double: bool) -> np.dtype[Any]:
|
|
125
122
|
# Yes, numpy behaves differently depending on whether
|
|
126
123
|
# we're dealing with arrays or scalars.
|
|
127
124
|
|
|
@@ -143,33 +140,6 @@ def get_common_dtype(obj1, obj2, allow_double):
|
|
|
143
140
|
return result
|
|
144
141
|
|
|
145
142
|
|
|
146
|
-
def bound(a):
|
|
147
|
-
high = a.bytes
|
|
148
|
-
low = a.bytes
|
|
149
|
-
|
|
150
|
-
for stri, shp in zip(a.strides, a.shape):
|
|
151
|
-
if stri < 0:
|
|
152
|
-
low += (stri)*(shp-1)
|
|
153
|
-
else:
|
|
154
|
-
high += (stri)*(shp-1)
|
|
155
|
-
return low, high
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
def may_share_memory(a, b):
|
|
159
|
-
# When this is called with a an ndarray and b
|
|
160
|
-
# a sparse matrix, numpy.may_share_memory fails.
|
|
161
|
-
if a is b:
|
|
162
|
-
return True
|
|
163
|
-
if a.__class__ is b.__class__:
|
|
164
|
-
a_l, a_h = bound(a)
|
|
165
|
-
b_l, b_h = bound(b)
|
|
166
|
-
if b_l >= a_h or a_l >= b_h:
|
|
167
|
-
return False
|
|
168
|
-
return True
|
|
169
|
-
else:
|
|
170
|
-
return False
|
|
171
|
-
|
|
172
|
-
|
|
173
143
|
# {{{ as_strided implementation
|
|
174
144
|
|
|
175
145
|
try:
|
|
@@ -26,8 +26,8 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
26
26
|
OTHER DEALINGS IN THE SOFTWARE.
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
|
-
from collections.abc import Sequence
|
|
30
|
-
from typing import Any,
|
|
29
|
+
from collections.abc import Callable, Sequence
|
|
30
|
+
from typing import Any, TypeVar
|
|
31
31
|
|
|
32
32
|
import numpy as np
|
|
33
33
|
from numpy.typing import DTypeLike
|
|
@@ -40,14 +40,12 @@ class TypeNameNotKnown(RuntimeError): # noqa: N818
|
|
|
40
40
|
# {{{ registry
|
|
41
41
|
|
|
42
42
|
class DTypeRegistry:
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
def __init__(self) -> None:
|
|
44
|
+
self.dtype_to_name: dict[np.dtype[Any] | str, str] = {}
|
|
45
|
+
self.name_to_dtype: dict[str, np.dtype[Any]] = {}
|
|
45
46
|
|
|
46
|
-
def
|
|
47
|
-
|
|
48
|
-
self.name_to_dtype = {}
|
|
49
|
-
|
|
50
|
-
def get_or_register_dtype(self,
|
|
47
|
+
def get_or_register_dtype(
|
|
48
|
+
self,
|
|
51
49
|
names: str | Sequence[str],
|
|
52
50
|
dtype: DTypeLike | None = None) -> np.dtype[Any]:
|
|
53
51
|
"""Get or register a :class:`numpy.dtype` associated with the C type names
|
|
@@ -227,7 +225,7 @@ dtype_to_ctype = TYPE_REGISTRY.dtype_to_ctype
|
|
|
227
225
|
get_or_register_dtype = TYPE_REGISTRY.get_or_register_dtype
|
|
228
226
|
|
|
229
227
|
|
|
230
|
-
def _fill_dtype_registry(respect_windows, include_bool=True):
|
|
228
|
+
def _fill_dtype_registry(respect_windows: bool, include_bool: bool = True) -> None:
|
|
231
229
|
fill_registry_with_c_types(
|
|
232
230
|
TYPE_REGISTRY, respect_windows, include_bool)
|
|
233
231
|
|
|
@@ -244,7 +242,7 @@ def parse_c_arg_backend(
|
|
|
244
242
|
scalar_arg_factory: Callable[[np.dtype[Any], str], ArgTypeT],
|
|
245
243
|
vec_arg_factory: Callable[[np.dtype[Any], str], ArgTypeT],
|
|
246
244
|
name_to_dtype: Callable[[str], np.dtype[Any]] | DTypeRegistry | None = None,
|
|
247
|
-
):
|
|
245
|
+
) -> ArgTypeT:
|
|
248
246
|
if isinstance(name_to_dtype, DTypeRegistry):
|
|
249
247
|
name_to_dtype_clbl = name_to_dtype.name_to_dtype.__getitem__
|
|
250
248
|
elif name_to_dtype is None:
|
|
@@ -40,9 +40,6 @@ reportUnnecessaryIsInstance = "none"
|
|
|
40
40
|
reportUnusedCallResult = "none"
|
|
41
41
|
reportExplicitAny = "none"
|
|
42
42
|
reportUnreachable = "hint"
|
|
43
|
-
# array.py looks like stdlib array, but pyright doesn't know this
|
|
44
|
-
# won't ever be a top-level anything.
|
|
45
|
-
reportShadowedImports = "none"
|
|
46
43
|
|
|
47
44
|
# This reports even cycles that are qualified by 'if TYPE_CHECKING'. Not what
|
|
48
45
|
# we care about at this moment.
|
|
@@ -772,7 +772,7 @@ def pytest_generate_tests_for_pyopencl(metafunc: pytest.Metafunc) -> None:
|
|
|
772
772
|
functions, and they will automatically be run for each OpenCL device/platform
|
|
773
773
|
in the system, as appropriate.
|
|
774
774
|
|
|
775
|
-
The following two environment
|
|
775
|
+
The following two environment variables is also supported to control
|
|
776
776
|
device/platform choice::
|
|
777
777
|
|
|
778
778
|
PYOPENCL_TEST=0:0,1;intel=i5,i7
|
|
@@ -11,7 +11,7 @@ requires = [
|
|
|
11
11
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "pyopencl"
|
|
14
|
-
version = "2025.2.
|
|
14
|
+
version = "2025.2.7"
|
|
15
15
|
description = "Python wrapper for OpenCL"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
license = "MIT"
|
|
@@ -148,6 +148,9 @@ environment-pass = [
|
|
|
148
148
|
test-skip = [
|
|
149
149
|
"*-macosx_arm64",
|
|
150
150
|
]
|
|
151
|
+
skip = [
|
|
152
|
+
"cp31?t-*",
|
|
153
|
+
]
|
|
151
154
|
|
|
152
155
|
[tool.cibuildwheel.linux]
|
|
153
156
|
skip = [
|
|
@@ -172,9 +175,6 @@ before-all = [
|
|
|
172
175
|
repair-wheel-command = "auditwheel repair -w {dest_dir} --lib-sdir=/.libs {wheel}"
|
|
173
176
|
|
|
174
177
|
[tool.cibuildwheel.macos]
|
|
175
|
-
skip = [
|
|
176
|
-
"pp*",
|
|
177
|
-
]
|
|
178
178
|
before-all = "bash {package}/scripts/build-ocl-macos.sh"
|
|
179
179
|
test-command = "pytest {project}/test/test_array.py" # same limitation as conda-forge
|
|
180
180
|
|
|
@@ -187,7 +187,6 @@ MACOSX_DEPLOYMENT_TARGET = "10.14"
|
|
|
187
187
|
[tool.cibuildwheel.windows]
|
|
188
188
|
skip = [
|
|
189
189
|
"*-win32",
|
|
190
|
-
"pp*",
|
|
191
190
|
]
|
|
192
191
|
test-command = ""
|
|
193
192
|
before-all = "bash {package}/scripts/build-ocl-windows.sh"
|
|
@@ -462,7 +462,7 @@ def test_pow_number(ctx_factory: cl.CtxFactory):
|
|
|
462
462
|
# {{{ test_multiply
|
|
463
463
|
|
|
464
464
|
def test_multiply(ctx_factory: cl.CtxFactory):
|
|
465
|
-
"""Test the
|
|
465
|
+
"""Test the multiplication of an array with a scalar. """
|
|
466
466
|
|
|
467
467
|
context = ctx_factory()
|
|
468
468
|
queue = cl.CommandQueue(context)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|