SIMD neighbor search for particles?

Started by
1 comment, last by trs79 12 years, 3 months ago
Hello,

I'm trying to use SSE to speed up neighbor finding for a particle fluid simulation. My main issue, however, is storing the neighbors of each particle in memory such that I can quickly load all candidate spacial neighbors into xmm registers to begin distance testing to see if the neighbors are within the cutoff radius.

I've tried Z-order morton sorting, but that doesn't always ensure that the spacial neighbors of a particle are stored contiguously in memory. Anyone have any ideas? Thanks
Advertisement
I've never used it personnaly but a friend told me about the "placement new" technique that he uses to allocate chunks of data continuously in memory. See if this can help: http://www.parashift....html#faq-11.10
Thanks for the info, I could use placement new to get contiguous memory for particles in the same uniform grid cell as the particle I'm testing, but getting the particles from the surrounding neighbor cells is where I'm stumped. I'm not even sure if this is possible, but I'm hoping

This topic is closed to new replies.

Advertisement