Logo ROOT  
Reference Guide
RooFit::MultiProcess::PriorityQueue Class Reference

Queue that orders tasks according to specified task priorities.

Definition at line 30 of file PriorityQueue.h.

Public Member Functions

void add (JobTask job_task) override
 See Queue::add. More...
 
bool pop (JobTask &job_task) override
 See Queue::pop. More...
 
void setTaskPriorities (std::size_t job_id, const std::vector< std::size_t > &task_priorities)
 Set the priority for Job tasks. More...
 
void suggestTaskOrder (std::size_t job_id, const std::vector< Task > &task_order)
 Set the desired order for executing tasks of a Job. More...
 
- Public Member Functions inherited from RooFit::MultiProcess::Queue
virtual ~Queue ()=default
 
virtual void add (JobTask job_task)=0
 Enqueue a task. More...
 
void loop ()
 The queue process's event loop. More...
 
virtual bool pop (JobTask &job_task)=0
 Have a worker ask for a task-message from the queue. More...
 
void process_master_message (M2Q message)
 Helper function for 'Queue::loop()'. More...
 
void process_worker_message (std::size_t this_worker_id, W2Q message)
 Helper function for 'Queue::loop()'. More...
 

Private Attributes

std::priority_queue< OrderedJobTaskqueue_
 
std::unordered_map< std::size_t, std::vector< std::size_t > > task_priority_
 

Additional Inherited Members

- Protected Attributes inherited from RooFit::MultiProcess::Queue
std::size_t N_tasks_ = 0
 
std::size_t N_tasks_at_workers_ = 0
 

#include </home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master/roofit/multiprocess/src/PriorityQueue.h>

Inheritance diagram for RooFit::MultiProcess::PriorityQueue:
[legend]

Member Function Documentation

◆ add()

void RooFit::MultiProcess::PriorityQueue::add ( JobTask  job_task)
overridevirtual

See Queue::add.

Implements RooFit::MultiProcess::Queue.

Definition at line 40 of file PriorityQueue.cxx.

◆ pop()

bool RooFit::MultiProcess::PriorityQueue::pop ( JobTask job_task)
overridevirtual

See Queue::pop.

Implements RooFit::MultiProcess::Queue.

Definition at line 29 of file PriorityQueue.cxx.

◆ setTaskPriorities()

void RooFit::MultiProcess::PriorityQueue::setTaskPriorities ( std::size_t  job_id,
const std::vector< std::size_t > &  task_priorities 
)

Set the priority for Job tasks.

See Config::Queue::setTaskPriorities.

Definition at line 72 of file PriorityQueue.cxx.

◆ suggestTaskOrder()

void RooFit::MultiProcess::PriorityQueue::suggestTaskOrder ( std::size_t  job_id,
const std::vector< Task > &  task_order 
)

Set the desired order for executing tasks of a Job.

See Config::Queue::suggestTaskOrder.

Definition at line 60 of file PriorityQueue.cxx.

Member Data Documentation

◆ queue_

std::priority_queue<OrderedJobTask> RooFit::MultiProcess::PriorityQueue::queue_
private

Definition at line 37 of file PriorityQueue.h.

◆ task_priority_

std::unordered_map<std::size_t, std::vector<std::size_t> > RooFit::MultiProcess::PriorityQueue::task_priority_
private

Definition at line 39 of file PriorityQueue.h.


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