Does there exist a shuffle algorithm which enables shuffling elements of a vector on GPU/device?

Hi,

I know that there exists shuffling algorithm on Standard Template Library in C++, which enables shuffling of elements in a vector.

I am wondering whether similar functionality exists for CUDA-THRUST library?

either scatter or gather would work. Neither of these work in-place to my knowledge, so you’d need to have an input vector, an output vector, and a map vector defining the shuffle to be performed.