I have just created Delphi module which implements (a rather complete) bindings to HDF library release 1.8.12. It's in attachment.
The source code is auto-generated from the header files in src directory. It means:
1) The conversion process is error-proof.
2) The bindings module can be recreated at any moment, e.g. when new HDF library is available.
The following information is translated from HDF headers:
1) All exported procedures except one with varargs (varargs is not supported in Delphi 5).
2) All exported variables.
3) Most #defines.
4) Most type definitions, including procedural types and enums.
5) Source comments.
The following is missing at this time:
1) Struct type definitions.
I was targeting at Delphi 5 on w32, but hopefully my module is also usable on FreePascal, with minor modifications.
If there is interest, I'm ready to share the generating script. But beware: it's UGLY
Please CC paramon@acdlabs.ru if answering this message.
A new version of auto-generated bindings is available. It's in attachment.
The bug fixes and improvements:
1) Correct declaration for static array types, e.g. Phdset_reg_ref_t.
2) More precise parsing of typed constant declaration, e.g.
H5T_VARIABLE = size_t(-1)
3) Warnings about varargs procedures.
I also attach the converter script hdf5pas.py. Yes it's big time ugly; but probably someone finds it useful, and there is nothing refactoring can't treat
I hope that HDF library developers reading this forum are a bit more aware now about the problems one faces when converting HDF bindings to a programming language. Fully parsing C headers is a huge task; it really helps if public bindings include only simplest constructs like procedure of constant declarations. By the way, I think HDF header are really not that bad in this regard!
Please CC paramon@acdlabs.ru if answering this message.
Thank you for your effort, HDF team!
Andrey Paramonov
Hi
My C++/C program read hundreds of compressed compound arrays from a hdf5 file sequentially and stores them in some vectors. I would like to improve its time performance. I wish I can read 3 or 4 of them in parallel, and then again next 3 or 4, etc.. I am totally new to multithreading or OpenMP or any parallel programming. My question is: - Is it possible to implement on hdf5/C/C++/Linux what I want? - If so, can you direct me to some info or tutorial for beginners?