minor update
This commit is contained in:
@@ -220,7 +220,8 @@ int main (int argc, char **argv) {
|
|||||||
matmul(h_ref, h_a, h_b, size, size, size);
|
matmul(h_ref, h_a, h_b, size, size, size);
|
||||||
for (int i = 0; i < (size * size); i++) {
|
for (int i = 0; i < (size * size); i++) {
|
||||||
if (!almost_equal(h_c[i], h_ref[i])) {
|
if (!almost_equal(h_c[i], h_ref[i])) {
|
||||||
printf("*** error: [%d] expected=%f, actual=%f\n", i, h_ref[i], h_c[i]);
|
if (errors < 100)
|
||||||
|
printf("*** error: [%d] expected=%f, actual=%f\n", i, h_ref[i], h_c[i]);
|
||||||
++errors;
|
++errors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,8 @@ int main (int argc, char **argv) {
|
|||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
float ref = h_a[i] + h_b[i];
|
float ref = h_a[i] + h_b[i];
|
||||||
if (!almost_equal(h_c[i], ref)) {
|
if (!almost_equal(h_c[i], ref)) {
|
||||||
printf("*** error: [%d] expected=%f, actual=%f, a=%f, b=%f\n", i, ref, h_c[i], h_a[i], h_b[i]);
|
if (errors < 100)
|
||||||
|
printf("*** error: [%d] expected=%f, actual=%f, a=%f, b=%f\n", i, ref, h_c[i], h_a[i], h_b[i]);
|
||||||
++errors;
|
++errors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user