stdlib
stdlib copied to clipboard
Porting everything from fortran-utils to stdlib
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 use stdlib
, that fortran-utils
is not developed anymore and users should switch to stdlib
, 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:
- [x] Types (
dp
) (Already in stdlib_experimental_kinds.f90) - [ ] Constants (
pi
,e_
,i_
) (#99) - [x] Sorting (#98)
- [x] Saving/loading 2D arrays (
savetxt
,loadtxt
) (Already in stdlib_experimental_io.f90) - [x] Meshes (exponential, uniform) (#17)
- [ ] Cubic splines (#100)
- [ ] Saving/loading PPM images (#45)
- [ ] Lapack interface (and a few simple f90 wrappers like
eigh
,inv
) (#10) - [ ] HDF5 interface (#101)
- [ ] Special functions (#102)
- [ ] Optimization (#87)
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.
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.