Turbostream can run on any multi-core processor by using a source-to-source compilation strategy.
The multi-core landscape is in constant flux, with new processors and programming models arriving every year. Investing in a single strategy that has the longevity required for CFD solvers - whose lifetime is measured in decades - can be a daunting decision for any manufacturer of turbomachinery.
Turbostream solves this problem by using a source-to-source compilation strategy that is based on a templating technique. In this approach, a source-to-source compiler developed specifically for Turbostream transforms the high-level definition of the Turbostream algorithm into optimised source code for any processor, including both CPUs and GPUs.
This source-to-source approach has several key benefits:
- New processors can be supported without modifying the source code of the solver itself
- The source-to-source compiler can perform complicated optimisations without worrying about source code readability
- The use of a high-level language makes it easy to add new features to the solver.