Computing on graphics processing units (GPUs) has become standard in scientific computing, allowing for incredible performance gains over classical CPUs for many computational methods. As GPUs were originally designed for 3D rendering, they still have several features for that purpose that are not used in scientific computing. Among them, ray tracing is a powerful technology used to render 3D scenes. In this paper, we propose exploiting ray tracing technology to compute particle interactions with a cutoff distance in a 3D environment. We describe algorithmic tricks and geometric patterns to find the interaction lists for each particle. This approach allows us to compute interactions with quasi-linear complexity in the number of particles without building a grid of cells or an explicit kd-tree. We compare the performance of our approach with a classical approach based on a grid of cells and show that, currently, ours is slower in most cases but could pave the way for future methods.
翻译:在科学计算中,利用图形处理器(GPU)进行计算已成为标准做法,相较于传统CPU,其在多种计算方法上实现了显著的性能提升。由于GPU最初是为三维渲染而设计的,它们仍保留了一些在科学计算中未被充分利用的、专为此目的设计的特性。其中,光线追踪是一种用于渲染三维场景的强大技术。本文提出利用光线追踪技术来计算三维环境中具有截断距离的粒子相互作用。我们描述了用于寻找每个粒子相互作用列表的算法技巧与几何模式。该方法使我们能够在无需构建单元网格或显式kd树的情况下,以接近线性的复杂度(相对于粒子数量)计算相互作用。我们将所提方法与基于单元网格的传统方法进行性能比较,结果表明:当前在大多数情况下,我们的方法速度较慢,但可能为未来方法的发展铺平道路。