首页 > 代码库 > cudpp库的使用

cudpp库的使用

项目主页

http://cudpp.github.io/

根据这个网址的提示进行

https://github.com/cudpp/cudpp/wiki/BuildingCUDPPwithCMake

我的环境:win7 x64+vs2013

编译

首先是下载cmake

下载地址

http://www.cmake.org/download/

我是通过cmake-gui方式来编译的

The cmake gui can be used to interactively configure and generate CUDPP build files. Just run cmake-gui, then set the path to the CUDPP source tree in the field "Where is the source code", and set the path to where you want the build files generated in "Where to build the binaries".

Then press "Configure". You will see a list of options you can set. Click "Advanced" to see advanced options. Click "grouped" to logically group them.

Once you have set the necessary options (see below), click "Generate" to generate makefiles.

Go to the directory you set in "Where to build the binaries", and run make (`*`nix), or open the cudpp.sln (Windows).

用2.2的版本,貌似有问题,缺少文件,我找了这个文件补充到指定位置,还是有问题。暂时不知道怎么解决,我就下载了2.2的版本,编译通过。

最后打开就是这个效果

选项

Useful options to set:

  • CMAKE_BUILD_TYPE: set to Debug for debug builds, Release (or blank) for release builds. Not needed on Windows.
  • BUILD_APPLICATIONS: set to on to build the CUDPP example applications and testrig in addition to CUDPP libraries.
  • BUILD_SHARED_LIBS: set to on to build dynamic/shared CUDPP libraries, off to build static libraries
  • CUDA_VERBOSE_BUILD: Print out commands run while compiling CUDA source files
  • CUDA_VERBOSE_PTXAS: Print out the output of --ptxas-options=-verbose, which displays details of shared memory, registers, and constants used by CUDA device kernels.

最后

On Windows, rather than running make, you just open the generated cudpp.sln in your source directory.

cudpp库的使用