Apache SINGA
A distributed deep learning platform .
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
singa::Server Class Reference

Public Types

typedef std::map< int,
shared_ptr< Param > > 
ParamShard
 

Public Member Functions

 Server (int thread_id, int group_id, int server_id)
 
void Setup (const UpdaterProto &proto, shared_ptr< ParamShard > shard)
 
void Run ()
 

Protected Member Functions

virtual MsgHandleGet (shared_ptr< Param > param, Msg **msg)
 Process GET request. More...
 
virtual MsgHandleUpdate (shared_ptr< Param > param, Msg **msg)
 Process Update request. More...
 
virtual MsgHandlePut (shared_ptr< Param > param, Msg **msg)
 Process PUT request. More...
 
virtual MsgHandleSyncRequest (shared_ptr< Param > param, Msg **msg)
 TODO Process SYNC request.
 
virtual int HandleSyncResponse (shared_ptr< Param > param, Msg **msg)
 TODO Process SYNC response.
 
virtual bool SyncNow ()
 Scheduler for synchronizing server groups. More...
 

Protected Attributes

int thread_id_
 
int group_id_
 
int server_id_
 
shared_ptr< Dealerdealer_
 
shared_ptr< Updaterupdater_
 
shared_ptr< ParamShard > shard_
 

Member Function Documentation

virtual Msg* singa::Server::HandleGet ( shared_ptr< Param param,
Msg **  msg 
)
protectedvirtual

Process GET request.

Returns
the orignal message or response message
virtual Msg* singa::Server::HandlePut ( shared_ptr< Param param,
Msg **  msg 
)
protectedvirtual

Process PUT request.

Returns
the original message or response message. If we don't want need to acknowledge the put request, then return nullptr.
virtual Msg* singa::Server::HandleUpdate ( shared_ptr< Param param,
Msg **  msg 
)
protectedvirtual

Process Update request.

Returns
the orignal message or response message
virtual bool singa::Server::SyncNow ( )
protectedvirtual

Scheduler for synchronizing server groups.

TODO implement the Caffe's synchronization scheduler for data parallelism


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