- smpi_datatype_create(new_type, count *
- smpi_datatype_size(old_type),count *
- smpi_datatype_size(old_type),0,NULL, DT_FLAG_CONTIGUOUS);
+ if(old_type->has_subtype){
+ //handle this case as a hvector with stride equals to the extent of the datatype
+ return smpi_datatype_hvector(count, 1, smpi_datatype_get_extent(old_type), old_type, new_type);
+ }
+ smpi_datatype_create(new_type,
+ count * smpi_datatype_size(old_type),
+ 0,count * smpi_datatype_size(old_type),
+ 0,NULL, DT_FLAG_CONTIGUOUS);