- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
But normally you should be able to use auto_partitioner (the default) and not have to specify a grainsize at all (using default 1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aha.. Thanks for your quick reply - I misunderstood.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page