-Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
+Coll_allreduce_ompi_ring_segmented::allreduce(const void *sbuf, void *rbuf, int count,
ptrdiff_t true_extent, extent;
ptrdiff_t block_offset, max_real_segsize;
MPI_Request reqs[2] = {NULL, NULL};
ptrdiff_t true_extent, extent;
ptrdiff_t block_offset, max_real_segsize;
MPI_Request reqs[2] = {NULL, NULL};
max_real_segsize = true_extent + (max_segcount - 1) * extent;
/* Allocate and initialize temporary buffers */
max_real_segsize = true_extent + (max_segcount - 1) * extent;
/* Allocate and initialize temporary buffers */
- inbuf[1] = (char*)smpi_get_tmp_recvbuffer(max_real_segsize);
- if (NULL == inbuf[1]) { ret = -1; line = __LINE__; goto error_hndl; }
+ inbuf[1] = smpi_get_tmp_recvbuffer(max_real_segsize);
+ if (nullptr == inbuf[1]) {
+ ret = -1;
+ line = __LINE__;
+ goto error_hndl;
+ }
for send operations and computation we must compute the exact block size.
*/
send_to = (rank + 1) % size;
for send operations and computation we must compute the exact block size.
*/
send_to = (rank + 1) % size;
return MPI_SUCCESS;
error_hndl:
XBT_DEBUG("%s:%4d\tRank %d Error occurred %d\n",
__FILE__, line, rank, ret);
return MPI_SUCCESS;
error_hndl:
XBT_DEBUG("%s:%4d\tRank %d Error occurred %d\n",
__FILE__, line, rank, ret);