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
A closer look at the standard Fortran C compatibility layer by exploring objects and linkers Background Derived types and their interoperability have been covered previously in the context of usage from Python. However, much of the focus of the previous approach revolved around the iso_c_binding intrinsic module. A closer inspection of the functionality provided therein is the first step towards extending beyond the standards to support calling type bound procedures.| 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
A meta-post on twin presentations on F2PY and LFortran at FortranCon'21 Background I had the honor and pleasure to have two presentations at the second annual FortranCon in 2021. The fun part was both talks featured the language standard prominently, but were meant to form two sides of a coin. f2py: Two Decades Later Co-Authors Dr. Ralf Gommers (Quansight Labs), Dr. Melissa Mendonca (Quansight Labs), Dr. Pearu Peterson (Quansight Labs) Duration 20 minutes (15 + 5) Abstract f2py is the gold st...| rgoswami.me