X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cdf6a962eb4e88efbed3df9c41343adabcf09e6c..bfe580c9acb43ca1ca658f9111d4cd6f5951bbdc:/src/smpi/colls/allgather/allgather-smp-simple.cpp diff --git a/src/smpi/colls/allgather/allgather-smp-simple.cpp b/src/smpi/colls/allgather/allgather-smp-simple.cpp index c11d643ba4..e3fb6a10af 100644 --- a/src/smpi/colls/allgather/allgather-smp-simple.cpp +++ b/src/smpi/colls/allgather/allgather-smp-simple.cpp @@ -1,19 +1,17 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "../colls_private.hpp" +#include "xbt/string.hpp" -namespace simgrid{ -namespace smpi{ +namespace simgrid::smpi { - -int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount, - MPI_Datatype stype, void *recv_buf, - int rcount, MPI_Datatype rtype, - MPI_Comm comm) +int allgather__smp_simple(const void *send_buf, int scount, + MPI_Datatype stype, void *recv_buf, + int rcount, MPI_Datatype rtype, + MPI_Comm comm) { int src, dst, comm_size, rank; comm_size = comm->size(); @@ -76,9 +74,9 @@ int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount, if (intra_rank == 0) { int num_req = (inter_comm_size - 1) * 2; - MPI_Request* reqs = new MPI_Request[num_req]; + auto* reqs = new MPI_Request[num_req]; MPI_Request* req_ptr = reqs; - MPI_Status* stat = new MPI_Status[num_req]; + auto* stat = new MPI_Status[num_req]; for (i = 1; i < inter_comm_size; i++) { @@ -125,6 +123,4 @@ int Coll_allgather_smp_simple::allgather(const void *send_buf, int scount, return MPI_SUCCESS; } - -} -} +} // namespace simgrid::smpi