From 7ae3d4e6a6601c87f7e9b056de397428a41d3811 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 7 Jan 2012 17:39:49 +0100 Subject: [PATCH] spatial_dict_load(): Print dictionary stats after loading --- patternsp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/patternsp.c b/patternsp.c index 30324e1..8bd2293 100644 --- a/patternsp.c +++ b/patternsp.c @@ -310,6 +310,10 @@ spatial_dict_load(struct spatial_dict *dict, FILE *f) if (buf[0] == '#') continue; spatial_dict_read(dict, buf); } + if (DEBUGL(1)) + fprintf(stderr, "Loaded spatial dictionary of %d patterns (hash: %d coll., %d effective, %.2f%% fill rate).\n", + dict->nspatials, dict->collisions, dict->collisions / PTH__ROTATIONS, + (double) dict->nspatials * 100 / (sizeof(dict->hash) / sizeof(dict->hash[0]))); } void -- 2.11.4.GIT