thrust
Finding the maximum element value AND its position using CUDA Thrust
How do I get not only the v开发者_开发问答alue but also the position of the maximum (minimum) element (res.val and res.pos)?[详细]
2023-04-12 01:52 分类:问答From thrust::device_vector to raw pointer and back?
I understand how to go from a vector to a raw pointer but im skipping a beat on how to go backwards. // our host vector[详细]
2023-04-11 12:20 分类:问答copying data from device to host not working
i\'m using vs2010 on windows 7 x64 and the CUDA toolkit v4.0 for my university project. I\'d like to acheive a simple gpu-vs-cpu test, most of it is done, but none of my cuda tests return any results.[详细]
2023-04-10 05:19 分类:问答Thrust Complex Transform of 3 different size vectors
Hello I have this loop in C+, and I was trying to convert it to thrust but without getting the same results...[详细]
2023-04-10 01:20 分类:问答How do I reorder a vector during a Thrust transformation?
How could i transform this simple code to thrust code? for (i=0;i<cA-rA;i++) sn[i]=c[n_index[i]]-sn[i];[详细]
2023-04-09 16:47 分类:问答Counting occurrences of numbers in a CUDA array
I have an array of unsigned integers stored on the GPU with CUDA (typically 1000000 elements). I would like 开发者_如何学Cto count the occurrence of every number in the array. There are only a few dis[详细]
2023-04-08 15:24 分类:问答STL thrust multiple vector transform?
I was wondering if there was a more efficient way of writing a = a + b + c? thrust::transform(b.begin(), b.end(), c.begin(), b.begin(), thrust::plus<int>());[详细]
2023-04-07 05:00 分类:问答Cuda Thrust Custom function
How can I impliment this function in Thrust? for (i=0;i<n;i++) if (i==pos) h1[i]=1/h1[i]; else 开发者_运维技巧h1[i]=-h1[i]/value;[详细]
2023-04-05 22:17 分类:问答removing entries in sorted list: efficiently in gpu
I am trying to code the following problem in cuda/thrust. I am given a list of key and three values associated with each keys. I have managed to sort them in lexicographic order. The input now needs t[详细]
2023-03-31 09:42 分类:问答Bitonic Sorting Network vs Thrust::sort_by_key
I implemented an algorithm which used sorting. I tried Thrust::sort_by_key that took around 0.4s to sort an array with 10^7 elements.[详细]
2023-03-28 06:53 分类:问答