PFUNC 1.0
|
This strucure is used for dynamic casting purposes ONLY. More...
#include <pfunc/trampolines.hpp>
Public Member Functions | |
virtual | ~taskmgr_virtual_base () |
virtual void | operator() (void *)=0 |
virtual unsigned int | current_thread_id ()=0 |
virtual unsigned int | current_task_group_rank ()=0 |
virtual unsigned int | current_task_group_size ()=0 |
virtual void | current_task_group_barrier ()=0 |
virtual void | progress_wait (event< testable_event > &)=0 |
virtual void | progress_barrier ()=0 |
virtual void | spawn_task (void *, void *)=0 |
virtual void | spawn_task (void *, void *, void *)=0 |
virtual void | spawn_task (void *, void *, void *, void *)=0 |
virtual void | set_max_attempts (const unsigned int &)=0 |
virtual unsigned int | get_max_attempts () const =0 |
virtual unsigned int | get_num_threads () const =0 |
virtual unsigned int | get_num_queues () const =0 |
This strucure is used for dynamic casting purposes ONLY.
taskmgr_virtual_base is used as a trampoline when we use either WINDOWS or pthreads. It also serves the important purpose of enabling global task managers to be used. Note that since the task manager's type is not determined by the users, we have to resort to using a virtual class if we are to use global classes.
virtual pfunc::detail::taskmgr_virtual_base::~taskmgr_virtual_base | ( | ) | [inline, virtual] |
Virtual destructor
virtual void pfunc::detail::taskmgr_virtual_base::current_task_group_barrier | ( | ) | [pure virtual] |
Executes a barrier accross the group to which the currently executing task (and hence, thread) belong.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual unsigned int pfunc::detail::taskmgr_virtual_base::current_task_group_rank | ( | ) | [pure virtual] |
Returns the rank of the task being currently executed by the calling thread in that particular task's group.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual unsigned int pfunc::detail::taskmgr_virtual_base::current_task_group_size | ( | ) | [pure virtual] |
Returns the size of group of the task being currently executed by the calling thread.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual unsigned int pfunc::detail::taskmgr_virtual_base::current_thread_id | ( | ) | [pure virtual] |
Returns the PFunc ID (always unsigned int) of the current thread id
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual unsigned int pfunc::detail::taskmgr_virtual_base::get_max_attempts | ( | ) | const [pure virtual] |
Gets the maximum number of attempts made by a thread before yielding.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual unsigned int pfunc::detail::taskmgr_virtual_base::get_num_queues | ( | ) | const [pure virtual] |
Gets the number of queues in this taskmgr.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual unsigned int pfunc::detail::taskmgr_virtual_base::get_num_threads | ( | ) | const [pure virtual] |
Gets the total number of threads in this taskmgr.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::operator() | ( | void * | ) | [pure virtual] |
Required for pthread_create to ultimately execute via reroute_function_arg
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::progress_barrier | ( | ) | [pure virtual] |
Executes a task (from own queue or otherwise) while waiting on a barrier to complete. Note that the task executed is ALWAYS from a group other than that of the calling task (ensures deadlock avoidance).
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::progress_wait | ( | event< testable_event > & | ) | [pure virtual] |
Executes a task (from own queue or otherwise) while waiting on a task to complete.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::set_max_attempts | ( | const unsigned int & | ) | [pure virtual] |
Sets the maximum number of attempts made by a thread before yielding.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::spawn_task | ( | void * | , |
void * | , | ||
void * | |||
) | [pure virtual] |
Runs the specified task. This function call is type UNSAFE and is used when global_taskmanager is used. We cannot help it as the derived class of taskmgr_virtual_base class has template arguments. So, we don't know the type of the task, attribute, or the functor.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::spawn_task | ( | void * | , |
void * | , | ||
void * | , | ||
void * | |||
) | [pure virtual] |
Runs the specified task. This function call is type UNSAFE and is used when global_taskmanager is used. We cannot help it as the derived class of taskmgr_virtual_base class has template arguments. So, we don't know the type of the task, attribute, group or the functor.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.
virtual void pfunc::detail::taskmgr_virtual_base::spawn_task | ( | void * | , |
void * | |||
) | [pure virtual] |
Runs the specified task. This function call is type UNSAFE and is used when global_taskmanager is used. We cannot help it as the derived class of taskmgr_virtual_base class has template arguments. So, we don't know the type of the task or the functor.
Implemented in pfunc::detail::taskmgr< SchedPolicyName, Task >.