Voting and Shuffling to Optimize Atomic Operations

Originally published at: https://developer.nvidia.com/blog/voting-and-shuffling-optimize-atomic-operations/

2iSome years ago I started work on my first CUDA implementation of the Multiparticle Collision Dynamics (MPC) algorithm, a particle-in-cell code used to simulate hydrodynamic interactions between solvents and solutes. As part of this algorithm, a number of particle parameters are summed to calculate certain cell parameters. This was in the days of the Tesla…