M&R Technology Accelerates Medical Ray-Tracing Algorithms on Desktop Computers Using GPU Coder and Automatic CUDA Code Generation

“We wrote custom algorithms targeting the simulation of PPG signals and generated CUDA code for them. Operations that significantly benefitted from acceleration were 3D distance and trigonometric matrix computations as well as matrix multiplications.”

Key Outcomes

  • Automatically generated CUDA code to accelerate the algorithm by several hundred times
  • Optimized computations with GPU Coder to further enhance performance
  • Reduced data computation time by several hundred times
Two graphs, side by side, with the first showing a distribution of blood vessels via PPG imaging and the second showing light rays scattered on the photo detector.

Distribution of blood vessels (left) and of exiting light rays (right).

Based in San Diego, California, M&R Technology develops sensor solutions for next-generation IoT applications. Recently, it designed a desktop application to simulate medical photoplethysmography (PPG) signals using ray tracing in a tissue model.

In PPG, a light source and a photosensor on the skin surface measure changes in blood circulation due to the heartbeat. In turn, heart rate and blood oxygenation are computed from amplitude changes. The data generated in simulation is substantial and therefore difficult to evaluate, often taking several hours on a desktop CPU. Using GPU Coder™ and CUDA® code generation, M&R significantly cut down the time taken to complete computations.

Writing custom algorithms and making use of the cuBLAS library, M&R was able to significantly speed up the process, especially 3D distance and matrix computations. The acceleration achieved depends on data size and is up to several hundred times faster as compared to using a desktop CPU, reducing computation time from hours to minutes or even seconds.