*new_t= xbt_new(s_smpi_mpi_datatype_t,1);
memcpy(*new_t, datatype, sizeof(s_smpi_mpi_datatype_t));
(*new_t)->in_use=1;
+ (*new_t)->flags &= ~DT_FLAG_PREDEFINED;
if (datatype->sizeof_substruct){
(*new_t)->substruct=xbt_malloc(datatype->sizeof_substruct);
memcpy((*new_t)->substruct, datatype->substruct, datatype->sizeof_substruct);
}
void free_contiguous(MPI_Datatype* d){
- smpi_datatype_unuse(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+ smpi_datatype_unuse(((s_smpi_mpi_contiguous_t *)(*d)->substruct)->old_type);
}
void use_contiguous(MPI_Datatype* d){
- smpi_datatype_use(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+ smpi_datatype_use(((s_smpi_mpi_contiguous_t *)(*d)->substruct)->old_type);
}
/* Create a Sub type contiguous to be able to serialize and unserialize it the structure s_smpi_mpi_contiguous_t is
//do nothing for vector types
void free_hvector(MPI_Datatype* d){
- smpi_datatype_unuse(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+ smpi_datatype_unuse(((s_smpi_mpi_hvector_t *)(*d)->substruct)->old_type);
}
void use_hvector(MPI_Datatype* d){
- smpi_datatype_use(((s_smpi_mpi_indexed_t *)(*d)->substruct)->old_type);
+ smpi_datatype_use(((s_smpi_mpi_hvector_t *)(*d)->substruct)->old_type);
}
int smpi_datatype_hvector(int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* new_type)
}
void use_hindexed(MPI_Datatype* type){
- smpi_datatype_use(((s_smpi_mpi_indexed_t *)(*type)->substruct)->old_type);
+ smpi_datatype_use(((s_smpi_mpi_hindexed_t *)(*type)->substruct)->old_type);
}
/* Create a Sub type hindexed to be able to serialize and unserialize it the structure s_smpi_mpi_hindexed_t is derived