- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello~
I am trying to observe the total task number of applications from parsec.
The only way to put tasks into a deque of thread is calling the "spawn" function. Am I right?
I simply create a variable and increase it at each iteration in the "spawn" function.
Do I miss anything?
Thanks for reading
Dennis
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tasks might not necessarily be spawned in order to execute.
I'd track the number of allocated tasks or the number of executed tasks.
I'd track the number of allocated tasks or the number of executed tasks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Alexey Kukanov (Intel)
Tasks might not necessarily be spawned in order to execute.
I'd track the number of allocated tasks or the number of executed tasks.
I'd track the number of allocated tasks or the number of executed tasks.
Thanks for replying.
I want to calculate all the tasks which would be put in the deque of scheduler to wait for execution.
I know the task which is returned by the previous task would be executed without being put in the deque again.
If I track the number of allocated tasks or executed tasks, the result would be the total tasks of applications.
Am I wrong?
Thanks again for your patience
Dennis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If counting only spawned tasks is what you need, then yes, track spawn().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for replying.
I am trying to sample the number of tasks resides in the deque during the applications execution.
I have traced the task.cpp and I am wondering if the variable "deepest" in the get_task equals the number of tasks in the deque currently.
That is, the deepest = 5 in the get_task method means that there are five tasks in this deque, am I right?
I am also curious about what's the purpose of the task pointer "next" in the task_proxy class.
Any help would be grateful!
Thank you very much.
Dennis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - irisshinra308
Thanks for replying.
I am trying to sample the number of tasks resides in the deque during the applications execution.
I have traced the task.cpp and I am wondering if the variable "deepest" in the get_task equals the number of tasks in the deque currently.
That is, the deepest = 5 in the get_task method means that there are five tasks in this deque, am I right?
I am also curious about what's the purpose of the task pointer "next" in the task_proxy class.
Any help would be grateful!
Thank you very much.
Dennis
No, deepest is not equal to the number of tasks in the pool.
The task_proxy class does not have a member called next;did you mean "next_in_mailbox", and if yes, isn't it self-describing? :) Mailbox is a list of task_proxy objects representing the work suggested by other threads; it is a part of task-to-thread affinity mechanism in TBB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Alexey Kukanov (Intel)
No, deepest is not equal to the number of tasks in the pool.
The task_proxy class does not have a member called next;did you mean "next_in_mailbox", and if yes, isn't it self-describing? :) Mailbox is a list of task_proxy objects representing the work suggested by other threads; it is a part of task-to-thread affinity mechanism in TBB.
Thanks for replying.
I have checked the source code of tbb and the member "next" is in the task_prefix class.
Sorry for my mistake.
Is there any variable in tbb record the number of tasks which are currently in the deque?
If not, could you please give me some hint to get this information?
Any help would be grateful!!
Thanks again.
Dennis

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