E******T 发帖数: 59 | 1 Here is part of MPI code, a is a matrix with column NCA, offset is the start
point of row number of matrix a. The confusing part is ((double (*)[NCA])a)
, does it denote NCA number of pointer in matrix a?
any comments? Thanks
MPI_Send(&((double (*)[NCA])a)[offset][0], rows*NCA, MPI_DOUBLE, dest
, mtype,
MPI_COMM_WORLD); | h**i 发帖数: 712 | 2 a is a pointer point to an array with NCA elements which are double type.
start
a)
dest
【在 E******T 的大作中提到】 : Here is part of MPI code, a is a matrix with column NCA, offset is the start : point of row number of matrix a. The confusing part is ((double (*)[NCA])a) : , does it denote NCA number of pointer in matrix a? : any comments? Thanks : MPI_Send(&((double (*)[NCA])a)[offset][0], rows*NCA, MPI_DOUBLE, dest : , mtype, : MPI_COMM_WORLD);
| E******T 发帖数: 59 | 3
type.
((double (*)[NCA])a)
you are right and a is a pointer, such as definition: double *a;
the confusing part is how we define the array with NCA elements which a
pointer points to.
is this right like ([NCA])a
Thanks
【在 h**i 的大作中提到】 : a is a pointer point to an array with NCA elements which are double type. : : start : a) : dest
| P********e 发帖数: 2610 | 4 that is wrong.
a is a two dimentional array pointer, point to NCA elements of pointer to
double type.
double* a[NCA];
【在 E******T 的大作中提到】 : : type. : ((double (*)[NCA])a) : you are right and a is a pointer, such as definition: double *a; : the confusing part is how we define the array with NCA elements which a : pointer points to. : is this right like ([NCA])a : Thanks
|
|