CUDA derangement implementation
Open
thrust
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
Supposing that there is an array `a[n]` without any duplicate element (i.e. `a[i] != a[j]` for each `i != j`), I want to shuffle this array randomly and get an array `b[n]` that satisfies `b[k] != a[k]` for each `k`. This is known as [derangement](https://en.wikipedia.org/wiki/Derangement).
As far as I know, thrust and C++ STL library have no function to perform derangement. Is it possible that thrust can provide a GPU implementation of derangement? Thank you.
Contributor guide
Assessment
This issue has not been assessed yet.