Community
cancel
Showing results for 
Search instead for 
Did you mean: 
james_b1
Beginner
31 Views

Parallel For-Each

Hiya,

I'm looking to use parallel_for_each to process a concurrent_ordered_map of AI actors.

From the documentation, it looks like a grain-size of 10,000 is a good starting place. The simulation is unlikely to have more than 4000 actors though - so if I understand correctly, only one thread will be used with this value.

Is this right?
0 Kudos
2 Replies
RafSchietekat
Black Belt
31 Views

10000 is often mentioned as the minimal number of processor instructions for a task, not the minimal number of iterations. If that is not clear somewhere, you should probably report it for correction.

But normally you should be able to use auto_partitioner (the default) and not have to specify a grainsize at all (using default 1).
james_b1
Beginner
31 Views

Aha.. Thanks for your quick reply - I misunderstood.
Reply