cmake . && make- Run either
particle_filer_gpuorparticle_filter_cpu-
./particle_filter_gpu <optional:number_iteration(default:1000)> <optional:number_particles (default:10)> <number of threads per block (default:64)> -
./particle_filter_cpu <optional:number_iteration(default:1000)> <optional:number_particles (default:10)>
-
Make sure you have OpenCV installed. See here for install guide.
- Compile with
cmake . -D IMAGES=1 && make - Run the program. (Max of 70k particles)
- The images will be in
images/. - To generate a gif, run
convert -delay 50 -loop 0 images/*.png myimage.gif.- If you do not have imagemagick, run
sudo apt-get install imagemagick
- If you do not have imagemagick, run
- Make sure to clear the
images/folder if you are running it another time
- The sequential implementation needs to end with
.cuin order to let the CUDA compiler link therobot.cuhlibrary. It is done this way to reduce duplicated code. No GPU kernels are used.