Open gmarkall opened 3 months ago
In Cython code, we have had some success using uintptr_t
(for example)
Cython treats uintptr_t
as coercible to/from a Python int
object. So users are then able to pass 0
then have that treated as NULL
at the Cython/C/C++ layer. There may be some explicit casting between uintptr_t
and C/C++ pointer types like void*
(for example), but this is pretty trivial/fast to do
Not sure exactly how this maps to numba-cuda
's model of working with C/C++, but hopefully this is a helpful way of thinking about the problem
From numba/numba#9655:
For example:
cc @ed-o-saurus