Skip to content

LesleyLai/CUDA-flocking-boid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUDA Flocking

  • Lesley Lai
  • Tested on: Ubuntu Linux 20.04 LTS, i7-7700 @ 3.60GHz, RTX 2070 (desktop)

    This project is a CUDA implementation of Boid, an artificial life program that simulates fishes or birds’ flocking behaviors. Besides the naive brute-force implementation, the project also implements grid accelerating data-structure. The simulation is visualized by OpenGL.

./images/boid.gif

Credit:

Build Instructions

This project use CMake as the build system generator and Conan as the package manager. You need to have an up-to-date version of the CMake and CUDA toolkit installed.

You can install Conan through pip:

$ pip install conanfile.txt # Or pip3 on some linux distributions, use sudo if nessesory

After installing all the tools, build the project with the following command line instructions:

$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make

Algorithms Description

TODO

Performance Analysis

As Boid is an O(N2) algorithm, we expect the runtime has quadratic growth when increasing the boids count. The benchmark confirmed this expectation:

./images/performance-boid-count.svg

As expected, the utilization of grid data structure causes fantastic performance improvement, and optimization on memory locality (coherent grid) makes the simulation faster.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published