Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.MultiIndex question on merge
From: arm2arm (arm2arm_at_[hidden])
Date: 2009-04-28 11:05:52


Thanks for quick response
insert solves the problem.
Yes the typedef is a typo, due to copy and paste, sorry for that ;)

To: Ovanes
Are there gain in the speed if I would use the for_each?
I am always avoiding to use for_each to allow the compiler (like INTEL)
auto-parallelize the regions.
But for this particular case Is not a issue.

Arman.

Ovanes Markarian wrote:
>
> why not using an stl algorithm? If you use ordered_non_unique you can use
> the for_each algorithms with an inserter functor.
>
> Ovanes
>
>
>
> On Tue, Apr 28, 2009 at 3:46 PM, arm2arm <arm2arm_at_[hidden]> wrote:
>
>>
>> Hello,
>> Are there way to merge two multiindex objects ?
>> suppouse we have :
>>
>> struct strData{
>> int id;
>> float a, b;
>> strData(int id_, float a_, float b_):a(a_),b(b_),id(id_){}
>> };
>>
>> typedef multi_index_container<
>> strData,
>> indexed_by<
>> ordered_unique<
>> tag<id>, BOOST_MULTI_INDEX_MEMBER(strData,int,id)>,
>> ordered_non_unique<
>> tag<snap>,BOOST_MULTI_INDEX_MEMBER(strData,float,a)>
>> >
>> > data_setA, data_setB;
>> Are there way to do:
>>
>> data_setA.merge(data_setB) ?
>>
>> thank you beforehand.
>> Arman.
>> --
>> View this message in context:
>> http://www.nabble.com/Boost.MultiIndex-question-on-merge-tp23277496p23277496.html
>> Sent from the Boost - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
View this message in context: http://www.nabble.com/Boost.MultiIndex-question-on-merge-tp23277496p23278989.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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