Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 1: Rony Edde #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

reddeupenn
Copy link

Project1 Git Link
redde

Implemented flocking using the naive, sparse grid and coherent grid methods.
Ran a run tests to compare methods using NSIGHT and using cudaEventRecord, cudaEventSynchronize and cudaEventElapsedTime to compute average frame time and compare the different methods.

Speed wise Naive was predictably the slowest and the as long as the we clamp the minimum cell size to prevent exceeding the maximum GPU memory (see commented out line 165 in kernel.cu), the fastest solution is the coherent grid despite having to sort 2 buffers.

@likangning93
Copy link
Collaborator

likangning93 commented Sep 12, 2016

Hi, I haven't looked super in-depth yet, but ideally in each grid implementation you should only have to do a single sort_by_key. I'm actually not sure if your coherent version works, since you're doing sort_by_key directly on the positions/velocities. sort_by_key isn't a stable sort, so this might result in the positions and velocities ending up misaligned.

Take another look at the diagrams in the instructions page for another approach. You will probably have to add a kernel that we did not spell out for you. I know it's close to the deadline, but this adjustment shouldn't take long!

@reddeupenn
Copy link
Author

I just saw that.

It actually works pretty well on my end. The sorting is taking place on a reinitialized array for consistency.
I am not resorting the array.

@likangning93
Copy link
Collaborator

Ah okay. Sorry for the mixup with github notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants