The problem I am having is as follows,
1) I have arrays A and B of size N.
2) I have to sort A and also make B in the same sorted permutation as that of A.
This is how currently I have implemented in my code using TBB sort. But I find that the in-place re-ordering algorithm is a serial implementation and is a major bottleneck in my code. How can I do this more efficiently using only TBB sort and possibly avoid the use of permutation array ?
std::vector<double> A(N), B(N);