In this tutorial, I show you a clean implementation of the segmented sieve of Eratosthenes in CUDA C++. The segmented sieve method enables you to benefit both from parallelism (multiple chunks being processed at once) and locality of reference (chunks fitting into CPU cache, therefore being computed faster). Being run on the GPU, many tens of thousands of chunks can be computed at once, therefore enabling very fast prime number sieving that scales much better than CPU code.
Code: github.com/tanmayb123/multi-g...
Негізгі бет CUDA Multi-GPU Segmented Sieve of Eratosthenes to find the Nth prime
Пікірлер: 23