Information on TBB Scheduler and Task Stealing

Dmitriy Vyukov
Total Points:
25,462
Status Points:
25,462
Black Belt
November 9, 2008 2:43 AM PST
Rate
 
#3 Reply to #2
Quoting - abhishek84

Hi Dmitry

Thank you for the clarification. I had suspected this after making my post but did want to ensure that this was the problem. Given this issue, is there an easy way for me to figure out how many tasks are being inserted? Is there some sort of parameter or variable in the spawn that yields this information?

Thank you!

 

I don't see such parameters/variables, I think that you can do something like this:

void GenericScheduler::spawn( task& first, task*& next ) {
__TBB_ASSERT( assert_okay(), NULL );
TBB_TRACE(("%p.internal_spawn enter\n", this ));
task* first_ptr = &first;
task** link = &first_ptr;
size_t number_of_spawned_tasks = 0;
for( task* t = first_ptr; ; t=*link )
{
number_of_spawned_tasks += 1;
...
}

#ifdef(MY_COUNTER)
counter += number_of_spawned_tasks;
#endif




Intel Software Network Forums Statistics

8487 users have contributed to 31622 threads and 100698 posts to date.
In the past 24 hours, we have 35 new thread(s) 121 new posts(s), and 186 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member chat1983