Misc
This commit is contained in:
parent
14541623a4
commit
c38550c8aa
|
@ -159,7 +159,7 @@ double *compute_jacobi(int n, double init_value, double threshold, borders b, in
|
||||||
|
|
||||||
if (rank == 0) {
|
if (rank == 0) {
|
||||||
complete_x = create_sa_matrix(n + 2, n + 2);
|
complete_x = create_sa_matrix(n + 2, n + 2);
|
||||||
memcpy(complete_x, x, (rows + 1) * (n + 2) * sizeof(double)); /* rows + 2 if rank == numprocs - 1 */
|
memcpy(complete_x, x, (rows + ((rank == numprocs - 1) ? 2 : 1)) * (n + 2) * sizeof(double));
|
||||||
rows_to_transmit = n / numprocs;
|
rows_to_transmit = n / numprocs;
|
||||||
receive_pos = rows + 1;
|
receive_pos = rows + 1;
|
||||||
for (i = 1; i < numprocs; i++) {
|
for (i = 1; i < numprocs; i++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user