PROOF. Can the slaves share a common object?

Hello

As far as I know, in a parallel proof session, the slaves of the selector copy the objects; and they are merged at the end.

I would like to process the entries in parallel, store part of the processed information in a std::map, and at the end (1 thread) work with the map.

So, I can imagine two ways of doing it:
-Share a unique std::map (protected by a mutex)
-Each slave fill a map, and merged them at the end. This could be time consuming, but the size of the map would be small (around several million of elements).

Question: is any of the options possible, or should I use std::thread?

Thank you for your time.

Regards,
atd

You should write your TSelector and make global the variables that you want to use (for instance creating them in the header file).

From the docs:

Hope this helps,

Hello

I would like a container to be filled by different slaves, and at the end have only one container. Is it possible? (I think that a global container will be filled independently by the different slaves).

Thank you for your time.

Regards.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.