Exposing Your Code to Python
Every library developer must choose how to make their code available to users, but when using C++, one option is simply to let users compile against the binary library. However, many users who need GPU acceleration have some piece of code that handles data in Python. If you are one of those users, this chapter is for you!
You will learn first about the alternative ways of exposing your code to Python, and then about concrete examples that will show you how to call the GPU code.
The chapter wraps up with a section on performance considerations for each of the alternatives.
The chapter’s main topics, then, are the following:
- Using Ctypes
- Wrapping with your own code
- Performance considerations