This commit is contained in:
tqchen 2014-10-15 21:45:13 -07:00
parent f2577fec86
commit 6680bffaae

View File

@ -10,12 +10,12 @@
#include "../utils/utils.h" #include "../utils/utils.h"
namespace xgboost { namespace xgboost {
/*! \brief syncrhonizer module that minimum wraps MPI */ /*! \brief syncrhonizer module that minimumly wraps interface of MPI */
namespace sync { namespace sync {
/*! \brief reduce operator supported */ /*! \brief reduce operator supported */
enum ReduceOp { enum ReduceOp {
kBitwiseOR, kSum,
kSum kBitwiseOR
}; };
typedef void (ReduceFunction) (const void *src, void *dst, int len); typedef void (ReduceFunction) (const void *src, void *dst, int len);
@ -75,7 +75,7 @@ class Reducer {
* \param bytes number of 4bytes send through all reduce * \param bytes number of 4bytes send through all reduce
* \param reducer the reducer function * \param reducer the reducer function
*/ */
inline void AllReduce(DType *sendrecvbuf, int count) { inline void AllReduce(DType *sendrecvbuf, size_t count) {
handle.AllReduce(sendrecvbuf, count * kUnit); handle.AllReduce(sendrecvbuf, count * kUnit);
} }