Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
86 views

I'm trying to use controlled stepper in boost odeint with thrust::host_vector container and thrust::complex<double> data type. The following code compiles when I use std::vector and std::complex&...
solver's user avatar
  • 41
1 vote
0 answers
78 views

I wrote a function incorporating several calls to 2d-ffts and matrix-vector-multiplications in C++, using arrayfire, such that I can run and compile the program both on the CPU and GPU. Reason for ...
arc_lupus's user avatar
  • 4,156
0 votes
1 answer
609 views

Let us say, we have a thrust device vector of size 10^16 and another vector of size 10^8 containing some indices (not necessarily sorted). We want to sum all the elements of the first vector if it's ...
solver's user avatar
  • 41
1 vote
1 answer
263 views

I am trying to partition an array with the thrust library's partition_copy function. I have seen examples where pointers are passed, but I need to know how many elements are in each partition. What ...
A. Lindberg's user avatar
1 vote
2 answers
882 views

Problem description: I want to use thrust to set the value of some elements in an array based on another index array. One simple example is shown below: // input: int array[10] = {1,9,9,6,0,1,1,6,1,...
DerekLu's user avatar
  • 99
2 votes
1 answer
1k views

I have a question regarding the thrust library when using CUDA. I am using a thrust function, i.e. exclusive_scan, and I want to use raw pointers. I am using raw (device) pointers because I want to ...
RBaumgar's user avatar
1 vote
1 answer
477 views

I want to print the instance of Tweet datatype in main function, but the summary trait don't implement the debug trait. Is there any way to implement a trait on trait or any work around. ...
Areeb Sid's user avatar
-2 votes
1 answer
54 views

I am experiencing on Windows 10 a situation in which the same code, either compiled with CUDA 9.2 backend (using nvcc with cl.exe) or compiled with OpenMP backend (using g++ provided by MinGW), ...
Carlo Emilio Montanari's user avatar
1 vote
1 answer
147 views

I have an array of int which serves as keys in my application. This is already sorted. I want to assign each unique key a unique index starting from 0. How would I do that in cuda using thrust? ...
cluelessGowtham's user avatar
0 votes
2 answers
1k views

I have a question that I found many threads in, but none did explicitly answer my question. I am trying to have a multidimensional array inside the kernel of the GPU using thrust. Flattening would be ...
RBaumgar's user avatar
3 votes
1 answer
434 views

Summary I am printing device vectors using this example. I would like to have the arrays line up. Format settings are only being applied to the first number. My Code template <typename ...
John Mansell's user avatar
-1 votes
1 answer
265 views

Is there a way to perform multiway (>2) stable partition in Thrust? Either stable partition or stable partition copy both are equally interesting. Currently I can only use two-way stable partition ...
Tomilov Anatoliy's user avatar
3 votes
1 answer
478 views

I am working on a project (essentially a physics simulation) in which I need to perform calculations on a large number of nodes over many time steps. I have currently implemented each type of ...
Charlie H.'s user avatar
0 votes
1 answer
151 views

I have 100000 arrays that are stored in a big 1D array. The size of each array is L =1000 and are ordered in descending order order. Each array is divided in m=5 segments.(S1,S2,S3,S4,S5) For ...
sara idrissi's user avatar
0 votes
1 answer
148 views

I would like to conditional copy data from vector, basing on stencil vector, which is N times shorter. Every element in stencil would be responsible for N elements in data vector. Suppose that the ...
JanW's user avatar
  • 113
1 vote
1 answer
4k views

I'm new to CUDA and Thrust and I'm trying to implement a matrix multiplication and I want to achieve this by only using the thrust algorithms, because I want to avoid calling a kernel manually. Is ...
Carlos CM's user avatar
0 votes
1 answer
273 views

I'm trying to use a special function provided by boost.math in a thrust algorithm. Basically, I want to do a transformation, like so thrust::device_vector<double> in(1000); thrust::...
fiziks's user avatar
  • 257
1 vote
1 answer
1k views

After searching a long time, I still can't solve this problem. I have two vectors: x = [a1,...,aN], y = [b1,...,bN]. And I want to compute their inner product: = a1*conj(b1) + ... + aN*conj(bN). (...
DerekLu's user avatar
  • 99
0 votes
1 answer
463 views

I am working on defining an iterator_adaptor based on a base iterator. The whole thing works when working on host_vectors, but when I apply it to device_vectors, the compiler throws an error: initial ...
user3646557's user avatar
1 vote
1 answer
390 views

I have many (200 000) vectors of integers (around 2000 elements in each vector) in GPU memory. I am trying to parallelize algorithm which needs to sort, calculate average, standard deviation and ...
Dariusz's user avatar
  • 11
3 votes
1 answer
2k views

I'm writing a program that calculates a lot of properties of triangle mesh data. Some of these properties, I'd like to calculate using thrust:: methods, other properties need to be calculated using ...
Jeroen Baert's user avatar
  • 1,314
0 votes
1 answer
2k views

I am trying to use thrust::unique by key to find unique set of values. However I am using a tuple for the values. The key is of type int, the tuple if type (float, int). My code as below works fine ...
user27665's user avatar
  • 711
0 votes
0 answers
424 views

I encountered a strange error when trying to construct a thrust::device_vector<unsigned char> using thrust::device_vector<unsigned char> data(10). The error was "parallel_for failed: ...
yhf8377's user avatar
  • 280
0 votes
1 answer
369 views

I need to minimum values along columns of a matrix along with row indices using thrust. I use the following code (copied from orange owl solutions), However I get errors while compiling. I have posted ...
user27665's user avatar
  • 711
-2 votes
1 answer
142 views

I am working on porting parts of the boost library to compile under cuda / nvcc as device functions. This involves using the thrust library for some things like iterators, arrays, etc. One issue I am ...
john_smith_lon's user avatar

1 2 3
4
5
20