Upgrading Version of Thrust in CUDA 6.0

All,

I’m fairly new to using the Thrust library. I know that CUDA 6.0 comes with Thrust 1.7.0, but I was wondering about how I could upgrade to a newer version of the Thrust library. I’m attempting to perform inner products on complex numbers using std::complex and it doesn’t appear to be compatible with the current version of Thrust. I saw that the latest version has thrust::complex and I believe that to be compatible with the thrust::inner_product function. My only concern is that if I drop the latest Thrust source code from github over my current thrust directory in /usr/local/cuda-6.0/include/thrust that I will break something. Does anybody have experience with upgrading their Thrust library?

Thanks,
Chris

Yes, you can update thrust. A step-by-step writeup is here:

https://groups.google.com/forum/#!topic/thrust-users/PqDXqwOW2Vs

If you follow that method, you can easily switch back to the original version, if you think something is broken. Thrust is a header/template library, so only the include headers need to be changed to switch to a new library version.

Ah thank you! This guide worked perfectly for me and now I can use thrust::complex with the thrust::inner_product!