TREX-CoE / trexio

TREX I/O library
https://trex-coe.github.io/trexio/
BSD 3-Clause "New" or "Revised" License
49 stars 14 forks source link

Add auto backend #80

Closed q-posev closed 2 years ago

q-posev commented 2 years ago

This PR adds TREXIO_AUTO back end, which can be used in READONLY mode ('r') to automatically determine the back end needed to open an existing TREXIO file. It does so by inspecting the return codes of trexio_text_inquire and trexio_hdf5_inquire functions. It should be updated when a new back end is implemented.

TREXIO_AUTO only works together with r mode in trexio_open, i.e. the correct call pattern is as follows:

scemama commented 2 years ago

Excellent!

scemama commented 2 years ago

Don't forget to update the change log ;-)