dpctl Cython API

All Python modules of dpctl come with __init__.pxd alongside __init__.py files permitting doing both import dpctl and cimport dpctl as c_dpctl.

Locations of Cython declaration files in the package installation layout are as follows:

__init__.pxd
_backend.pxd
_sycl_context.pxd
_sycl_device.pxd
_sycl_device_factory.pxd
_sycl_event.pxd
_sycl_platform.pxd
_sycl_queue.pxd
_sycl_queue_manager.pxd
sycl.pxd

memory/__init__.pxd
memory/_memory.pxd

program/__init__.pxd
program/_program.pxd

tensor/__init__.pxd
tensor/_usmarray.pxd
tensor/_dlpack.pxd

File _backend.pxd redefines symbols from DPCTLSyclInterface library for Cython.

File sycl.pxd provides casters from opaque types in “DPCTLSyclInterface” C library to SYCL C++ object pointers.

Please refer to the examples/cython folder in the project repository for a collection of examples.