Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long long missing in adios_types.h #187

Open
ax3l opened this issue Sep 7, 2018 · 6 comments
Open

long long missing in adios_types.h #187

ax3l opened this issue Sep 7, 2018 · 6 comments

Comments

@ax3l
Copy link
Contributor

ax3l commented Sep 7, 2018

Although long long and unsigned long long are basic/fundamental C (& C++) types, there are only:

                     ,adios_byte = 0                 /* (1) */
                     ,adios_short = 1                /* (2) */
                     ,adios_integer = 2              /* (4) */
                     ,adios_long = 4                 /* (8) */

                     ,adios_unsigned_byte = 50       /* (1) */
                     ,adios_unsigned_short = 51      /* (2) */
                     ,adios_unsigned_integer = 52    /* (4) */
                     ,adios_unsigned_long = 54 /* (8) */

in adios_types.h

Can you add support for adios_long_long and adios_unsigned_long_long?

Also, the (size) comment in those lines is platform specific. E.g. ADIOS1 works well on OSX, where long is the same size as an int. You will need adios_long_long to describe an 8-byte int there.

cc @pnorbert

@ax3l
Copy link
Contributor Author

ax3l commented Sep 8, 2018

Ok, I think I understand what you did there.

adios_short is actually on all 8-bit=1byte systems adios_int16_t, adios_integer on all 8-bit=1byte systems adios_int32_t and adios_long on all 8-bit=1byte systems adios_int64_t?

(Same for unsigned and floating points.)

@pnorbert
Copy link
Contributor

pnorbert commented Sep 8, 2018 via email

@ax3l
Copy link
Contributor Author

ax3l commented Sep 10, 2018

@pnorbert alright, thanks! And you assume that a Byte is 8 Bit (CHAR_BIT == 8), otherwise it's not portable? Just checking the corner cases :)

@pnorbert
Copy link
Contributor

pnorbert commented Sep 10, 2018 via email

@ax3l
Copy link
Contributor Author

ax3l commented Sep 13, 2018

@pnorbert alright, thanks.

Another question: what's the recommended type in adios 1 to represent C++ bools? We are in the last years mapping them to unsigned chars, but allowing a bool equivalent in meta data would be great to differentiate properly in reads.

@pnorbert
Copy link
Contributor

pnorbert commented Sep 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants