]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/reduce/reduce-ompi.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'Adrien.Gougeon/simgrid-master'
[simgrid.git] / src / smpi / colls / reduce / reduce-ompi.cpp
index ccdd68e07a5ea9f82de076c5e949111c717656d5..8f87360b094eef797cd65e19c037d3782bf7ecd6 100644 (file)
@@ -266,8 +266,12 @@ int smpi_coll_tuned_ompi_reduce_generic(const void* sendbuf, void* recvbuf, int
         else {
 
             int creq = 0;
-            MPI_Request* sreq = new (std::nothrow) MPI_Request[max_outstanding_reqs];
-            if (NULL == sreq) { line = __LINE__; ret = -1; goto error_hndl; }
+            auto* sreq = new (std::nothrow) MPI_Request[max_outstanding_reqs];
+            if (nullptr == sreq) {
+              line = __LINE__;
+              ret  = -1;
+              goto error_hndl;
+            }
 
             /* post first group of requests */
             for (segindex = 0; segindex < max_outstanding_reqs; segindex++) {
@@ -520,14 +524,14 @@ int reduce__ompi_in_order_binary(const void *sendbuf, void *recvbuf,
 
         if ((root == rank) && (MPI_IN_PLACE == sendbuf)) {
           tmp_sendbuf = smpi_get_tmp_sendbuffer(text + (count - 1) * ext);
-          if (NULL == tmp_sendbuf) {
+          if (nullptr == tmp_sendbuf) {
             return MPI_ERR_INTERN;
           }
           Datatype::copy(recvbuf, count, datatype, tmp_sendbuf, count, datatype);
           use_this_sendbuf = tmp_sendbuf;
         } else if (io_root == rank) {
           tmp_recvbuf = smpi_get_tmp_recvbuffer(text + (count - 1) * ext);
-          if (NULL == tmp_recvbuf) {
+          if (nullptr == tmp_recvbuf) {
             return MPI_ERR_INTERN;
           }
           use_this_recvbuf = tmp_recvbuf;