xnd-project / numba-xnd

Integrating xnd into numba
https://xnd.io/
5 stars 1 forks source link

Look into using clang to generate bindings instead of xndtools #19

Open saulshanabrook opened 5 years ago

saulshanabrook commented 5 years ago

Currently, we parse some of the xnd/ndtypes/gumath c files to generate compatible LLVM functions that can call their exposed functions. We do this by parsing the C files in Python.

Instead, we could use clang itself to generate these bindings. That way we don't have to reimplement a C parser and define the mappings between C and LLVM ABIs ourselves.

See https://github.com/aguinet/dragonffi/issues/13 for some discussion using dragonffi to do this (it has a Python API)