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

Cluster is a singleton object, which provides cluster configuations, e.g., the topology of the cluster. More...

#include <cluster.h>

Public Member Functions

const int nserver_groups () const
 
const int nworker_groups () const
 
int nworkers_per_group () const
 
int nservers_per_group () const
 
int nworkers_per_procs () const
 
int nservers_per_procs () const
 
int nworker_groups_per_server_group () const
 
bool has_server () const
 
bool has_worker () const
 
int procs_id () const
 
bool server_worker_separate () const
 
int nworker_procs () const
 
int nserver_procs () const
 
int nprocs () const
 
const string endpoint () const
 
const string endpoint (int procs_id) const
 
const string workspace ()
 
const string vis_folder ()
 
const string log_folder ()
 
const int stub_timeout () const
 
const int worker_timeout () const
 
const int server_timeout () const
 
shared_ptr< ClusterRuntimeruntime () const
 bandwidth MB/s float bandwidth() const { return cluster_.bandwidth(); }
 

Static Public Member Functions

static shared_ptr< ClusterGet ()
 
static shared_ptr< ClusterGet (const ClusterProto &cluster, int procs_id)
 

Detailed Description

Cluster is a singleton object, which provides cluster configuations, e.g., the topology of the cluster.

All IDs start from 0.

Member Function Documentation

const string singa::Cluster::endpoint ( int  procs_id) const
inline
Returns
endpoint of the router of a procs with the specified id
bool singa::Cluster::has_server ( ) const
inline
Returns
true if the calling procs has server threads, otherwise false
bool singa::Cluster::has_worker ( ) const
inline
Returns
true if the calling procs has worker threads.
int singa::Cluster::procs_id ( ) const
inline
Returns
global procs id, which starts from 0.

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