"Dan Elliott" <dan_elliott_at_cox_dot_net@noSpam.org> wrote in message
news:5hace.7$134.4@dfw-service2.ext.ray.com...[color=blue]
>I am working on some tricky code and need some help from the experts.
>
> I have several large data structures (uBLAS matrices) that must be written
> to a pre-allocated (by another program) chunk of static memory. Currently
> our code emulates this behavior using BOOST::serialize archives.
> According
> to the documentation, these archive objects will write to a given ostream.
> We would like to define an ostream that writes to this address without
> copying these large data structures to a buffer.[/color]
Have you looked at using boost::iostream library from Jonathan Turkanis? I
use it along with boost::serialization to stream data to/from the Windows
clipboard allocated memory. IIRC, it will be part of boost 1.33.0. It is
also available for use from the files section at
www.boost.org.
Look for:
boost::io::array_sink
boost::io::array_source
which take (const) char*'s and direct input/output from/to externally
allocated memory.
You might want to join the boost devel and/or user mailing lists to get more
immediate response to these sorts of inquiries.
Jeff Flinn