← Questions

Hash-partition an array on the GPU and return partition offsets

0
NvidiaCodingLast asked Oct 2026

Write hash partitioning for a GPU in CUDA C++. Given n keys in device memory and a partition count P, key k belongs to partition hash(k) % P.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 3 credits: each one unlocks a question for good.

Your code and the AI tutor open when you unlock this question.