From c6ec75e044a9293ce7b0b78bbc1db5390a2d07a4 Mon Sep 17 00:00:00 2001 From: Raphael Boucherie <rboucher@zimbra.inria.fr> Date: Thu, 30 Mar 2017 11:48:03 +0200 Subject: [PATCH] fixed init values --- src/treewalk.c | 2 -- testings/testing_treewalk.c | 40 ++++++++++++++++++++----------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/treewalk.c b/src/treewalk.c index 223d176..4fd9b13 100644 --- a/src/treewalk.c +++ b/src/treewalk.c @@ -173,6 +173,4 @@ void libhqr_treewalk(libhqr_tree_t *qrtree,int k){ libhqr_queue_tile_last(&tt); p = tt->numero; } - libhqr_queue_tile_delete(&tt); - libhqr_queue_tile_delete(&ts); } diff --git a/testings/testing_treewalk.c b/testings/testing_treewalk.c index 15314a6..d872a31 100644 --- a/testings/testing_treewalk.c +++ b/testings/testing_treewalk.c @@ -1,18 +1,18 @@ /** - * - * @file testing_treewalk.c - * - * PaStiX symbol structure routines - * - * @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, - * Univ. Bordeaux. All rights reserved. - * - * @version 1.0.0 - * @author Raphael Boucherie - * @author Matthieu Faverge - * @date 2017-03-21 - * - **/ + * + * @file testing_treewalk.c + * + * PaStiX symbol structure routines + * + * @copyright 2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * Univ. Bordeaux. All rights reserved. + * + * @version 1.0.0 + * @author Raphael Boucherie + * @author Matthieu Faverge + * @date 2017-03-21 + * + **/ #include "libhqr.h" @@ -28,6 +28,7 @@ int main(int argc, char ** argv) { libhqr_tree_t qrtree; libhqr_tiledesc_t matrix; + int minMN, k; /* * * Tests for HQR code @@ -35,10 +36,13 @@ int main(int argc, char ** argv) */ matrix.nodes = 1; matrix.p = 1; - matrix.mt = 10; + matrix.mt = 4; matrix.nt = 13; - libhqr_hqr_init( &qrtree, LIBHQR_QR, &matrix, 0, 0, 1, -1, 0, 0); - libhqr_treewalk( &qrtree, 0); + libhqr_hqr_init( &qrtree, LIBHQR_QR, &matrix, 3 , 0, 2 , -1, 0, 1); + minMN = libhqr_imin(matrix.mt, matrix.nt ); + for (k=0; k<minMN; k++) { + + libhqr_treewalk( &qrtree, k); + } libhqr_hqr_finalize( &qrtree ); - return 1; } -- GitLab