GraphLab: Distributed Graph-Parallel API  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
graphlab::queued_fifo_scheduler< Message > Class Template Reference

#include <graphlab/scheduler/queued_fifo_scheduler.hpp>

List of all members.

Public Types

typedef Message message_type
typedef std::deque< lvid_typequeue_type

Public Member Functions

 queued_fifo_scheduler (size_t num_vertices, const graphlab_options &opts)
void set_options (const graphlab_options &opts)
void start ()
void schedule (const lvid_type vid, const message_type &msg)
void schedule_from_execution_thread (const size_t cpuid, const lvid_type vid)
void schedule_all (const message_type &msg, const std::string &order)
void completed (const size_t cpuid, const lvid_type vid, const message_type &msg)
sched_status::status_enum get_specific (lvid_type vid, message_type &ret_msg)
void place (lvid_type vid, const message_type &msg)
sched_status::status_enum get_next (const size_t cpuid, lvid_type &ret_vid, message_type &ret_msg)
size_t num_joins () const
virtual void schedule (lvid_type vid)
virtual void schedule_from_execution_thread (const size_t cpuid, const lvid_type vid, const message_type &message)

Static Public Member Functions

static void print_options_help (std::ostream &out)

Detailed Description

template<typename Message>
class graphlab::queued_fifo_scheduler< Message >

This class defines a multiple queue approximate fifo scheduler. Each processor has its own in_queue which it puts new tasks in and out_queue which it pulls tasks from. Once a processors in_queue gets too large, the entire queue is placed at the end of the shared master queue. Once a processors out queue is empty it grabs the next out_queue from the master.

Definition at line 57 of file queued_fifo_scheduler.hpp.


Member Function Documentation

template<typename Message >
void graphlab::queued_fifo_scheduler< Message >::completed ( const size_t  cpuid,
const lvid_type  vid,
const message_type &  message 
)
inlinevirtual

This is called after a message has been received.

Reimplemented from graphlab::ischeduler< Message >.

Definition at line 178 of file queued_fifo_scheduler.hpp.

template<typename Message >
sched_status::status_enum graphlab::queued_fifo_scheduler< Message >::get_next ( const size_t  cpuid,
lvid_type ret_vid,
message_type &  ret_msg 
)
inlinevirtual

Get the next element in the queue

Implements graphlab::ischeduler< Message >.

Definition at line 199 of file queued_fifo_scheduler.hpp.

template<typename Message >
sched_status::status_enum graphlab::queued_fifo_scheduler< Message >::get_specific ( lvid_type  vid,
message_type &  ret_msg 
)
inlinevirtual

Get a message for a specific vertex.

Reimplemented from graphlab::ischeduler< Message >.

Definition at line 185 of file queued_fifo_scheduler.hpp.

template<typename Message >
size_t graphlab::queued_fifo_scheduler< Message >::num_joins ( ) const
inlinevirtual

Optional to implement. Count the number of message combination operations performed. Returns (size_t)(-1) if not available.

Reimplemented from graphlab::ischeduler< Message >.

Definition at line 249 of file queued_fifo_scheduler.hpp.

template<typename Message >
void graphlab::queued_fifo_scheduler< Message >::place ( lvid_type  vid,
const message_type &  msg 
)
inlinevirtual

Inserts a message for vertex vid to be maintained, but do not update the schedule.

Implements graphlab::ischeduler< Message >.

Definition at line 192 of file queued_fifo_scheduler.hpp.

template<typename Message >
static void graphlab::queued_fifo_scheduler< Message >::print_options_help ( std::ostream &  out)
inlinestatic

Print a help string describing the options that this scheduler accepts.

Reimplemented from graphlab::ischeduler< Message >.

Definition at line 256 of file queued_fifo_scheduler.hpp.

template<typename Message >
void graphlab::queued_fifo_scheduler< Message >::schedule ( const lvid_type  vid,
const message_type &  message 
)
inlinevirtual

Adds a message destined to the vertex vid to the schedule.

Implements graphlab::ischeduler< Message >.

Definition at line 128 of file queued_fifo_scheduler.hpp.

virtual void graphlab::ischeduler< Message >::schedule ( lvid_type  vid)
inlinevirtualinherited

Schedules vertex vid using the stored message that was previously placed using place.

Definition at line 150 of file ischeduler.hpp.

template<typename Message >
void graphlab::queued_fifo_scheduler< Message >::schedule_all ( const message_type &  message,
const std::string &  order 
)
inlinevirtual

Schedule the message to be received by all vertices in the graph.

Implements graphlab::ischeduler< Message >.

Definition at line 166 of file queued_fifo_scheduler.hpp.

virtual void graphlab::ischeduler< Message >::schedule_from_execution_thread ( const size_t  cpuid,
const lvid_type  vid,
const message_type &  message 
)
inlinevirtualinherited

Adds a message destined to the vertex vid to the schedule

Definition at line 94 of file ischeduler.hpp.

template<typename Message >
void graphlab::queued_fifo_scheduler< Message >::schedule_from_execution_thread ( const size_t  cpuid,
const lvid_type  vid 
)
inlinevirtual

Schedules vertex vid using the stored message that was previously placed using place.

Implements graphlab::ischeduler< Message >.

Definition at line 148 of file queued_fifo_scheduler.hpp.

template<typename Message >
void graphlab::queued_fifo_scheduler< Message >::start ( )
inlinevirtual

Called by engine before starting the schedule.

Implements graphlab::ischeduler< Message >.

Definition at line 119 of file queued_fifo_scheduler.hpp.


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