You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
I have a use-case for performing a sort by key, where I don't actually care about the key but I'd like to use it to sort the values.
The problem here is that the keys are not stored anywhere, and I would like them to be "generated" using a transform iterator.
So, if I effectively passed the variance lambda into sort_by_key with a transform_iterator, I would get the input sorted based on the return values of the lambda.
auto variance = [=] __device__(std::size_t i) {
auto x = input_data[i];
returnget_variance(x); // assume this returns an integer.
};
But it seems like this use is not supported due to:
RandomAccessIterator1 is a model of Random Access Iterator, RandomAccessIterator1 is mutable.
Is my understanding correct? If so, any suggestions on another way to address this problem without actually first generating the keys and storing them separately?