On Mon, 24 May 2010 11:40:46 -0500, Quincey Koziol <[email protected]> wrote:
On May 23, 2010, at 11:27 PM, Mark Miller wrote:

b) you write 64-bit integer dataset AND the values stored in it are
indeed large enough to REQUIRE 64 bits and your 32 bit system does NOT
have an appropriate integer type (e.g. long int or long long or
something) to read it back into. Note, if you write 'int' on your 64 bit
system and the values are small enough to fit into 32 bit, I am not sure
if HDF5 will handle reading it into an 'int' on your 32 bit system or
not. I think it will but I am not sure. You could explicitly attempt to
read it into long int or long long or int64 if your system supports
those types AND they are indeed 64 bit.

        Yes, the conversion will work, but your values may be truncated.

If 64-bit values are small enough in their numerical range to fit into
32bit range, it would be better to store them as 32bit "int32_t" and not
int's anyway, even on a 64bit machine...

It's overkill to store all and everything in 64bit even if not required.
For instance, graphics hardware doesn't know about 64bit int's on indices,
even on 64bit machines handling otherwise huge data beyond 2GB.

        Werner

--
___________________________________________________________________________
Dr. Werner Benger                Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809                        Fax.: +1 225 578-5362

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to