Giter VIP home page Giter VIP logo

cpp_bindings_demo's Introduction

About

This repo contains an example of how to create Python bindings for a C++ library. The Python package is contained in the code/ directory, with the C++ library nested in code/bindings/cpp. The package is built using scikit-build-score to stitch together Python and CMake for the build. The C++ library implements saxpy (scalar multiplication followed by vector addition) using Thrust. The Python package exposes a simple binding that allows saxpy to be called on a pair of CuPy arrays.

This repo contains a docker-compose configuration and a Dockerfile that can be used to build the necessary container. It also contains a pair of (shell and Python) scripts that may be used to run the example. Assuming docker-compose is installed, the example may be run as follows:

# Clone the project
git clone --recurse-submodules https://github.com/vyasr/cpp_bindings_demo
cd cpp_bindings_demo

# Build and launch the Docker container
docker-compose build
docker-compose run cpp_bindings_demo

# Inside the container:
./demo.sh

cpp_bindings_demo's People

Contributors

pentschev avatar shwina avatar vyasr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.