Boost logo

Boost :

Subject: Re: [boost] [endian] swap_in_place use case
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-06-04 10:13:37

----- Original Message -----
From: "Dave Handley" <Dave.Handley_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, June 04, 2010 3:58 PM
Subject: Re: [boost] [endian] swap_in_place use case

> Vicente Botet wrote:
>> I'm looking for a use case where the use of swap_in_place
>> (or whatever is renamed) is not followed/preceded by a copy.
> I'm not sure you got an answer to this question. Here is a simple use case.

Terry gave someting similar to yours.
> Memory map a network endian file. Swap_in_place. Use.
> You definitely don't want a copy in this case since your file could easily be very big. Think of the case where your file is huge (say 10Gb), you really don't want to perform a copy and swap since that puts your memory need at 20Gb instead of 10Gb.

Yes this could be a use case. I don't use to manage so bigs files. If I had to work with I will never copy the whole file. But I'm not sure that I will use a swap_in_place of the whole file. This could take too much time. I would try to split the task to do on the whole file in smaller parts.

What will you do with this big file, that makes the swap in place the best choice?


Boost list run by bdawes at, gregod at, cpdaniel at, john at