Open certik opened 4 years ago
I made a followup comment that I think #101 and similar can be interfaced via a shim. This can work for HDF5, FITS, etc. whatever someone wants to contribute a shim for. The user-facing stdlib API can be like:
savefile('foo.h5', x)
loadfile('foo.h5', y)
The same interface can be used for libpng and other images. For h5fortran and nc4fortran the rank- and kind-polymorphism is already in those interfaces. For libpng or FITS, stdlib may need to provide the polymorphism.
These file formats would all be optional at configure-time. A fallback to raw binary is straightforward if desired.
Here is my plan with https://github.com/certik/fortran-utils: I would like to port everything to
stdlib
. Once everything is in here, I will point users in the README to simply usestdlib
, thatfortran-utils
is not developed anymore and users should switch tostdlib
, which as all the functionality and more. I encourage other authors of similar libraries (listed in #1) to try to do the same.Here is the functionality in fortran-utils that needs to be ported:
dp
) (Already in stdlib_experimental_kinds.f90)pi
,e_
,i_
) (#99)savetxt
,loadtxt
) (Already in stdlib_experimental_io.f90)eigh
,inv
) (#10)It seems everything (except #101) would be a nice fit into the scope of
stdlib
. I think #101 should go into a separate library (at least at first), but the rest I think has a chance of getting in.I will use this issue to keep track of the progress.