Skip to main content

Welcome to OpenCL for Python’s documentation!

This is yet another set of Python bindings for OpenCL.

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]

Metadata

Release files for opencl-for-python 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opencl-for-python 0.5.2
File Size Uploaded Provenance
opencl-for-python-0.5.2.tar.gz 497.0 kB Without provenance Details

Release files / opencl-for-python-0.5.2.tar.gz

Download URL opencl-for-python-0.5.2.tar.gz
Size 497.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2882299749e074e8e79071aa4445df8d17fe666fac81337f1891061835ee6592
BLAKE2b-256 checksum
How to use checksums
b78fc04c187a85b74db46e0155fc8a62207412b4f784a877629abdcf83b0b6ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for opencl-for-python 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page