How do you make a pair vector out of two arrays and then sort by the first element of the pair using CUDA/Thrust?
Okay, this is going to be a mouthful.

I have a pointer to serialized 2D array, pointer arithmetic aside, I want to make a vector of pairs out of (essentially) two arrays(that I plan to get out of the 2D array). However, I need to use the *Thrust* library.

**This is so that I can use thrust::sort() on the vector, based on the values of the first element of the pair. On the Device.**

So, I need a vector(preferably thrust::device_vector) of pairs (of size to match the size of arrayOne and arrayTwo obviously), where the first element of the pair is from arrayOne, the second from arrayTwo. So that I can then use thrust::sort() in order to sort by the first element of the pair.

Sorry, for the lack of code, but I'm still trying to figure out the finer details of how to implement this, hence the question. I'll post my attempts as I go along. Thank you in advance!
How do you make a pair vector out of two arrays and then sort by the first element of the pair using CUDA/Thrust?
===

Okay, this is going to be a mouthful.

I have a pointer to serialized 2D array, pointer arithmetic aside, I want to make a vector of pairs out of (essentially) two arrays(that I plan to get out of the 2D array). However, I need to use the *Thrust* library.

**This is so that I can use thrust::sort() on the vector, based on the values of the first element of the pair. On the Device.**

So, I need a vector(preferably thrust::device_vector) of pairs (of size to match the size of arrayOne and arrayTwo obviously), where the first element of the pair is from arrayOne, the second from arrayTwo. So that I can then use thrust::sort() in order to sort by the first element of the pair.

Sorry, for the lack of code, but I'm still trying to figure out the finer details of how to implement this, hence the question. I'll post my attempts as I go along. Thank you in advance!