Sign in
Ctrl K

cudawrappers

The cudawrappers library is a C++ wrapper for the Nvidia C libraries such as the CUDA driver, NVRTC, and cuFFT.

12
contributors

Cite this software

What cudawrappers can do for you

This library is a C++ wrapper for the Nvidia C libraries (e.g. CUDA driver, NVRTC, cuFFT etc.). The main purposes are:

  1. easier resource management, leading to lower risk of programming errors;
  2. better fault handling (through exceptions);
  3. more compact user code.

Originally, the API enforced RAII to even further reduce the risk of faulty code, but enforcing RAII and compatibility with (unmanaged) objects obtained outside this API are mutually exclusive.

Requirements

SoftwareMinimum version
CUDA10.0 or later
CMake3.17 or later
gcc9.3 or later
OSLinux distro (amd64)
HardwareType
GPU architectureNVIDIA PASCAL or newer

Usage

We use CMake in this project, so you can clone and build this library with the following steps:

git clone https://github.com/nlesc-recruit/cudawrappers
cd cudawrappers
cmake -S . -B build
make -C build

This command will create a build folder, compile the code and generate the library libcudawrappers.so in the build directory.
For more details on the building requirements and on testing, check the developer documentation.

To install to ~/.local, use

git clone https://github.com/nlesc-recruit/cudawrappers
cd cudawrappers
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local -S . -B build
make -C build
make -C build install

Usage examples

You can include the cudawrappers library in your own projects in various ways. We have created a few repositories with example setups to get you started:

  1. usage-example-git-submodules Example project that uses the cudawrappers library as a dependency by using git submodules on its source tree.
  2. usage-example-locally-installed Example project that uses the cudawrappers library as a dependency by having it locally installed.
  3. usage-example-cmake-pull Example project that uses the cudawrappers library as a dependency by having cmake pull it in from github.
Keywords
Programming languages
  • C++ 73%
  • CMake 14%
  • Python 13%
License
</>Source code

Participating organisations

ASTRON
Netherlands eScience Center

Contributors

JR
John W. Romein
ASTRON
BvW
Ben van Werkhoven
FD
Faruk Diblen
JS
Jurriaan H. Spaaks
ASS
Abel Soares Siqueira
BA
Bouwe Andela
Leon Oostrum
Leon Oostrum
Laura Ootes
Laura Ootes

Related projects

RECRUIT

Reducing Energy Consumption in Radio-astronomical and Ultrasound Imaging Tools

Updated 18 months ago
In progress