Boost logo

Boost Users :

From: Russell Mok (rmok_at_[hidden])
Date: 2004-09-16 09:27:27


Pointer sort won't work in my case. Ultimately I do have to reorder the entries in the
container. Just consider the whole container is memory mapped to a file. Indeed, there
are multiple memory mapped containers and the sort is determined by one of these.
Basically each record consists of one entry in each container. I have written a random
access iterator to use the standard sort but creating temp objects for these memory mapped
records is expensive. My application is somewhat memory bound.

By the way, I think what I want is a sort that minimize the use of temporary copies. Swap
is likely the alternative, but I am open to other solutions.

Russell

Tim Rowe wrote:
> One solution is to sort a set of pointers to the objects. Any sort
> routine that lets you specify a sort function will let you sort the
> pointers into the referenced objects' ordering.
>
>
> On Wed, 15 Sep 2004 17:28:54 -0400, Russell Mok <rmok_at_[hidden]> wrote:
>
>>I know this is kinda off topic.
>>
>>I am trying to sort some objects which are expensive to copy. Does anyone know a sort
>>implementation that uses neither copier nor assignment? The STLport version I have is
>>using both. Worse, some routines are passing arguments as T instead of const T &. I did
>>search boost and google but I couldn't find what I want.
>>
>>Thanks in advance.
>>
>>Russell
>>
>>_______________________________________________
>>Boost-users mailing list
>>Boost-users_at_[hidden]
>>http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>
>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net