An exploration of the opaque object and pointer interface approach to unleash more modern features than those offered by the ISO Fortran standard. Background Since this has been covered a few times before, just some quick pointers1. The ultimate context is to be able take nice, modern Fortran code with derived types and generate equally nice, user friendly, efficient Python wrappers via f2py. Why? Where the last post (and the test implementation in f2py) left off, the type shadowing approach ...| rgoswami.me
Explorations of object oriented Fortran with bind(c) derived types for representations generated by F2PY Background Derived types are easily one of the most visible of the modern Fortran (post-F90) features and are central to object oriented programming paradigms in Fortarn. For those new to the language, a rough guide to some terminology: Fortran Closest C/C++ equivalent derived type struct extends type inherited class final destructor not standard conforming undefined behaviour Only the fir...| rgoswami.me
Moving simple Fortran derived types to Python and back via C Background Object oriented programming has been part of Fortran for longer than I have been alive 1. Fortran has derived types now. They’ve been around for around for over three decades. The standards at the same time, have been supporting more and more interoperable operations. Details of these pleasant historical improvements are pretty much the most the Fortran standards committee have managed to date in the 21st century.| rgoswami.me
Exploring meson for interfacing fortran and python via f2py and standard techniques, with benchmarks. Background A recent post gauging community interest in f2py brought to light (among other aspects) the fact that the build systems of f2py are rather opaque to the end user. There are good reasons for this, since many of the tools discussed in this post were not around / in any shape to be used during the active development of f2py1.| rgoswami.me