opencl-for-python 0.4.0
Open CL Python bindings
Latest Version: 0.5.2
This is yet another set of Python bindings for OpenCL.
Warning
This project currently is in a beta release state.
Features:
Python 2 and Python 3 compatibility.
Supports OpenCL 1.1
- Discoverable properties and methods:
No more ctx.get_info(pyopencl.context_info.DEVICES) just do ctx.devices
Tight integration with ctypes:
import opencl as cl from ctypes import c_float ctx = cl.Context() a = cl.empty(ctx, [2, 3], ctype=c_float)
Call kernels like a python function with defaults and keyword arguments:
import opencl as cl from ctypes import c_float, c_int source = '__kernel void foo(__global float*a, int b, float c) ...' ... # Create a program and context foo = program.foo foo.argnames = 'a', 'b', 'c' foo.argtypes = cl.global_memory(c_float, ndim=2), c_int, c_float # Equivalent to def foo(a, b=1, c=2.0): foo.__defaults__ = 1, 2.0 event = foo(queue, a)
Memory objects support indexing and slicing:
mem2 = memobj[:, 1, :-1]
Links:
- Homepage
- Issue Tracker
- Development documentation
- PyPi
- Github
- OpenCL 1.1 spec
- Also please check out CLyther
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| opencl-for-python-0.4.0.tar.gz (md5) | Source | 2012-01-04 | 649KB | 111 | |
- Author: Enthought, Inc.
- Home Page: http://srossross.github.com/oclpb
- License: BSD
- Platform: Windows,Linux,Mac OS-X,Unix,Solaris
-
Categories
- Development Status :: 5 - Production/Stable
- Intended Audience :: Developers
- Intended Audience :: Science/Research
- License :: OSI Approved :: BSD License
- Operating System :: MacOS
- Operating System :: Microsoft :: Windows
- Operating System :: OS Independent
- Operating System :: POSIX
- Operating System :: Unix
- Programming Language :: Python :: 2
- Programming Language :: Python :: 3
- Topic :: Scientific/Engineering
- Topic :: Software Development
- Topic :: Software Development :: Libraries
- Package Index Owner: srossross
- DOAP record: opencl-for-python-0.4.0.xml
