s_mpi_coll_description_t mpi_coll_gather_description[] = {
{"default", "gather default collective", reinterpret_cast<void*>(&smpi_mpi_gather)},
- COLL_GATHERS(COLL_DESCRIPTION, COLL_COMMA), {NULL, NULL, NULL} /* this array must be NULL terminated */
+ COLL_GATHERS(COLL_DESCRIPTION, COLL_COMMA), {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
"allgather default collective",
reinterpret_cast<void*>(&smpi_mpi_allgather)},
COLL_ALLGATHERS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_allgatherv_description[] = {
"allgatherv default collective",
reinterpret_cast<void*>(&smpi_mpi_allgatherv)},
COLL_ALLGATHERVS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_allreduce_description[] = {
"allreduce default collective",
reinterpret_cast<void*>(&smpi_mpi_allreduce)},
COLL_ALLREDUCES(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_reduce_scatter_description[] = {
"reduce_scatter default collective",
reinterpret_cast<void*>(&smpi_mpi_reduce_scatter)},
COLL_REDUCE_SCATTERS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_scatter_description[] = {
"scatter default collective",
reinterpret_cast<void*>(&smpi_mpi_scatter)},
COLL_SCATTERS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_barrier_description[] = {
"barrier default collective",
reinterpret_cast<void*>(&smpi_mpi_barrier)},
COLL_BARRIERS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_alltoall_description[] = {
{"default",
{"basic_linear",
"Alltoall basic linear (SG) collective",
reinterpret_cast<void*>(&smpi_coll_tuned_alltoall_basic_linear)},
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_alltoallv_description[] = {
"Ompi alltoallv default collective",
reinterpret_cast<void*>(&smpi_coll_basic_alltoallv)},
COLL_ALLTOALLVS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_bcast_description[] = {
"bcast default collective ",
reinterpret_cast<void*>(&smpi_mpi_bcast)},
COLL_BCASTS(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
s_mpi_coll_description_t mpi_coll_reduce_description[] = {
"reduce default collective",
reinterpret_cast<void*>(&smpi_mpi_reduce)},
COLL_REDUCES(COLL_DESCRIPTION, COLL_COMMA),
- {NULL, NULL, NULL} /* this array must be NULL terminated */
+ {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */
};
int find_coll_description(s_mpi_coll_description_t * table,
char *name, const char *desc)
{
- char *name_list = NULL;
+ char *name_list = nullptr;
int selector_on=0;
- if (name==NULL || name[0] == '\0') {
+ if (name==nullptr || name[0] == '\0') {
//no argument provided, use active selector's algorithm
name=static_cast<char*>(xbt_cfg_get_string("smpi/coll-selector"));
selector_on=1;
int (*mpi_coll_reduce_scatter_fun)(void *sbuf, void *rbuf, int *rcounts,MPI_Datatype dtype,MPI_Op op,MPI_Comm comm);
int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,int root, MPI_Comm comm);
int (*mpi_coll_barrier_fun)(MPI_Comm comm);
-void (*smpi_coll_cleanup_callback)(void);
+void (*smpi_coll_cleanup_callback)();
-int smpi_coll_tuned_alltoall_ompi2(void *sendbuf, int sendcount,
- MPI_Datatype sendtype, void *recvbuf,
+int smpi_coll_tuned_alltoall_ompi2(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf,
int recvcount, MPI_Datatype recvtype,
MPI_Comm comm)
{
sendsize = smpi_datatype_size(sendtype) * sendcount;
if (sendsize < 200 && size > 12) {
return
- smpi_coll_tuned_alltoall_bruck(sendbuf, sendcount, sendtype,
- recvbuf, recvcount, recvtype,
- comm);
+ smpi_coll_tuned_alltoall_bruck(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
} else if (sendsize < 3000) {
return
- smpi_coll_tuned_alltoall_basic_linear(sendbuf, sendcount,
- sendtype, recvbuf,
- recvcount, recvtype, comm);
+ smpi_coll_tuned_alltoall_basic_linear(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
} else {
return
- smpi_coll_tuned_alltoall_ring(sendbuf, sendcount, sendtype,
- recvbuf, recvcount, recvtype,
- comm);
+ smpi_coll_tuned_alltoall_ring(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
}
}
smpi_datatype_extent(recvtype, &lb, &recvext);
/* Local copy from self */
err =
- smpi_datatype_copy(static_cast<char *>(sendbuf) + senddisps[rank] * sendext,
- sendcounts[rank], sendtype,
- static_cast<char *>(recvbuf) + recvdisps[rank] * recvext,
- recvcounts[rank], recvtype);
+ smpi_datatype_copy(static_cast<char *>(sendbuf) + senddisps[rank] * sendext, sendcounts[rank], sendtype,
+ static_cast<char *>(recvbuf) + recvdisps[rank] * recvext, recvcounts[rank], recvtype);
if (err == MPI_SUCCESS && size > 1) {
/* Initiate all send/recv to/from others. */
requests = xbt_new(MPI_Request, 2 * (size - 1));
recvcounts[i], recvtype, i, system_tag, comm);
count++;
}else{
- XBT_DEBUG
- ("<%d> skip request creation [src = %d, recvcounts[src] = %d]",
- rank, i, recvcounts[i]);
+ XBT_DEBUG("<%d> skip request creation [src = %d, recvcounts[src] = %d]", rank, i, recvcounts[i]);
}
}
/* Now create all sends */
sendcounts[i], sendtype, i, system_tag, comm);
count++;
}else{
- XBT_DEBUG
- ("<%d> skip request creation [dst = %d, sendcounts[dst] = %d]",
- rank, i, sendcounts[i]);
+ XBT_DEBUG("<%d> skip request creation [dst = %d, sendcounts[dst] = %d]", rank, i, sendcounts[i]);
}
}
/* Wait for them all. */