- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to know if it exists a way to get (or guess) what will be the grainsize that TBB will use (not the one we give to it and expect it will use).
Indeed, I need to allocate a certain number of data in function of the smallest grainsize used. So far I thought the smallest grainsize used was the one I give to TBB, but I tried some configurations and I found out that the smallest grainsize can be smaller than the grainsize we give to TBB, in certain circumstances.
Is there a "trick" or a simple way to know/guess what will be the smallest grainsize TBB will use in function of the given grainsize BEFORE running the parallel code, i.e typically after the init ? In other words : how TBB chose the grainsize ?
Thanks,
I would like to know if it exists a way to get (or guess) what will be the grainsize that TBB will use (not the one we give to it and expect it will use).
Indeed, I need to allocate a certain number of data in function of the smallest grainsize used. So far I thought the smallest grainsize used was the one I give to TBB, but I tried some configurations and I found out that the smallest grainsize can be smaller than the grainsize we give to TBB, in certain circumstances.
Is there a "trick" or a simple way to know/guess what will be the smallest grainsize TBB will use in function of the given grainsize BEFORE running the parallel code, i.e typically after the init ? In other words : how TBB chose the grainsize ?
Thanks,
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Grainsize is the largest (sub)range size that TBB will not subdivide, so, given large-enough input range size, chunk size will not be smaller than about grainsize/2. Please don't use the word grainsize to mean chunk size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thanks ! that's exactly what I wanted to know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hopefully you'll use this information wisely. Check with yourself that you wouldn't, e.g., manipulate grainsize to achieve a particular number of chunks as a function of hardware parallelism.
Not applicable
09-20-2012
08:33 PM
510 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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