39 |
|
} |
40 |
|
|
41 |
|
int granularity = n * n / nprocs; |
42 |
< |
dimGran = (int)(Math.sqrt(granularity)); |
42 |
> |
dimGran = (int) Math.sqrt(granularity); |
43 |
|
|
44 |
|
// allocate enough space for edges |
45 |
|
int dim = n+2; |
67 |
|
driver.compute(); |
68 |
|
|
69 |
|
long time = System.currentTimeMillis() - startTime; |
70 |
< |
double secs = ((double)time) / 1000.0; |
70 |
> |
double secs = (double) time / 1000.0; |
71 |
|
|
72 |
|
System.out.println("Compute Time: " + secs); |
73 |
|
} |
163 |
|
|
164 |
|
int rows = hiRow - loRow + 1; |
165 |
|
int cols = hiCol - loCol + 1; |
166 |
< |
int rblocks = Math.round((float)rows / dimGran); |
167 |
< |
int cblocks = Math.round((float)cols / dimGran); |
166 |
> |
int rblocks = Math.round((float) rows / dimGran); |
167 |
> |
int cblocks = Math.round((float) cols / dimGran); |
168 |
|
|
169 |
|
int n = rblocks * cblocks; |
170 |
|
|