MPI_Allgather和动态结构

时间:2012-03-26 03:00:25

标签: c arrays dynamic struct mpi

我想发送一个带MPI_Allgather()的结构数组,但我的结构有一个动态数组:

typedef struct {
    float a;
    int* b;
} structure_t;

我的结构通过以下方式初始化:

 structure_t *resultat = (structure_t*) malloc( sizeof( structure_t ) + n * sizeof( int ) );

但是如何使用MPI_Allgather发送我的结构? 如何创建两个(发送和接收)数组?

0 个答案:

没有答案
相关问题