fix bug in initialization of routing
This commit is contained in:
@@ -242,8 +242,10 @@ class ReduceHandle {
|
||||
static int TypeSize(const MPI::Datatype &dtype);
|
||||
|
||||
protected:
|
||||
// handle data field
|
||||
// handle function field
|
||||
void *handle_;
|
||||
// reduce function of the reducer
|
||||
IEngine::ReduceFunction *redfunc_;
|
||||
// handle to the type field
|
||||
void *htype_;
|
||||
// the created type in 4 bytes
|
||||
|
||||
@@ -201,7 +201,7 @@ inline void ReducerFunc_(const void *src_, void *dst_, int len_, const MPI::Data
|
||||
const char *psrc = reinterpret_cast<const char*>(src_);
|
||||
char *pdst = reinterpret_cast<char*>(dst_);
|
||||
DType tdst, tsrc;
|
||||
for (size_t i = 0; i < len_; ++i) {
|
||||
for (int i = 0; i < len_; ++i) {
|
||||
// use memcpy to avoid alignment issue
|
||||
std::memcpy(&tdst, pdst + i * kUnit, sizeof(tdst));
|
||||
std::memcpy(&tsrc, psrc + i * kUnit, sizeof(tsrc));
|
||||
|
||||
Reference in New Issue
Block a user