Squashed 'subtree/rabit/' changes from 28ca7be..d558f6f
d558f6fredefine distributed meansc8efc01more complicated yarn script git-subtree-dir: subtree/rabit git-subtree-split:d558f6f550
This commit is contained in:
@@ -145,6 +145,8 @@ class IEngine {
|
||||
virtual int GetRank(void) const = 0;
|
||||
/*! \brief gets total number of nodes */
|
||||
virtual int GetWorldSize(void) const = 0;
|
||||
/*! \brief whether we run in distribted mode */
|
||||
virtual bool IsDistributed(void) const = 0;
|
||||
/*! \brief gets the host name of the current node */
|
||||
virtual std::string GetHost(void) const = 0;
|
||||
/*!
|
||||
|
||||
@@ -107,6 +107,10 @@ inline int GetRank(void) {
|
||||
inline int GetWorldSize(void) {
|
||||
return engine::GetEngine()->GetWorldSize();
|
||||
}
|
||||
// whether rabit is distributed
|
||||
inline bool IsDistributed(void) {
|
||||
return engine::GetEngine()->IsDistributed();
|
||||
}
|
||||
// get the name of current processor
|
||||
inline std::string GetProcessorName(void) {
|
||||
return engine::GetEngine()->GetHost();
|
||||
|
||||
Reference in New Issue
Block a user