return MPI_ERR_TYPE;
} else {
simgrid::smpi::Datatype::unref(*datatype);
+ *datatype=MPI_DATATYPE_NULL;
return MPI_SUCCESS;
}
}
{
CHECK_COUNT(1, count)
CHECK_MPI_NULL(4, MPI_DATATYPE_NULL, MPI_ERR_TYPE, old_type)
- int* blocklens=static_cast<int*>(xbt_malloc(blocklength*count*sizeof(int)));
+ auto* blocklens = static_cast<int*>(xbt_malloc(blocklength * count * sizeof(int)));
for (int i = 0; i < count; i++)
blocklens[i]=blocklength;
int retval = simgrid::smpi::Datatype::create_indexed(count, blocklens, indices, old_type, new_type);
MPI_Datatype* new_type) {
CHECK_COUNT(1, count)
CHECK_MPI_NULL(4, MPI_DATATYPE_NULL, MPI_ERR_TYPE, old_type)
- int* blocklens=(int*)xbt_malloc(blocklength*count*sizeof(int));
+ auto* blocklens = static_cast<int*>(xbt_malloc(blocklength * count * sizeof(int)));
for (int i = 0; i < count; i++)
blocklens[i] = blocklength;
int retval = simgrid::smpi::Datatype::create_hindexed(count, blocklens, indices, old_type, new_type);