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

#include <graphlab/scheduler/ischeduler.hpp>

List of all members.

Public Types

typedef MessageType message_type

Public Member Functions

virtual ~ischeduler ()
 destructor
virtual void start ()=0
virtual void schedule (const lvid_type vid, const message_type &message)=0
virtual void schedule_from_execution_thread (const size_t cpuid, const lvid_type vid, const message_type &message)
virtual void schedule_all (const message_type &message, const std::string &order="sequential")=0
virtual sched_status::status_enum get_next (const size_t cpuid, lvid_type &ret_vid, message_type &ret_msg)=0
virtual sched_status::status_enum get_specific (lvid_type vid, message_type &ret_msg)
virtual void place (lvid_type vid, const message_type &msg)=0
virtual void schedule_from_execution_thread (const size_t cpuid, lvid_type vid)=0
virtual void schedule (lvid_type vid)
virtual void completed (const size_t cpuid, const lvid_type vid, const message_type &message)
virtual size_t num_joins () const

Static Public Member Functions

static void print_options_help (std::ostream &out)

Detailed Description

template<typename MessageType>
class graphlab::ischeduler< MessageType >

This describes the interface/concept for . The engine will be passed the scheduler type as a template argument, so the scheduler must inherit and satisfy this interface EXACTLY. Note that all functions (with the exception of the constructor and destructor and start()) must be thread-safe.

Definition at line 72 of file ischeduler.hpp.


Member Function Documentation

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

This is called after a message has been received.

Reimplemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

Definition at line 156 of file ischeduler.hpp.

template<typename MessageType>
virtual sched_status::status_enum graphlab::ischeduler< MessageType >::get_next ( const size_t  cpuid,
lvid_type ret_vid,
message_type &  ret_msg 
)
pure virtual

This function is called by the engine to ask for the next message to process. The message and receiving vertex are returned in ret_msg and ret_vid respectively.

Return values:
NEWTASKThere is a new message to process
EMPTYThere are no messages to process

Implemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

template<typename MessageType>
virtual sched_status::status_enum graphlab::ischeduler< MessageType >::get_specific ( lvid_type  vid,
message_type &  ret_msg 
)
inlinevirtual

Get a message for a specific vertex.

Reimplemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

Definition at line 126 of file ischeduler.hpp.

template<typename MessageType>
virtual size_t graphlab::ischeduler< MessageType >::num_joins ( ) const
inlinevirtual

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

Reimplemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

Definition at line 165 of file ischeduler.hpp.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::place ( lvid_type  vid,
const message_type &  msg 
)
pure virtual

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

Implemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

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

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

Reimplemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

Definition at line 171 of file ischeduler.hpp.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::schedule ( const lvid_type  vid,
const message_type &  message 
)
pure virtual

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

Implemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::schedule ( lvid_type  vid)
inlinevirtual

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

Definition at line 150 of file ischeduler.hpp.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::schedule_all ( const message_type &  message,
const std::string &  order = "sequential" 
)
pure virtual

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

Implemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::schedule_from_execution_thread ( const size_t  cpuid,
const lvid_type  vid,
const message_type &  message 
)
inlinevirtual

Adds a message destined to the vertex vid to the schedule

Definition at line 94 of file ischeduler.hpp.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::schedule_from_execution_thread ( const size_t  cpuid,
lvid_type  vid 
)
pure virtual

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

Implemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.

template<typename MessageType>
virtual void graphlab::ischeduler< MessageType >::start ( )
pure virtual

Called by engine before starting the schedule.

Implemented in graphlab::fifo_scheduler< Message >, and graphlab::queued_fifo_scheduler< Message >.


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