cd /path/to/thrust/include
vim version.cu
#include <thrust/version.h> #include <iostream> int main(void) { int major = THRUST_MAJOR_VERSION; int minor = THRUST_MINOR_VERSION; std::cout << "Thrust v" << major << "." << minor << std::endl; return 0; }
nvcc version.cu -o version ./version
回显显示信息如下图所示。
cd /path/to/thrust/thrust/build/ ctest
回显显示信息如下图所示。