HMLP: High-performance Machine Learning Primitives
|
#include <runtime.hpp>
Public Member Functions | |
Task () | |
(Default) Task constructor. More... | |
~Task () | |
(Default) Task destructor. More... | |
TaskStatus | GetStatus () |
Status is a private member. | |
void | SetStatus (TaskStatus status) |
Move foward to the next status. | |
void | SetBatchStatus (TaskStatus status) |
void | Submit () |
Ask the runtime to create an normal task in file. | |
virtual void | Set (string user_name, void(*user_function)(Task *), void *user_arg) |
This is only for virtual function pointer. | |
virtual void | Prefetch (Worker *) |
void | Enqueue () |
void | Enqueue (size_t tid) |
bool | TryEnqueue () |
Try to dispatch the task if there is no dependency left. | |
void | ForceEnqueue (size_t tid) |
void | CallBackWhileWaiting () |
This is the callback function for the owner of thenested task. More... | |
virtual void | Execute (Worker *)=0 |
virtual void | GetEventRecord () |
virtual void | DependencyAnalysis () |
void | DependenciesUpdate () |
Update the my outgoing and children's incoming edges. More... | |
void | Acquire () |
void | Release () |
bool | IsNested () |
Public Attributes | |
class Worker * | worker = NULL |
string | name |
string | label |
int | taskid |
float | cost = 0 |
bool | priority = false |
Event | event |
void(* | function )(Task *) |
void * | arg |
volatile int | n_dependencies_remaining = 0 |
deque< Task * > | in |
deque< Task * > | out |
Lock * | task_lock = NULL |
Task * | next = NULL |
volatile bool | stealable = true |
volatile int | created_by = 0 |
hmlp::Task::Task | ( | ) |
hmlp::Task::~Task | ( | ) |
(Default) Task destructor.
end Task::Task()
void hmlp::Task::Acquire | ( | ) |
Task lock
void hmlp::Task::CallBackWhileWaiting | ( | ) |
This is the callback function for the owner of thenested task.
end Task::Enqueue()
void hmlp::Task::DependenciesUpdate | ( | ) |
Update the my outgoing and children's incoming edges.
end Task::Set()
Loop over each out-going edge.
There should be at least "one" remaining dependency to satisfy.
Acquire execlusive right to modify the task.
If there is no dependency left, enqueue the task.
Nested tasks may not carry the worker pointer.
Remove this out-going edge.
Move forward to the last status "DONE".
void hmlp::Task::Enqueue | ( | size_t | tid | ) |
Dispatch to nested queue if created in the epoch session.
Move forward to next status "QUEUED".
Finish and return without further going down.
Determine which worker the task should go to using HEFT policy.
Dispatch to normal ready queue.
void hmlp::Task::ForceEnqueue | ( | size_t | tid | ) |
Move forward to next status "QUEUED".
update the remaining time
|
virtual |
All virtual functions.
Reimplemented in hmlp::mpigofmm::DistSkeletonizeTask< NODE, T >, hmlp::mpigofmm::SkeletonizeTask< NODE, T >, hmlp::gofmm::CacheNearNodesTask< NNPRUNE, NODE >, hmlp::gofmm::LeavesToLeavesTask< SUBTASKID, NNPRUNE, NODE, T >, hmlp::gofmm::FactorizeTask< NODE, T >, hmlp::gofmm::SolveTask< NODE, T >, hmlp::gofmm::SkeletonizeTask< NODE, T >, hmlp::gofmm::MatrixPermuteTask< FORWARD, NODE >, hmlp::gofmm::SolverTreeViewTask< NODE >, and hmlp::gofmm::SetupFactorTask< NODE, T >.
bool hmlp::Task::IsNested | ( | ) |
void hmlp::Task::SetBatchStatus | ( | TaskStatus | next_status | ) |
Change the status of all tasks in the batch.
Move to the next task in the batch
deque<Task*> hmlp::Task::in |
Read/write sets for dependency analysis
Task* hmlp::Task::next = NULL |
The next task in the batch job
volatile bool hmlp::Task::stealable = true |
Preserve the current task in the call stack and context switch. If true, this task can be stolen