I want to sort some data structures that are already in GPU, produced by some kernels, in probably a new kernel. Is there any fast and easy way of doing it?
I know thrust can do parallel sorting simple when you have host data but can I use that when without copy data back to CPU and again to GPU?
Thanks, that was helpful. But now I have some other problem.
I want to sort a data structure with around 5 values, of course by just one value. Assume I have ID, name, start, end, and value in my struct and I want to sort by value.
I can transfer them all to arrays but then how can I use sort_by_key to sort my arrays.
I dont really know how to use templates to sort AoS.