HMLP: High-performance Machine Learning Primitives
hmlp::Task Class Referenceabstract

#include <runtime.hpp>

Inheritance diagram for hmlp::Task:
hmlp::CovReduceTask< T > hmlp::CovTask< T > hmlp::gemm::xgemmBarrierTask< T > hmlp::gemm::xgemmTask< T > hmlp::gofmm::CacheNearNodesTask< NNPRUNE, NODE > hmlp::gofmm::FactorizeTask< NODE, T > hmlp::gofmm::gpu::LeavesToLeavesVer2Task< CACHE, NNPRUNE, NODE, T > hmlp::gofmm::InterpolateTask< NODE > hmlp::gofmm::LeavesToLeavesTask< SUBTASKID, NNPRUNE, NODE, T > hmlp::gofmm::MatrixPermuteTask< FORWARD, NODE > hmlp::gofmm::NearSamplesTask< NODE, T > hmlp::gofmm::NeighborsTask< NODE, T > hmlp::gofmm::SetupFactorTask< NODE, T > hmlp::gofmm::SkeletonizeTask< NODE, T > hmlp::gofmm::SkeletonKIJTask< NNPRUNE, NODE, T > hmlp::gofmm::SkeletonsToNodesTask< NNPRUNE, NODE, T > hmlp::gofmm::SkeletonsToSkeletonsTask< NNPRUNE, NODE, T > hmlp::gofmm::SolverTreeViewTask< NODE > hmlp::gofmm::SolveTask< NODE, T > hmlp::gofmm::TreeViewTask< NODE > hmlp::gofmm::ULVBackwardSolveTask< NODE, T > hmlp::gofmm::ULVForwardSolveTask< NODE, T > hmlp::gofmm::UpdateWeightsTask< NODE, T > hmlp::MessageTask hmlp::mpigofmm::CacheFarNodesTask< NNPRUNE, NODE > hmlp::mpigofmm::CacheNearNodesTask< NNPRUNE, NODE > hmlp::mpigofmm::DistFactorizeTask< NODE, T > hmlp::mpigofmm::DistFactorTreeViewTask< NODE, T > hmlp::mpigofmm::DistMergeFarNodesTask< SYMMETRIC, NODE, T > hmlp::mpigofmm::DistSetupFactorTask< NODE, T > hmlp::mpigofmm::DistSkeletonizeTask< NODE, T > hmlp::mpigofmm::DistSkeletonKIJTask< NNPRUNE, NODE, T > hmlp::mpigofmm::DistSkeletonsToNodesTask< NNPRUNE, NODE, T > hmlp::mpigofmm::DistTreeViewTask< NODE > hmlp::mpigofmm::DistULVBackwardSolveTask< NODE, T > hmlp::mpigofmm::DistULVForwardSolveTask< NODE, T > hmlp::mpigofmm::DistUpdateWeightsTask< NODE, T > hmlp::mpigofmm::InterpolateTask< NODE > hmlp::mpigofmm::L2LReduceTask2< NODE, T > hmlp::mpigofmm::L2LTask2< NODE, T > hmlp::mpigofmm::MergeFarNodesTask< SYMMETRIC, NODE, T > hmlp::mpigofmm::S2SReduceTask2< NODE, LETNODE, T > hmlp::mpigofmm::S2STask2< NODE, LETNODE, T > hmlp::mpigofmm::SkeletonizeTask< NODE, T > hmlp::mpitree::DistIndexPermuteTask< NODE > hmlp::mpitree::DistSplitTask< NODE > hmlp::NULLTask< ARGUMENT > hmlp::tree::IndexPermuteTask< NODE > hmlp::tree::SplitTask< NODE >

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 Workerworker = 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
 
Locktask_lock = NULL
 
Tasknext = NULL
 
volatile bool stealable = true
 
volatile int created_by = 0
 

Detailed Description

end class Event class Task

Constructor & Destructor Documentation

hmlp::Task::Task ( )

(Default) Task constructor.

class Task

Change status to allocated.

Whether this is a nested task?

Which thread creates me?

Move forward to next status "NOTREADY".

hmlp::Task::~Task ( )

(Default) Task destructor.

end Task::Task()

Member Function Documentation

void hmlp::Task::Acquire ( )
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)

end Task::ForceEnqueue()

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

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

Member Data Documentation

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


The documentation for this class was generated from the following files: