dbTalk Databases Forums  

packarray - version 0.2

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss packarray - version 0.2 in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Frey
 
Posts: n/a

Default packarray - version 0.2 - 12-03-2005 , 04:32 AM






Hello fellow coders,

Version 0.2 of the packarray class is available at the same spot:

http://www.netdirect.ca/~cdfrey/software/packarray.cc

This version handles endian issues all at once, and converts double
values to network byte order as well. The basic_field<> class is gone,
as it's not needed any longer.

I ran into an interesting issue with regards to C++ aliasing rules, which
you can read about here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25235

And here:

http://mail-index.netbsd.org/tech-ke...8/11/0001.html

This makes me rather concerned about the reinterpret_cast<> I have to do
in 4 places in packarray. Any tips on how to clean that up would be very
much appreciated.

Anyway, it works great for me, even with g++ 4.0.2. Testing on non-intel
machines would be great.

Enjoy,
- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Chris Frey
 
Posts: n/a

Default Re: packarray - version 0.2 - 12-04-2005 , 10:16 PM






On Sat, Dec 03, 2005 at 05:32:41AM -0500, Chris Frey wrote:
Quote:
I ran into an interesting issue with regards to C++ aliasing rules, which
you can read about here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25235

And here:

http://mail-index.netbsd.org/tech-ke...8/11/0001.html

This makes me rather concerned about the reinterpret_cast<> I have to do
in 4 places in packarray. Any tips on how to clean that up would be very
much appreciated.
In addition to the above, I started a thread in comp.lang.c++.moderated
which is turning out to be rather enlightening.

http://groups.google.ca/group/comp.l...14701b02a2a3cc

I hope that's a stable URL from Google. :-)

- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Warren Young
 
Posts: n/a

Default Re: packarray - version 0.2 - 12-15-2005 , 08:25 AM



Chris Frey wrote:
Quote:
http://groups.google.ca/group/comp.l...14701b02a2a3cc
I just took a look at that, and saw that you seem to have worked out the
technical problems. Are we going to see a v0.3 soon, or were you
waiting on OS X tests with v0.2 from me first?

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Chris Frey
 
Posts: n/a

Default Re: packarray - version 0.2 - 12-19-2005 , 01:40 PM



On Thu, Dec 15, 2005 at 07:25:30AM -0700, Warren Young wrote:
Quote:
Chris Frey wrote:

http://groups.google.ca/group/comp.l...14701b02a2a3cc

I just took a look at that, and saw that you seem to have worked out the
technical problems. Are we going to see a v0.3 soon, or were you
waiting on OS X tests with v0.2 from me first?
I've been sidetracked by flu. The main thing I still don't like about v0.2
is that it uses a reinterpret_cast<> in an inline template function to
provide the application access to double. I fear that could be optimized
away someday, so am pondering putting that string-to-double casting in
a .cpp file, which can be compiled with -fno-strict-aliasing in the library
for safety.

Also, James Kanze in the newsgroup recommended using frexp() and ldexp()
to do the double conversions portably, which would be nice in v0.3, but
I haven't done that yet. That's the implementation that should really be
tested on OS X when it's done.

Thanks,
- Chris


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: packarray - version 0.2 - 12-20-2005 , 01:38 AM



Chris Frey wrote:
Quote:
I've been sidetracked by flu.
Sorry to hear that.

Quote:
Also, James Kanze in the newsgroup recommended using frexp() and ldexp()
to do the double conversions portably, which would be nice in v0.3, but
I haven't done that yet. That's the implementation that should really be
tested on OS X when it's done.
Okay, sounds good. No rush from this quarter, just making sure you
weren't waiting on me.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.