CUDA, vectors and CUPP


I understand that the use of STL vector containers in CUDA kernels is not really possible but that CUPP offers a way of integrating vectors in C++ with CUDA kernels (this is all I really want it for). When I try to compile the vector example provided with the CUPP download in Visual studio 2008 I keep getting the message “error: a global routine cannot have reference arguments” which is a problem with the following lines of code:

__global__ void global_function (cupp::deviceT::vector<int> &i) {

	i[threadIdx.x] *= 2;


From the very little info that I have found this should be dealt with using the cupp_v0.1.4_rc.tar.gz CUPP release that should work with the latest version of CUDA. However, I tried this and it does not seem to help. I was wondering if anyone who had successfully integrated the CUPP framework in Windows had any tips?

I couldn’t get it to compile with CUDA 3.2. I think there is some bitrot :)

I’m not a CUPP user so this may be nonsense but …

You have a wrapper around the vector but not one around global_function.
Won’t nvcc see this as a regular function (which cannot take reference arguments)?