dpctl icon indicating copy to clipboard operation
dpctl copied to clipboard

Add support for complex numbers as kernel arguments

Open diptorupd opened this issue 5 years ago • 2 comments

We will eventually need to support complexes as well.

This is not straightforward with ctypes: https://stackoverflow.com/questions/13373291/complex-number-in-ctypes

So down the road we might just introduce our own scalar type in dpctl.

Originally posted by @oleksandr-pavlyk in https://github.com/IntelPython/dpctl/pull/80#discussion_r498307355

diptorupd avatar Oct 01 '20 17:10 diptorupd

Complex number support for numba-dpex works using current dpctl. Numba represents complex values as a 2-tuple of floats and we pass the arguments as flattened arguments to kernels. Thus, no change is needed on dpctl's side.

diptorupd avatar Mar 01 '24 01:03 diptorupd

Reopening as, while not needed for numba-dpex, dpctl supporting complex kernel arguments would be a nice feature in the future

ndgrigorian avatar Mar 21 '25 23:03 ndgrigorian