unsigned int nprocs = comm->size();
int rank = comm->rank();
- extent = smpi_datatype_get_extent(dtype);
+ extent = dtype->get_extent();
tmp_buf = (void *) smpi_get_tmp_sendbuffer(count * extent);
- smpi_datatype_copy(sbuff, count, dtype, rbuff, count, dtype);
+ Datatype::copy(sbuff, count, dtype, rbuff, count, dtype);
// find nearest power-of-two less than or equal to comm_size
pof2 = 1;
// do the reduction on received data. since the
// ordering is right, it doesn't matter whether
// the operation is commutative or not.
- if(op!=MPI_OP_NULL) op->apply( tmp_buf, rbuff, &count, &dtype);
+ if(op!=MPI_OP_NULL) op->apply( tmp_buf, rbuff, &count, dtype);
// change the rank
newrank = rank / 2;
// This algorithm is used only for predefined ops
// and predefined ops are always commutative.
if(op!=MPI_OP_NULL) op->apply( (char *) tmp_buf + disps[recv_idx] * extent,
- (char *) rbuff + disps[recv_idx] * extent, &recv_cnt, &dtype);
+ (char *) rbuff + disps[recv_idx] * extent, &recv_cnt, dtype);
// update send_idx for next iteration
send_idx = recv_idx;