pyopencl 2023.1.4__cp38-cp38-macosx_11_0_arm64.whl → 2024.2__cp38-cp38-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.
- pyopencl/__init__.py +82 -80
- pyopencl/_cl.cpython-38-darwin.so +0 -0
- pyopencl/algorithm.py +8 -10
- pyopencl/array.py +16 -12
- pyopencl/bitonic_sort.py +5 -4
- pyopencl/cache.py +22 -22
- pyopencl/capture_call.py +4 -3
- pyopencl/characterize/__init__.py +4 -2
- pyopencl/characterize/performance.py +2 -1
- pyopencl/clmath.py +2 -1
- pyopencl/clrandom.py +5 -369
- pyopencl/cltypes.py +4 -1
- pyopencl/compyte/dtypes.py +1 -1
- pyopencl/compyte/ndarray/gen_elemwise.py +6 -5
- pyopencl/compyte/ndarray/gen_reduction.py +6 -6
- pyopencl/compyte/ndarray/setup_opencl.py +3 -2
- pyopencl/compyte/ndarray/test_gpu_elemwise.py +5 -4
- pyopencl/compyte/ndarray/test_gpu_ndarray.py +0 -1
- pyopencl/elementwise.py +4 -6
- pyopencl/invoker.py +15 -9
- pyopencl/ipython_ext.py +1 -1
- pyopencl/reduction.py +5 -5
- pyopencl/scan.py +17 -21
- pyopencl/tools.py +13 -16
- pyopencl/version.py +1 -1
- pyopencl-2024.2.data/data/CITATION.cff +74 -0
- {pyopencl-2023.1.4.dist-info → pyopencl-2024.2.data/data}/LICENSE +0 -23
- pyopencl-2024.2.data/data/Makefile.in +21 -0
- pyopencl-2024.2.data/data/README.rst +70 -0
- pyopencl-2024.2.data/data/README_SETUP.txt +34 -0
- pyopencl-2024.2.data/data/aksetup_helper.py +1013 -0
- pyopencl-2024.2.data/data/configure.py +6 -0
- pyopencl-2024.2.data/data/contrib/cldis.py +91 -0
- pyopencl-2024.2.data/data/contrib/fortran-to-opencl/README +29 -0
- pyopencl-2024.2.data/data/contrib/fortran-to-opencl/translate.py +1441 -0
- pyopencl-2024.2.data/data/contrib/pyopencl.vim +84 -0
- pyopencl-2024.2.data/data/doc/Makefile +23 -0
- pyopencl-2024.2.data/data/doc/algorithm.rst +214 -0
- pyopencl-2024.2.data/data/doc/array.rst +305 -0
- pyopencl-2024.2.data/data/doc/conf.py +26 -0
- pyopencl-2024.2.data/data/doc/howto.rst +105 -0
- pyopencl-2024.2.data/data/doc/index.rst +137 -0
- pyopencl-2024.2.data/data/doc/make_constants.py +561 -0
- pyopencl-2024.2.data/data/doc/misc.rst +885 -0
- pyopencl-2024.2.data/data/doc/runtime.rst +51 -0
- pyopencl-2024.2.data/data/doc/runtime_const.rst +30 -0
- pyopencl-2024.2.data/data/doc/runtime_gl.rst +78 -0
- pyopencl-2024.2.data/data/doc/runtime_memory.rst +527 -0
- pyopencl-2024.2.data/data/doc/runtime_platform.rst +184 -0
- pyopencl-2024.2.data/data/doc/runtime_program.rst +364 -0
- pyopencl-2024.2.data/data/doc/runtime_queue.rst +182 -0
- pyopencl-2024.2.data/data/doc/subst.rst +36 -0
- pyopencl-2024.2.data/data/doc/tools.rst +4 -0
- pyopencl-2024.2.data/data/doc/types.rst +42 -0
- pyopencl-2024.2.data/data/examples/black-hole-accretion.py +2227 -0
- pyopencl-2024.2.data/data/examples/demo-struct-reduce.py +75 -0
- pyopencl-2024.2.data/data/examples/demo.py +39 -0
- pyopencl-2024.2.data/data/examples/demo_array.py +32 -0
- pyopencl-2024.2.data/data/examples/demo_array_svm.py +37 -0
- pyopencl-2024.2.data/data/examples/demo_elementwise.py +34 -0
- pyopencl-2024.2.data/data/examples/demo_elementwise_complex.py +53 -0
- pyopencl-2024.2.data/data/examples/demo_mandelbrot.py +183 -0
- pyopencl-2024.2.data/data/examples/demo_meta_codepy.py +56 -0
- pyopencl-2024.2.data/data/examples/demo_meta_template.py +55 -0
- pyopencl-2024.2.data/data/examples/dump-performance.py +38 -0
- pyopencl-2024.2.data/data/examples/dump-properties.py +86 -0
- pyopencl-2024.2.data/data/examples/gl_interop_demo.py +84 -0
- pyopencl-2024.2.data/data/examples/gl_particle_animation.py +218 -0
- pyopencl-2024.2.data/data/examples/ipython-demo.ipynb +203 -0
- pyopencl-2024.2.data/data/examples/median-filter.py +99 -0
- pyopencl-2024.2.data/data/examples/n-body.py +1070 -0
- pyopencl-2024.2.data/data/examples/narray.py +37 -0
- pyopencl-2024.2.data/data/examples/noisyImage.jpg +0 -0
- pyopencl-2024.2.data/data/examples/pi-monte-carlo.py +1166 -0
- pyopencl-2024.2.data/data/examples/svm.py +82 -0
- pyopencl-2024.2.data/data/examples/transpose.py +229 -0
- pyopencl-2024.2.data/data/pytest.ini +3 -0
- pyopencl-2024.2.data/data/src/bitlog.cpp +51 -0
- pyopencl-2024.2.data/data/src/bitlog.hpp +83 -0
- pyopencl-2024.2.data/data/src/clinfo_ext.h +134 -0
- pyopencl-2024.2.data/data/src/mempool.hpp +444 -0
- pyopencl-2024.2.data/data/src/pyopencl_ext.h +77 -0
- pyopencl-2024.2.data/data/src/tools.hpp +90 -0
- pyopencl-2024.2.data/data/src/wrap_cl.cpp +61 -0
- pyopencl-2024.2.data/data/src/wrap_cl.hpp +5853 -0
- pyopencl-2024.2.data/data/src/wrap_cl_part_1.cpp +369 -0
- pyopencl-2024.2.data/data/src/wrap_cl_part_2.cpp +702 -0
- pyopencl-2024.2.data/data/src/wrap_constants.cpp +1274 -0
- pyopencl-2024.2.data/data/src/wrap_helpers.hpp +213 -0
- pyopencl-2024.2.data/data/src/wrap_mempool.cpp +731 -0
- pyopencl-2024.2.data/data/test/add-vectors-32.spv +0 -0
- pyopencl-2024.2.data/data/test/add-vectors-64.spv +0 -0
- pyopencl-2024.2.data/data/test/empty-header.h +1 -0
- pyopencl-2024.2.data/data/test/test_algorithm.py +1180 -0
- pyopencl-2024.2.data/data/test/test_array.py +2392 -0
- pyopencl-2024.2.data/data/test/test_arrays_in_structs.py +100 -0
- pyopencl-2024.2.data/data/test/test_clmath.py +529 -0
- pyopencl-2024.2.data/data/test/test_clrandom.py +75 -0
- pyopencl-2024.2.data/data/test/test_enqueue_copy.py +271 -0
- pyopencl-2024.2.data/data/test/test_wrapper.py +1554 -0
- pyopencl-2024.2.dist-info/LICENSE +282 -0
- {pyopencl-2023.1.4.dist-info → pyopencl-2024.2.dist-info}/METADATA +12 -12
- pyopencl-2024.2.dist-info/RECORD +122 -0
- {pyopencl-2023.1.4.dist-info → pyopencl-2024.2.dist-info}/WHEEL +1 -1
- pyopencl/cl/pyopencl-ranluxcl.cl +0 -957
- pyopencl-2023.1.4.dist-info/RECORD +0 -48
- {pyopencl-2023.1.4.dist-info → pyopencl-2024.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# example by Roger Pau Monn'e
|
|
2
|
+
import numpy as np
|
|
3
|
+
|
|
4
|
+
import pyopencl as cl
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
demo_r = np.empty((500, 5), dtype=np.uint32)
|
|
8
|
+
ctx = cl.create_some_context()
|
|
9
|
+
queue = cl.CommandQueue(ctx)
|
|
10
|
+
|
|
11
|
+
mf = cl.mem_flags
|
|
12
|
+
demo_buf = cl.Buffer(ctx, mf.WRITE_ONLY, demo_r.nbytes)
|
|
13
|
+
|
|
14
|
+
prg = cl.Program(ctx,
|
|
15
|
+
"""
|
|
16
|
+
__kernel void demo(__global uint *demo)
|
|
17
|
+
{
|
|
18
|
+
int i;
|
|
19
|
+
int gid = get_global_id(0);
|
|
20
|
+
for(i=0; i<5;i++)
|
|
21
|
+
{
|
|
22
|
+
demo[gid*5+i] = (uint) 1;
|
|
23
|
+
}
|
|
24
|
+
}""")
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
prg.build()
|
|
28
|
+
except Exception:
|
|
29
|
+
print("Error:")
|
|
30
|
+
print(prg.get_build_info(ctx.devices[0], cl.program_build_info.LOG))
|
|
31
|
+
raise
|
|
32
|
+
|
|
33
|
+
prg.demo(queue, (500,), None, demo_buf)
|
|
34
|
+
cl.enqueue_copy(queue, demo_r, demo_buf).wait()
|
|
35
|
+
|
|
36
|
+
for res in demo_r:
|
|
37
|
+
print(res)
|
|
Binary file
|