From b4260125426b6f02d3bc0aa310158d27fe73bd81 Mon Sep 17 00:00:00 2001 From: Paul Irofti Date: Sat, 29 Mar 2025 15:27:11 +0200 Subject: [PATCH] less verbose logs --- src/CCubes.c | 63 +++++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/src/CCubes.c b/src/CCubes.c index 21b15c6..75da440 100755 --- a/src/CCubes.c +++ b/src/CCubes.c @@ -220,6 +220,7 @@ SEXP CCubes(SEXP tt) { if (PRINT_INFO) { Rprintf("---k: %d\n", k); } + log_debug("ccubes", "---k: %d\n", k); int n_tasks = nchoosek(ninputs, k); if (n_tasks == 0) { @@ -270,37 +271,39 @@ SEXP CCubes(SEXP tt) { for (int current_task = 0; current_task < current_batch; current_task++) { log_debug("ccubes", "Task %d", current_task); - log_debug_raw("ccubes", "redundant[%d]: %d\n", current_task, ctx->h_redundant[current_task]); - - log_debug_raw("ccubes", "coverage[%d]:", current_task); - for (int j = 0; j < posrows; j++) { - log_debug_raw("ccubes", " %d", - ctx->h_coverage[current_task * posrows + j]); - } - log_debug_raw("ccubes", "\n"); - - log_debug_raw("ccubes", "fixed_bits[%d]:", current_task); - for (int j = 0; j < implicant_words; j++) { - log_debug_raw("ccubes", " %d", - ctx->h_fixed_bits[current_task * implicant_words + j]); - } - log_debug_raw("ccubes", "\n"); - - log_debug_raw("ccubes", "value_bits[%d]:", current_task); - for (int j = 0; j < implicant_words; j++) { - log_debug_raw("ccubes", " %d", - ctx->h_value_bits[current_task * implicant_words + j]); - } - log_debug_raw("ccubes", "\n"); - - log_debug_raw("ccubes", "pichart_values[%d]:", current_task); - for (int j = 0; j < pichart_words; j++) { - log_debug_raw("ccubes", " %d", - ctx->h_pichart_values[current_task * pichart_words + j]); - } - log_debug_raw("ccubes", "\n"); - if (!ctx->h_redundant[current_task]) { + /* LOG TASK */ + log_debug_raw("ccubes", "redundant[%d]: %d\n", current_task, ctx->h_redundant[current_task]); + + log_debug_raw("ccubes", "coverage[%d]:", current_task); + for (int j = 0; j < posrows; j++) { + log_debug_raw("ccubes", " %d", + ctx->h_coverage[current_task * posrows + j]); + } + log_debug_raw("ccubes", "\n"); + + log_debug_raw("ccubes", "fixed_bits[%d]:", current_task); + for (int j = 0; j < implicant_words; j++) { + log_debug_raw("ccubes", " %d", + ctx->h_fixed_bits[current_task * implicant_words + j]); + } + log_debug_raw("ccubes", "\n"); + + log_debug_raw("ccubes", "value_bits[%d]:", current_task); + for (int j = 0; j < implicant_words; j++) { + log_debug_raw("ccubes", " %d", + ctx->h_value_bits[current_task * implicant_words + j]); + } + log_debug_raw("ccubes", "\n"); + + log_debug_raw("ccubes", "pichart_values[%d]:", current_task); + for (int j = 0; j < pichart_words; j++) { + log_debug_raw("ccubes", " %d", + ctx->h_pichart_values[current_task * pichart_words + j]); + } + log_debug_raw("ccubes", "\n"); + + int covsum = 0; for (int i = 0; i < posrows; i++) { covsum += ctx->h_coverage[current_task * posrows + i];