  Commercial graphics processors (GPUs) have high compute capacity at very lowcost, which makes them attractive for general purpose scientific computing. Inthis paper we show how graphics processors can be used for N-body simulationsto obtain improvements in performance over current generation CPUs. We havedeveloped a highly optimized algorithm for performing the O(N^2) forcecalculations that constitute the major part of stellar and molecular dynamicssimulations. In some of the calculations, we achieve sustained performance ofnearly 100 GFlops on an ATI X1900XTX. The performance on GPUs is comparable tospecialized processors such as GRAPE-6A and MDGRAPE-3, but at a fraction of thecost. Furthermore, the wide availability of GPUs has significant implicationsfor cluster computing and distributed computing efforts like Folding@Home.
We have developed a highly optimized algorithm for performing the O(N^2) force calculations that constitute the major part of stellar and molecular dynamics simulations.