Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use/unuse -> ref/unref
[simgrid.git] / src / smpi / colls / reduce-scatter-gather.cpp
index dbe4c18..ab769b8 100644 (file)
@@ -36,7 +36,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
   
 
 
-  extent = smpi_datatype_get_extent(datatype);
+  extent = datatype->get_extent();
   /* If I'm not the root, then my recvbuf may not be valid, therefore
   I have to allocate a temporary one */
   if (rank != root && !recvbuf) {
@@ -68,7 +68,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
         newrank = -1;
       } else {
         Request::recv(tmp_buf, count, datatype, rank + 1, tag, comm, &status);
-        if(op!=MPI_OP_NULL) op->apply( tmp_buf, recv_ptr, &new_count, &datatype);
+        if(op!=MPI_OP_NULL) op->apply( tmp_buf, recv_ptr, &new_count, datatype);
         newrank = rank / 2;
       }
     } else                      /* rank >= 2*rem */
@@ -123,7 +123,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
 
         if(op!=MPI_OP_NULL) op->apply( (char *) tmp_buf + disps[recv_idx] * extent,
                        (char *) recv_ptr + disps[recv_idx] * extent,
-                       &recv_cnt, &datatype);
+                       &recv_cnt, datatype);
 
         /* update send_idx for next iteration */
         send_idx = recv_idx;
@@ -245,7 +245,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
 
       else {
         Request::recv(tmp_buf, count, datatype, rank + 1, tag, comm, &status);
-        if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, &datatype);
+        if(op!=MPI_OP_NULL) op->apply( tmp_buf, recvbuf, &count, datatype);
         newrank = rank / 2;
       }
     } else                      /* rank >= 2*rem */
@@ -300,7 +300,7 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
 
         if(op!=MPI_OP_NULL) op->apply( (char *) tmp_buf + disps[recv_idx] * extent,
                        (char *) recvbuf + disps[recv_idx] * extent,
-                       &recv_cnt, &datatype);
+                       &recv_cnt, datatype);
 
         /* update send_idx for next iteration */
         send_idx = recv_idx;