C++Now 2018: Tobias Loew “Fortransformers: A Field Study”


Presentation Slides, PDFs, Source Code and other presenter materials are available at: http://cppnow.org/history/2018/talks/

It’s 2018 – there is a new programming language almost every other week – and still we have to bother with Fortran. The language of course has its advantages but from the perspective of a C++ developer, it lacks features like function overloading, templates and generic containers, to name just a few.
When my team decided to translate two of our main Fortran-libraries to C++ we set out the following conditions: maintain the runtime performance and, even more important, do not upset the Fortran-developers, by modifying the sources as little as possible. Especially syntax and semantics of arrays should not change, i.e. one-based, multi-dimensional, whole-array-operations. Since existing Fortran to C/C++ translators like f2c and fable only support Fortran 77, we had to develop our own tool. Furthermore, we needed a C++ expression template array-library that satisfied the requirements.
This talk will bring some light into the dark corners of Fortran translation tools and also show the benefits of expression template pioneer Blitz++.
It will cover the evaluation of translation tools and expression template libraries, culminating in an almost-automatic version of f2c and a modernized version of Blitz++ as DSEL for Fortran-like array-operation. We will review code examples before and after the translation process and analyse the performance of the C++ libraries versus their Fortran-versions.
So, open your Fortran storages and trunks and let in a fresh cool breeze of modern C++.

Tobias Loew
Software Architect, steag energy services
C++ developer for now almost 20 years with PhD in mathematics and a background in functional languages and their mathematical models

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

Published in BlogRecommend0 recommendations
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *