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
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
**University of Pennsylvania, CIS 565: GPU Programming and Architecture,
Project 1 - Flocking**

* (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)
* Janet Wang
* https://xchennnw.github.io/
* Tested on: Windows 11, i7-12700H @ 2.30GHz 16GB, Nvidia Geforce RTX 3070 Ti 8054MB
![](images/boids.gif)
### Analysis
#### For each implementation, how does changing the number of boids affect performance? Why do you think this is?
As the number of boids increases, the performance slows down. For all the three methods, higher number of boids means more neighbors get involved in the velocity calculation for each boid, which increases amount of computation.
Framerate change with increasing # of boids (with visualization)
![](images/figure1.png)
Framerate change with increasing # of boids (without visualization)
![](images/figure2.png)

### (TODO: Your README)
#### For each implementation, how does changing the block count and block size affect performance? Why do you think this is?
Before about 32, there is significant performance improvement when increasing blocks. However, after 64 we can hardly see the improvement anymore. I speculate that our algorithm is not using so many threads(32 is enough), and thus larger blocks do not offer advantage anymore.

Include screenshots, analysis, etc. (Remember, this is public, so don't put
anything here that you don't want to share with the world.)
Framerate change with increasing block size
![](images/figure3.png)

#### For the coherent uniform grid: did you experience any performance improvements with the more coherent uniform grid? Was this the outcome you expected? Why or why not?
Yes, generally the coherent uniform grid has better performance in most of my test cases, as shown in all my 3 figures. And we can observe that as the number of boid increases, its advanatge is becoming greater compared with the other 2 methods. I think the reason is that as the boids data becomes very long, the complexity of indexing significantly increases, and our optimization on the indexing then contributes a lot in the reducing of complexity.

#### Did changing cell width and checking 27 vs 8 neighboring cells affect performance? Why or why not? Be careful: it is insufficient (and possibly incorrect) to say that 27-cell is slower simply because there are more cells to check!
In my test cases (up to 50,000 boids) I did not observe obvious difference between 27 and 8 neighboring cells check.
Binary file added images/boids.gif
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/figure1.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/figure2.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/figure3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading