Skip to content

RichRayTraceCherenkovCones - Hint the compiler to unroll scalar loop.

In the RICH I have a number of places where, in otherwise SIMD code, I need to fallback to a scalar loop for part of the calculation.

Often the loop is small, with little code in it, and the size is known at compile time (the SIMD size). I have found in many cases forcing the compiler to unroll the loop gives performance boosts. This MR does this for one such loop in the RICH raytracing.

( p.s. If anyone thinks the preprocessor lines are a bit ugly, I would agree. I've not found a way though to, for instance, hide them away in a header somewhere via a #define I could use at site, just before the loop, which is where the pragma needs to be. If anyone knows how to do this, please let me know ? )

Merge request reports

Loading