Merge K Sorted Vectors using CUDA Thrust

Hello,

I have K no of sorted vectors that are sorted in ascending order, now I want to merge them using CUDA thrust. Is that possible? if it is can anybody let me know how I can do that.

Thanks in advance.

How about thrust::merge ?

@striker159 thrust::merge can be a good option, but if I am not wrong that is useful to merge two sorted vectors and I have 10 sorted vectors to be merged.

You could call thrust::merge 9 times to merge all 10 vectors.

You could copy all ranges into a contiguous range and sort it again.

Thank you so much, will try that.