Re: [Boost-users] [Serialization] issue withportable_binary_oarchive

boost-users-bounces@lists.boost.org wrote:
Hi, I have switched all the 0 pointer cases to use some Null object. Now everything works fine. Thanks very much for your help.
One last (I hope) question:
The compilation of this archive produce some compilation warnings, how can I avoid it ?
Thanks again, Dan Leibovich
Dear Dan & Robert, I read this thread with very much interest since I want to use the portable binary archive too. Could you please share your experience and especially the code of the version that actually works? Did you also add code to treat floating point types? Yours sincerely, -- DI Christian Pfligersdorffer Software Engineering EOS GmbH

Pfligersdorffer, Christian wrote:
I read this thread with very much interest since I want to use the portable binary archive too. Could you please share your experience and especially the code of the version that actually works?
I've made some a few changes. I'll check them in to the HEAD before tomorrow. a) I made a small change to binary_?archvive which was losing a "const" along the line and frustrating a template match b) I made a change in portable_binary_?archive to fix an error whereby the sign bit was changed on certain negative numbers.
Did you also add code to treat floating point types?
Nope - that's an excercise for the user. Notes on the current implementation: a) It presumes a two's complement computer so its not "truely" portable. b) It doesn't include floating point. I think this would be more effort than first meets the eye. At least one attractive proposal on how to effectively do this was suggested. c) Its not all that efficient on big endien machines. I think a better version would write the data out in native mode with flags in the header indicating how it was written. Then the endian fix up would occur when it was moved from one machine to another. d) It focuses more on reducing archive size. So some a 64 bit value of 0 is written as one byte. This is probably a good choice for most. But it costs time in sign extending etc. Robert Ramey

Robert Ramey wrote:
Pfligersdorffer, Christian wrote:
I read this thread with very much interest since I want to use the portable binary archive too. Could you please share your experience and especially the code of the version that actually works?
Did you also add code to treat floating point types?
Nope - that's an excercise for the user. Notes on the current implementation:
b) It doesn't include floating point. I think this would be more effort than first meets the eye. At least one attractive proposal on how to effectively do this was suggested.
Maybe I should comment on this, since I have been dealing with binary representation of floating numbers. Most platforms implement float and double following the IEEE754 standard. (Only exception that I know of is VMS that has an optional VAX floating point mode.) Even if we require float and double to follow the IEEE754 standard, there are still three issues: 1. Endianness. 2. Some platforms support fast IEEE modes with no denormals, no infinity and no NaN. 3. There is no agreed on standard for long double. What format is used depends both on the processor and the compiler. I know of at least 4 different binary formats for long double that are commonly used today. I have no plans to implement floating point support for portable binary archives, but if someone wants to do it, I would be happy to help with advice. --Johan Råde

Hi Robert, Have you checked in the changes ? I see (for portable_binary?archive) version 1.7, 13 month old. Thanks Dan -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Robert Ramey Sent: ו 16 מרץ 2007 22:49 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Serialization] issue withportable_binary_oarchive Pfligersdorffer, Christian wrote:
I read this thread with very much interest since I want to use the portable binary archive too. Could you please share your experience and especially the code of the version that actually works?
I've made some a few changes. I'll check them in to the HEAD before tomorrow. a) I made a small change to binary_?archvive which was losing a "const" along the line and frustrating a template match b) I made a change in portable_binary_?archive to fix an error whereby the sign bit was changed on certain negative numbers.
Did you also add code to treat floating point types?
Nope - that's an excercise for the user. Notes on the current implementation: a) It presumes a two's complement computer so its not "truely" portable. b) It doesn't include floating point. I think this would be more effort than first meets the eye. At least one attractive proposal on how to effectively do this was suggested. c) Its not all that efficient on big endien machines. I think a better version would write the data out in native mode with flags in the header indicating how it was written. Then the endian fix up would occur when it was moved from one machine to another. d) It focuses more on reducing archive size. So some a 64 bit value of 0 is written as one byte. This is probably a good choice for most. But it costs time in sign extending etc. Robert Ramey _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Dear Robert, Have you made (or plan to make) any change in the library code following this thread. I failed to find an update in the cvs tree. Regards, Dan Leibovich -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Robert Ramey Sent: ו 16 מרץ 2007 22:49 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Serialization] issue withportable_binary_oarchive Pfligersdorffer, Christian wrote:
I read this thread with very much interest since I want to use the portable binary archive too. Could you please share your experience and especially the code of the version that actually works?
I've made some a few changes. I'll check them in to the HEAD before tomorrow. a) I made a small change to binary_?archvive which was losing a "const" along the line and frustrating a template match b) I made a change in portable_binary_?archive to fix an error whereby the sign bit was changed on certain negative numbers.
Did you also add code to treat floating point types?
Nope - that's an excercise for the user. Notes on the current implementation: a) It presumes a two's complement computer so its not "truely" portable. b) It doesn't include floating point. I think this would be more effort than first meets the eye. At least one attractive proposal on how to effectively do this was suggested. c) Its not all that efficient on big endien machines. I think a better version would write the data out in native mode with flags in the header indicating how it was written. Then the endian fix up would occur when it was moved from one machine to another. d) It focuses more on reducing archive size. So some a 64 bit value of 0 is written as one byte. This is probably a good choice for most. But it costs time in sign extending etc. Robert Ramey _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (4)
-
Dan Leibovich
-
Johan Råde
-
Pfligersdorffer, Christian
-
Robert Ramey