How to sort two arrays/vectors in respect to values in one of the arrays, using CUDA/Thrust
问题 This is a conceptual question in regards programming. To summarize, I have two arrays/vectors and I need to sort one with the changes propagating in the other as well, so that if I sort arrayOne, for each swap in the sort - the same thing happens to arrayTwo. Now, I know that std::sort allows you to define a comparison function (for custom objects I assume) and I was thinking of defining one to swap arrayTwo at the same time. So what I want is - to sort the two vectors based on values in one