Magnoux Vincent, Ozell Benoît
Department of Computer Engineering and Software Engineering, Polytechnique Montréal, Chemin de Polytechnique, Montréal, Canada.
Adv Model Simul Eng Sci. 2021;8(1):7. doi: 10.1186/s40323-021-00192-7. Epub 2021 Mar 27.
Simulators for virtual surgery training need to perform complex calculations very quickly to provide realistic haptic and visual interactions with a user. The complexity is further increased by the addition of cuts to virtual organs, such as would be needed for performing tumor resection. A common method for achieving large performance improvements is to make use of the graphics hardware (GPU) available on most general-use computers. Programming GPUs requires data structures that are more rigid than on conventional processors (CPU), making that data more difficult to update. We propose a new method for structuring graph data, which is commonly used for physically based simulation of soft tissue during surgery, and deformable objects in general. Our method aligns all nodes of the graph in memory, independently from the number of edges they contain, allowing for local modifications that do not affect the rest of the structure. Our method also groups memory transfers so as to avoid updating the entire graph every time a small cut is introduced in a simulated organ. We implemented our data structure as part of a simulator based on a meshless method. Our tests show that the new GPU implementation, making use of the new graph structure, achieves a 10 times improvement in computation times compared to the previous CPU implementation. The grouping of data transfers into batches allows for a 80-90% reduction in the amount of data transferred for each graph update, but accounts only for a small improvement in performance. The data structure itself is simple to implement and allows simulating increasingly complex models that can be cut at interactive rates.
用于虚拟手术训练的模拟器需要非常快速地执行复杂计算,以与用户提供逼真的触觉和视觉交互。通过在虚拟器官上添加切割操作,例如进行肿瘤切除所需的操作,复杂度会进一步增加。实现大幅性能提升的一种常见方法是利用大多数通用计算机上可用的图形硬件(GPU)。对GPU进行编程需要比传统处理器(CPU)更严格的数据结构,这使得数据更新更加困难。我们提出了一种构建图形数据的新方法,这种方法通常用于手术期间软组织的基于物理的模拟以及一般的可变形物体。我们的方法将图形的所有节点在内存中对齐,而与它们包含的边的数量无关,允许进行局部修改而不影响结构的其余部分。我们的方法还对内存传输进行分组,以避免每次在模拟器官中引入小切割时都更新整个图形。我们将我们的数据结构实现为基于无网格方法的模拟器的一部分。我们的测试表明,利用新图形结构的新GPU实现与之前的CPU实现相比,计算时间提高了10倍。将数据传输分组为批次可使每次图形更新传输的数据量减少80 - 90%,但性能提升仅占一小部分。数据结构本身易于实现,并允许模拟越来越复杂的模型,这些模型可以以交互速率进行切割。