Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
singa::Msg Class Reference
Inheritance diagram for singa::Msg:
singa::BaseMsg

Public Member Functions

virtual void set_src (int first, int second, int flag)
 
virtual void set_dst (int first, int second, int flag)
 
virtual void set_src (int procs_id, int flag)
 
virtual void set_dst (int procs_id, int flag)
 
int src () const
 
int dst () const
 
virtual int src_first () const
 
virtual int dst_first () const
 
virtual int src_second () const
 
virtual int dst_second () const
 
virtual int src_flag () const
 
virtual int dst_flag () const
 
void SwapAddr ()
 
virtual void set_type (int type)
 
virtual int type () const
 
virtual void set_target (int first, int second)
 
virtual int target_first () const
 
virtual int target_second () const
 
virtual BaseMsgCopyAddr ()
 Copy src and dst address, including first, id, flag.
 
virtual void SetAddr (BaseMsg *msg)
 
virtual void add_frame (const void *addr, int nBytes)
 Add a frame (a chunck of bytes) into the message.
 
virtual int frame_size ()
 
virtual void * frame_data ()
 
virtual bool next_frame ()
 Move the cursor to the next frame. More...
 
void ParseFromZmsg (zmsg_t *msg)
 
zmsg_t * DumpToZmsg ()
 
- Public Member Functions inherited from singa::BaseMsg
virtual ~BaseMsg ()
 Destructor to free memory.
 

Protected Attributes

int src_
 
int dst_
 
int type_
 
int target_first_
 
int target_second_
 
zmsg_t * msg_
 
zframe_t * frame_
 

Static Protected Attributes

static const unsigned int kOff1 =16
 
static const unsigned int kOff2 =4
 
static const unsigned int kMask1 =(1<<kOff1)-1
 
static const unsigned int kMask2 =(1<<kOff2)-1
 

Member Function Documentation

virtual bool singa::Msg::next_frame ( )
inlinevirtual

Move the cursor to the next frame.

Returns
true if the next frame is not NULL; otherwise false

Implements singa::BaseMsg.

virtual void singa::Msg::set_src ( int  first,
int  second,
int  flag 
)
inlinevirtual
Parameters
firstworker/server group id
idworker/server id within the group
flag0 for server, 1 for worker, 2 for stub

Implements singa::BaseMsg.


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