Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Analysis.txt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
N_500: 2475-2550 -> 2512
N_2000: 1446-1475 -> 1460.5
N_5000: 810-825 -> 817.5
N_8000: 548-564 -> 556
N_20000: 211-216-> 213.5
N_50000: 37-39 -> 38
N_100000: 10-11 -> 10.5

U_500: 1750-1920 -> 1835
U_2000: 1851-1887 -> 1869
U_5000: 1482-1497 -> 1489.5
U_8000: 1444-1475 -> 1459.5
U_20000: 1110-1192 -> 1151
U_50000: 506-580 -> 543
U_100000: 280-300 -> 290

C_500: 1880-1970 -> 1925
C_2000: 1842-1885 -> 1863.5
C_5000: 1495-1520 -> 1507.5
C_8000: 1486-1526 -> 1506
C_20000: 1460-1480 -> 1470
C_50000: 1117-1174 -> 1145.5
C_100000: 718-728 -> 713

32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
<h1> CUDA Flocking Simulation with Reynold Boids Algorithm

# ![top](images/top_image.png)

**University of Pennsylvania, CIS 565: GPU Programming and Architecture,
Project 1 - Flocking**
* Haorong Yang
* [LinkedIn](https://www.linkedin.com/in/haorong-henry-yang/)
* Tested on: Windows 10 Home, i7-10750H @ 2.60GHz 16GB, GTX 2070 Super Max-Q (Personal)



This is a CUDA based simulation of the Reynold Boids Algorithm. Three approaches were taken to perform neighbor search.
The Naive approach does a brute force search through every other boid to update one boid.
The Uniform Grid and Coherent Grid searches through the cells within its search radius,
but Coherent Grid has a modification in the method of accessing elements.

The method used to compare performance was by frame rate under different boid counts.
I took the lowest and highest frame rate that appeared at least twice within the first minute,
and took the average of that as the performance result.

Comparison of 3 methods of step simulation, at most 8 neighbors (Naive Search, Uniform Grid, Coherent Grid):
![chart1](images/fpsGraph8.PNG)

* (TODO) YOUR NAME HERE
* (TODO) [LinkedIn](), [personal website](), [twitter](), etc.
* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)
Comparison of 3 methods of step simulation, at most 27 neighbors (Naive Search, Uniform Grid, Coherent Grid):
![chart1](images/fpsGraph27.PNG)

### (TODO: Your README)

Include screenshots, analysis, etc. (Remember, this is public, so don't put
anything here that you don't want to share with the world.)
* As the number of boids increase, the performance decreases as we could observe that the frame rates decrease. The reason for this is the arrays become longer and there is simply more calculation to do as there are more boids.
* The coherent grid method showed greater performance as the boid count increases to a large number. At smaller number of boids, there is barely noticable increase in performance compared to the uniform grid. This is the outcome as I expected, because as the boid count increases, the cost to access boidIndices and then positions and velocity becomes more significant since they are performed in for every single neighbor search, whereas shuffling of the position and velocity arrays only need to happen once every step simulation
* In 27 neighbor search, coherent still performs the best.
Binary file added images/fpsGraph27.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fpsGraph8.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/top_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading