ADIOS_DATATYPES missing long long
Closed this issue · 5 comments
not sure if this is intentional or not, but from the perspective of trying to integrate other library's data structures which make use of long long with ADIOS it seems to be an omission. according to c99 long is at least 32 bits and long long is at least 64 bits, so there could be (admittedly rare) cases when the two are not the same size.
OK, works for me
Although I wonder then what happens on a system where long is 32 bits? My inclination would be to always map long to adios_long. But in ADIOS API void* is used, and it would catastrophic to pass a long(32 bits) and tell ADIOS it's adios_long(64 bits). I think ADIOS is doing a confusing thing here.
For instance here's a code snippet
96 else if (dynamic_cast<vtkLongArray*>(da))
97 {
98 return adios_long;
99 }
I will have to modify to this
96 else if (dynamic_cast<vtkLongArray*>(da))
97 {
++ if (sizeof(long) == 4)
++ return adios_integer; // always 32 bits
98 return adios_long; // always 64 bits
99 }
so rather than being equivalent their C counterparts, adios_integer
is equivalent to int32_t
, and adios_long
is equivalent to int64_t
this info would be a good addition to user manual