
----- Original Message ----- From: "Phil Endecott" <spam_from_boost_dev@chezphil.org> To: <boost@lists.boost.org> Sent: Monday, March 02, 2009 3:35 PM Subject: Re: [boost] [threadpool] parallel_sort example
vicente.botet wrote:
I have implemented a parallel sort with the threadpool library
Hi Vicente,
I have not tried to totally understand your code, but can you explain:
partition<Range> parts(range, BOOST_PARTS);
return boost::inplace_merge(rng, boost::begin(rng)+(boost::size(rng)/2));
Is this right when BOOST_PARTS != 2 ?
Good point Phil, No this do not works. If BOOST_PARTS is 4 we will have 4 partitions sorted that need to be merged. The boost::inplace_merge works only for two parts. I don't know if a parallel merge could improve the performaces on processors with more cores. A merge of N sorted parts should be easily parallelized, but I have not yet done this. May be this will be the next step. Thanks for the remark, Vicente