Skip to content
Snippets Groups Projects
Commit dd379598 authored by Denis Davydov's avatar Denis Davydov
Browse files

output with new lines

parent 42be50d1
No related branches found
No related tags found
No related merge requests found
......@@ -97,14 +97,21 @@ def check_install(self, spec):
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
for (i = 0; i < 8; i++)
printf("%lf ", C[i]);
printf("%lf", C[8]);
for (i = 0; i < 9; i++)
printf("%f\n", C[i]);
return 0;
}
"""
expected = """\
11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000\
11.000000
-9.000000
5.000000
-9.000000
21.000000
-1.000000
5.000000
-1.000000
3.000000
"""
with open("check.c", 'w') as f:
f.write(source)
......
......@@ -7,8 +7,7 @@ double B[6] = {1.0, 2.0, 1.0, -3.0, 4.0, -1.0};
double C[9] = {.5, .5, .5, .5, .5, .5, .5, .5, .5};
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans,
3, 3, 2, 1, A, 3, B, 3, 2, C, 3);
for (i = 0; i < 8; i++)
printf("%lf ", C[i]);
printf("%lf", C[8]);
for (i = 0; i < 9; i++)
printf("%f\n", C[i]);
return 0;
}
11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000
\ No newline at end of file
11.000000
-9.000000
5.000000
-9.000000
21.000000
-1.000000
5.000000
-1.000000
3.000000
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment