Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Using CUDPP with Visual Studio

📅 2011-Feb-23 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cudpp, visual studio ⬩ 📚 Archive

The CUDPP (CUDA Data Parallel Primitives) library provides the essential primitives necessary for any parallel data processing on the GPU. This includes functions to scan, compact and sort data. Source code of CUDPP can be downloaded from here and compiled using Visual Studio. Beware that the compilation can take quite a while.

A version of CUDPP is shipped by NVIDIA inside its GPU Computing SDK. Using this version of CUDPP with your Visual Studio project is pretty easy:

  1. Include cudpp.h in source code that uses CUDPP.

  2. Add the CUDPP include directory to the Additional Include Directories of your CUDA Build Rule. Typically this directory is $(NVSDKCOMPUTE_ROOT)/C/common/inc/cudpp

  3. Link with cudpp32.lib or cudpp64.lib. This library file can be provided in LinkerInputAdditional Dependencies

  4. Add the CUDPP library directory to LinkerGeneralAdditional Library Directories. Typically this directory is $(NVSDKCOMPUTE_ROOT)/C/common/lib

  5. When an executable linked with CUDPP is executed, it looks for a CUDPP DLL file (cudpp32_32_16.dll for example). This is typically found in the $(NVSDKCOMPUTE_ROOT)/C/common/bin directory. The GPU Computing SDK adds this directory to the %PATH% environment variable when it is installed. For some reason, if it is not found in %PATH%, either add it there or copy the DLL file to the same directory as that of the executable.

Tried with: CUDPP 1.1.1, CUDA 3.2 and Visual Studio 2008


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧