h5md-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h5md-user] Species Data Type


From: Felix Höfling
Subject: Re: [h5md-user] Species Data Type
Date: Wed, 21 Aug 2013 13:01:15 +0200
User-agent: Opera Mail/12.15 (Linux)

Am 20.08.2013, 22:54 Uhr, schrieb Pierre de Buyl <address@hidden>:

Hi all,

Peter Colberg <address@hidden> a écrit :

Hi Nicolas,

On Tue, Aug 06, 2013 at 08:58:51PM +0200, Nicolas Höft wrote:
Is it possible to read/write an enum type as int type? What I mean
is: Is this backwards-compatible? Can a program that does not know
about HDF5 enums simply read the int's and continue as usual?

I really like the solution, though :-)

It is compatible with readers expecting an integer data type. An
enumerated-type dataset can be read using, e.g., H5T_NATIVE_INT as
the memory datatype.

For writing, however, the memory datatype needs to be an enumerated
type. A program extending an existing enumerated-type dataset needs
to be aware of this.

Enums seem a very elegant solution. However, nothing prevents their
use in the specification and the change would be backward compatible
in the future.

Suggesting their use would fit in the implementation appendix very
well (see http://nongnu.org/h5md/implementation.html ).

Cheers,

Pierre


The implementation section is very helpful (I didn't notice it before). Thanks Peter for setting it up! Indeed, it would be the right place to discuss/demonstrate the use of enums.

Independent of that, we could add a brief note to the specification section pointing at the advantages of enums for systems with many particle species.

Felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]