| 28 | } |
| 29 | } |
| 30 | void Mul_Matrix(float *A,float *B,float *C,int m1,int n1,int n2){ |
| 31 | int i,j,k,temp; |
| 32 | for (i = 0; i < m1; i++){ |
| 33 | for (j = 0; j < n2; j++){ |
| 34 | temp =0; |
| 35 | for (k = 0; k < n1; k++){ |
| 36 | temp += A[i * n1 + k] * B[k * n2 + j]; |
| 37 | } |
| 38 | C[i * n2 + j]+= temp; |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | void Matrix_cannon_scatter(int N,int id,int num,int part,float *source_matrix,float *target_matrix,MPI_Comm MPI_COMM_CART){ |
| 44 | float *matrixpool;//用于分发矩阵的一维向量 |
no outgoing calls
no test coverage detected