#include "colls_private.h"
#include "coll_tuned_topo.h"
-#include "xbt/replay.h"
/*
* Recursive-halving function is (*mostly*) copied from the BASIC coll module.
}
/* get datatype information */
- smpi_datatype_extent(dtype, &lb, &extent);
- smpi_datatype_extent(dtype, &true_lb, &true_extent);
+ dtype->extent(&lb, &extent);
+ dtype->extent(&true_lb, &true_extent);
buf_size = true_extent + (ptrdiff_t)(count - 1) * extent;
/* Handle MPI_IN_PLACE */
result_buf = result_buf_free - lb;
/* copy local buffer into the temporary results */
- err =smpi_datatype_copy(sbuf, count, dtype, result_buf, count, dtype);
+ err =Datatype::copy(sbuf, count, dtype, result_buf, count, dtype);
if (MPI_SUCCESS != err) goto cleanup;
/* figure out power of two mapping: grow until larger than
/* copy local results from results buffer into real receive buffer */
if (0 != rcounts[rank]) {
- err = smpi_datatype_copy(result_buf + disps[rank] * extent,
+ err = Datatype::copy(result_buf + disps[rank] * extent,
rcounts[rank], dtype,
rbuf, rcounts[rank], dtype);
if (MPI_SUCCESS != err) {
/* Special case for size == 1 */
if (1 == size) {
if (MPI_IN_PLACE != sbuf) {
- ret = smpi_datatype_copy((char*)sbuf, total_count, dtype, (char*)rbuf, total_count, dtype);
+ ret = Datatype::copy((char*)sbuf, total_count, dtype, (char*)rbuf, total_count, dtype);
if (ret < 0) { line = __LINE__; goto error_hndl; }
}
xbt_free(displs);
rbuf can be of rcounts[rank] size.
- up to two temporary buffers used for communication/computation overlap.
*/
- smpi_datatype_extent(dtype, &lb, &extent);
- smpi_datatype_extent(dtype, &true_lb, &true_extent);
+ dtype->extent(&lb, &extent);
+ dtype->extent(&true_lb, &true_extent);
max_real_segsize = true_extent + (ptrdiff_t)(max_block_count - 1) * extent;
sbuf = rbuf;
}
- ret = smpi_datatype_copy((char*)sbuf, total_count, dtype, accumbuf, total_count, dtype);
+ ret = Datatype::copy((char*)sbuf, total_count, dtype, accumbuf, total_count, dtype);
if (ret < 0) { line = __LINE__; goto error_hndl; }
/* Computation loop */
if(op!=MPI_OP_NULL) op->apply( inbuf[inbi], tmprecv, &(rcounts[rank]), dtype);
/* Copy result from tmprecv to rbuf */
- ret = smpi_datatype_copy(tmprecv, rcounts[rank], dtype, (char*)rbuf, rcounts[rank], dtype);
+ ret = Datatype::copy(tmprecv, rcounts[rank], dtype, (char*)rbuf, rcounts[rank], dtype);
if (ret < 0) { line = __LINE__; goto error_hndl; }
if (NULL != displs) xbt_free(displs);