I’m quite new in using Cuda therefore I would like as you for an advice for the following problem.
During my init-phase I’m allocating at several points N buffer (all have the same size).
To deal better with buffers I’m using a std:vector to store them.
I guess I’m right if I’m saying that I neither can’t use a std:vector nor a thrust::device_vector in a kernel.
Nevertheless I need to iterate over these buffers in my kernel.
How to pass these N buffer to my kernel, in the most efficient way?
As far I understood it correctly, by using thrust::device_vector there is no guarantee that allocated memory is linear, right? So passing the startpointer to the kernel and shifting it N-times by the size is not a solution, right?
But what’s about storing the Start-Pointer and the corresponding sizes in an Nx2 Array, and pass this one to the kernel? Would this work?
Does someone has any suggestions?