- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I set the grainsize to 100/200/500/1000, results are the same.
...
parallel_for(blocked_range<size_t>(0, to_scan.size(), 200), //i changed the parameter to 100/200/500/1000
SubStringFinder( to_scan, max, pos ));
...
the output ranges as follows, it seems that the grainsize is more than 1000 and the parameter doesn't take effect at all.
...
[
[8855,9962)
0,1106)
[4427,5534)
[2213,2766)
...
So what's wrong with it? Thank you for your help.
Tbb version is 3.0; Processor: Intel i5 2450M; OS: Win7
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Er, an off-by-1 error on my part: a range is splittable not when its size is "at least" grainsize but when it is "bigger than" grainsize (which also means that 1 is not a special case). I occasionally mix this up, but I don't know what to think about it that nobody else noticed this first?
What still makes it a misnomer in my opinion is that a range smaller than 2*grainsize would be split into subranges at least one of which will be smaller than grainsize, and a typical chunk is smaller than grainsize (with simple_partitioner anyway, and often also with auto_partitioner).
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page