Changes to userland progress to tweak progress output for test161. We needed

more periodic progress in some cases due to the large slow down that happens
when swapping is implemented (ASST3.3).
This commit is contained in:
Scott Haseley committed 2016-04-27 18:46:44 -04:00
1 parent 4e93e0b105
commit 153c0267b6
6 files changed
+114 -35

No files matched your search

+7 -7
View File
@@ -61,7 +61,7 @@ main(void)
for (i = 0; i < Dim; i++) { /* first initialize the matrices */
for (j = 0; j < Dim; j++) {
TEST161_TPROGRESS_N(i*Dim + j, 1000);
TEST161_LPROGRESS_N(i*Dim + j, 1000);
A[i][j] = i;
B[i][j] = j;
C[i][j] = 0;
@@ -72,7 +72,7 @@ main(void)
for (i = 0; i < Dim; i++) { /* then multiply them together */
for (j = 0; j < Dim; j++) {
for (k = 0; k < Dim; k++) {
TEST161_TPROGRESS_N(i*j*Dim*Dim + k, 50000);
TEST161_LPROGRESS_N(i*j*Dim*Dim + k, 50000);
T[i][j][k] = A[i][k] * B[k][j];
}
}
@@ -82,7 +82,7 @@ main(void)
for (i = 0; i < Dim; i++) {
for (j = 0; j < Dim; j++) {
for (k = 0; k < Dim; k++) {
TEST161_TPROGRESS_N(i*j*Dim*Dim + k, 50000);
TEST161_LPROGRESS_N(i*j*Dim*Dim + k, 50000);
C[i][j] += T[i][j][k];
}
}
@@ -93,15 +93,15 @@ main(void)
for (i = 0; i < Dim; i++)
r += C[i][i];
tprintf("matmult finished.\n");
tprintf("answer is: %d (should be %d)\n", r, RIGHT);
nprintf("matmult finished.\n");
nprintf("answer is: %d (should be %d)\n", r, RIGHT);
if (r != RIGHT) {
tprintf("FAILED\n");
nprintf("FAILED\n");
success(TEST161_FAIL, SECRET, "/testbin/matmult");
return 1;
}
tprintf("Passed.\n");
nprintf("Passed.\n");
success(TEST161_SUCCESS, SECRET, "/testbin/matmult");
return 0;
}