Skip to content

Commit b23be50

Browse files
committed
complete task1 project3
1 parent f890fd2 commit b23be50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

miniproject_3/src/main/java/edu/coursera/parallel/MatrixMultiply.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package edu.coursera.parallel;
22

3-
import static edu.rice.pcdp.PCDP.forseq2d;
3+
import static edu.rice.pcdp.PCDP.*;
44

55
/**
66
* Wrapper class for implementing matrix multiply efficiently in parallel.
@@ -44,7 +44,7 @@ public static void parMatrixMultiply(final double[][] A, final double[][] B,
4444
* TODO Parallelize this outermost two-dimension sequential loop to
4545
* achieve performance improvement.
4646
*/
47-
forseq2d(0, N - 1, 0, N - 1, (i, j) -> {
47+
forall2dChunked(0, N - 1, 0, N - 1, (i, j) -> {
4848
C[i][j] = 0.0;
4949
for (int k = 0; k < N; k++) {
5050
C[i][j] += A[i][k] * B[k][j];

0 commit comments

Comments
 (0)