Skip to content

Instantly share code, notes, and snippets.

@pradal
Forked from pfernique/euroscipy.md
Last active June 21, 2017 07:51
Show Gist options
  • Save pradal/32a4bc0a702e16af3df4c2dd0faa1022 to your computer and use it in GitHub Desktop.
Save pradal/32a4bc0a702e16af3df4c2dd0faa1022 to your computer and use it in GitHub Desktop.
Summary for EuroSciPy 2017

== AutoWIG: Wrapping very large C++ libraries in Python automatically

Most of Python and R scientific packages incorporate compiled scientific libraries to speed up the code and reuse legacy libraries. While several semi-automatic solutions exist to wrap these compiled libraries, the process of wrapping a large library is cumbersome and time consuming.

In this paper, we introduce AutoWIG, a Python package that wraps automatically compiled libraries into high-level languages using LLVM/Clang technologies and the Mako templating engine.

Our approach is automatic, extensible, and applies to complex C++ libraries, composed of thousands of classes or incorporating modern meta-programming constructs.

In this talk we will describe AutoWIG main features and cover how you can generate Python bindings for your C++ libraries. This will be illustrated by the bootstrapping of LLVM/Clang Python bindings in Jupyter Notebooks running in a Docker image, in order to enable the generation of wrappers for template class instantiated. An example of the wrapping of C++ Statistical libraries (TODO: Graphical Models) will be discussed in depth.

Ideas:

  • Reproducibility through Jupyter Notebook and Docker
  • Full C++ Introspection using PyClang, our wrappers of Clang.
  • Powerfull integration with your compiler toolchain (e.g. SCons)
  • Scientific illustration on Graphical Models and GLM (ou autre)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment