From 221f3b9d073590016f88d30ad04f2de236dc82bd Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Sat, 16 Nov 2019 17:33:44 +0100 Subject: [PATCH] Always print the dart measurement in testmode --- testings/draw_tphqr.c | 14 +++++++++++--- testings/testing_hqr.c | 19 +++++++++---------- testings/testing_svd.c | 18 ++++++++---------- testings/testing_systolic.c | 18 ++++++++---------- testings/testing_tphqr.c | 19 +++++++++---------- 5 files changed, 45 insertions(+), 43 deletions(-) diff --git a/testings/draw_tphqr.c b/testings/draw_tphqr.c index 8ae6448..e865be5 100644 --- a/testings/draw_tphqr.c +++ b/testings/draw_tphqr.c @@ -35,19 +35,27 @@ main(int argc, char ** argv) matrix.mt = MT; matrix.nt = NT; - rc = libhqr_init_tphqr( &qrtree, LIBHQR_TSQR, NT, 0, &matrix, LIBHQR_FLAT_TREE, qr_a, qr_p ); + rc = libhqr_init_tphqr( &qrtree, LIBHQR_TSQR, NT, NT-1, &matrix, LIBHQR_FLAT_TREE, qr_a, qr_p ); if ( rc != 0 ) { return EXIT_FAILURE; } libhqr_print_svg( &qrtree, "tphqr.svg" ); libhqr_finalize( &qrtree ); - rc = libhqr_init_tshqr( &qrtree, 0, LIBHQR_TSQR, NT, 0, &matrix ); + rc = libhqr_init_tshqr( &qrtree, 0, LIBHQR_TSQR, NT, NT-1, &matrix ); if ( rc != 0 ) { return EXIT_FAILURE; } - libhqr_print_svg( &qrtree, "tshqr.svg" ); + qrtree.facto = LIBHQR_QR; + libhqr_print_svg( &qrtree, "tshqr_flat.svg" ); libhqr_finalize( &qrtree ); + rc = libhqr_init_tshqr( &qrtree, 1, LIBHQR_TSQR, NT, NT-1, &matrix ); + if ( rc != 0 ) { + return EXIT_FAILURE; + } + qrtree.facto = LIBHQR_QR; + libhqr_print_svg( &qrtree, "tshqr_rr.svg" ); + libhqr_finalize( &qrtree ); return EXIT_SUCCESS; } diff --git a/testings/testing_hqr.c b/testings/testing_hqr.c index d704b0e..af9bec9 100644 --- a/testings/testing_hqr.c +++ b/testings/testing_hqr.c @@ -215,20 +215,19 @@ main(int argc, char ** argv) } } + if ( check > 1 ) { + printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" + " encoding=\"none\" compression=\"none\">\n" + "%d\n" + "</DartMeasurement>\n", + ret ); + } + if ( ret == 0 ) { return EXIT_SUCCESS; } else { - if ( check > 1 ) { - printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" - " encoding=\"none\" compression=\"none\">\n" - "%d\n" - "</DartMeasurement>\n", - ret ); - } - else { - printf( "%d tests failed !!!\n", ret ); - } + printf( "%d tests failed !!!\n", ret ); return EXIT_FAILURE; } } diff --git a/testings/testing_svd.c b/testings/testing_svd.c index 9dccdb8..c24b521 100644 --- a/testings/testing_svd.c +++ b/testings/testing_svd.c @@ -150,20 +150,18 @@ main(int argc, char ** argv) } } + if ( check > 1 ) { + printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" + " encoding=\"none\" compression=\"none\">\n" + "%d\n" + "</DartMeasurement>\n", + ret ); + } if ( ret == 0 ) { return EXIT_SUCCESS; } else { - if ( check > 1 ) { - printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" - " encoding=\"none\" compression=\"none\">\n" - "%d\n" - "</DartMeasurement>\n", - ret ); - } - else { - printf( "%d tests failed !!!\n", ret ); - } + printf( "%d tests failed !!!\n", ret ); return EXIT_FAILURE; } } diff --git a/testings/testing_systolic.c b/testings/testing_systolic.c index c03bad6..1c9eded 100644 --- a/testings/testing_systolic.c +++ b/testings/testing_systolic.c @@ -121,20 +121,18 @@ main(int argc, char ** argv) } } + if ( check > 1 ) { + printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" + " encoding=\"none\" compression=\"none\">\n" + "%d\n" + "</DartMeasurement>\n", + ret ); + } if ( ret == 0 ) { return EXIT_SUCCESS; } else { - if ( check > 1 ) { - printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" - " encoding=\"none\" compression=\"none\">\n" - "%d\n" - "</DartMeasurement>\n", - ret ); - } - else { - printf( "%d tests failed !!!\n", ret ); - } + printf( "%d tests failed !!!\n", ret ); return EXIT_FAILURE; } } diff --git a/testings/testing_tphqr.c b/testings/testing_tphqr.c index 5ca9399..e6a7385 100644 --- a/testings/testing_tphqr.c +++ b/testings/testing_tphqr.c @@ -147,20 +147,19 @@ main(int argc, char ** argv) } } + if ( check > 1 ) { + printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" + " encoding=\"none\" compression=\"none\">\n" + "%d\n" + "</DartMeasurement>\n", + ret ); + } + if ( ret == 0 ) { return EXIT_SUCCESS; } else { - if ( check > 1 ) { - printf( "<DartMeasurement name=\"failures\" type=\"numeric/integer\"\n" - " encoding=\"none\" compression=\"none\">\n" - "%d\n" - "</DartMeasurement>\n", - ret ); - } - else { - printf( "%d tests failed !!!\n", ret ); - } + printf( "%d tests failed !!!\n", ret ); return EXIT_FAILURE; } } -- GitLab