From c1d1d6c8cad3ebe08e2d590f3360a16de117dd3e Mon Sep 17 00:00:00 2001 From: "Emden R. Gansner" Date: Tue, 18 Mar 2014 18:08:36 -0400 Subject: [PATCH] Wrap timing output in with if (Verbose) --- cmd/gvmap/country_graph_coloring.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/gvmap/country_graph_coloring.c b/cmd/gvmap/country_graph_coloring.c index 8b8aa05b9..77d334d4f 100644 --- a/cmd/gvmap/country_graph_coloring.c +++ b/cmd/gvmap/country_graph_coloring.c @@ -314,7 +314,8 @@ void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *no } vector_ordering(n, v, p, TRUE); - fprintf(stderr, "cpu time for spectral ordering (before greedy) = %f\n", (real) (clock() - start)/(CLOCKS_PER_SEC)); + if (Verbose) + fprintf(stderr, "cpu time for spectral ordering (before greedy) = %f\n", (real) (clock() - start)/(CLOCKS_PER_SEC)); start2 = clock(); /* swapping */ @@ -327,10 +328,12 @@ void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *no assert(0); } } - fprintf(stderr, "cpu time for greedy refinement = %f\n", (real) (clock() - start2)/(CLOCKS_PER_SEC)); + if (Verbose) { + fprintf(stderr, "cpu time for greedy refinement = %f\n", (real) (clock() - start2)/(CLOCKS_PER_SEC)); - fprintf(stderr, "cpu time for spectral + greedy = %f\n", (real) (clock() - start)/(CLOCKS_PER_SEC)); + fprintf(stderr, "cpu time for spectral + greedy = %f\n", (real) (clock() - start)/(CLOCKS_PER_SEC)); + } get_12_norm(n, ia, ja, *p, norm1); *norm_1 = norm1[0]; -- 2.40.0