I’ve not read very much in these forums yet and this is my first post so I beg your pardon if there’s anything wrong with my posting.
My name is Joey and I’m studying physics at the University of Heidelberg.
I’m about to learn programming cuda. I’m pretty much pleased by it’s capabilities, although I’ve not yet got into the very last detail. In parallel to my book GPU Gems 3 I’m reading through the SDK examples right now. But I’ve stumbled across something which makes me wonder whether the developer of the particles demo has mistakenly used an algorithm which is quite unnecessary or if it’s me who is mistaken here. Ok, here I go.
In chapter 32 there’s an algorithm described which builds so-called collision cells, which is an array consisting of a home cell followed by several guest cells. The home cell is the cell of a particle whose origin lays within it, a guest cell just touches the boundaries of a cell. So far, so good. For processing collisions, the collision cells are traversed one by one in order to find possible collision partners. Now, in the particles demo, the programmer goes quite the same way. BUT: He’s not using guest cells. He has only a list of home cells, but still he’s sorting them for later use, building start and end of these collision cells (which actually aren’t, because they just contain one home cell), just to process all the surrounding cells anyway in a later step. Isn’t that unnecessary? Either you use the collision cell way or you check the surrounding cells.
I hope you get what I mean and that you can help me.
Thanks in advance,
btw. if you don’t understand any of my English, just ask away, I know I’m far from speaking perfectly.