https://hgpu.org/?p=1359
High Performance Direct Gravitational N-body Simulations on Graphics Processing Units: An implementation in CUDA (thesis)