"python-package/vscode:/vscode.git/clone" did not exist on "702fff227d8960e532dd9ad4abd8e4456084345a"
Unverified Commit e1572794 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

move Network method implementations from network.h to network.cpp (fixes #4464) (#4496)

parent b52ecb16
...@@ -100,9 +100,9 @@ class Network { ...@@ -100,9 +100,9 @@ class Network {
/*! \brief Free this static class */ /*! \brief Free this static class */
static void Dispose(); static void Dispose();
/*! \brief Get rank of this machine */ /*! \brief Get rank of this machine */
static inline int rank(); static int rank();
/*! \brief Get total number of machines */ /*! \brief Get total number of machines */
static inline int num_machines(); static int num_machines();
/*! /*!
* \brief Perform all_reduce. if data size is small, * \brief Perform all_reduce. if data size is small,
...@@ -312,14 +312,6 @@ class Network { ...@@ -312,14 +312,6 @@ class Network {
static THREAD_LOCAL AllgatherFunction allgather_ext_fun_; static THREAD_LOCAL AllgatherFunction allgather_ext_fun_;
}; };
inline int Network::rank() {
return rank_;
}
inline int Network::num_machines() {
return num_machines_;
}
} // namespace LightGBM } // namespace LightGBM
#endif // LightGBM_NETWORK_H_ #endif // LightGBM_NETWORK_H_
...@@ -317,4 +317,12 @@ void Network::ReduceScatterRing(char* input, comm_size_t, int type_size, ...@@ -317,4 +317,12 @@ void Network::ReduceScatterRing(char* input, comm_size_t, int type_size,
std::memcpy(output, input + block_start[rank_], block_len[rank_]); std::memcpy(output, input + block_start[rank_], block_len[rank_]);
} }
int Network::rank() {
return rank_;
}
int Network::num_machines() {
return num_machines_;
}
} // namespace LightGBM } // namespace LightGBM
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment