Changeset: 9d8a4ddd3ed4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9d8a4ddd3ed4
Modified Files:
        monetdb5/modules/atoms/str.c
Branch: strimps_v3
Log Message:

Fix TRC_DEBUG format and algo cost calculation


diffs (21 lines):

diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c
--- a/monetdb5/modules/atoms/str.c
+++ b/monetdb5/modules/atoms/str.c
@@ -2203,7 +2203,7 @@ nested_loop_strjoin(BAT *rl, BAT *rr, BA
                }
        }
 
-       TRC_DEBUG(ALGO, "(%s, %s, l=%s #%zu [%s], r=%s #%zu [%s], cl=%s #%zu, 
cr=%s #%zu, time=%ld)\n",
+       TRC_DEBUG(ALGO, "(%s, %s, l=%s #%zu [%s], r=%s #%zu [%s], cl=%s #%zu, 
cr=%s #%zu, time="LLFMT"usecs)\n",
                          fname, "nested_loop_strjoin",
                          BATgetId(li->b), li->count, ATOMname(li->b->ttype),
                          BATgetId(ri->b), ri->count, ATOMname(ri->b->ttype),
@@ -2433,7 +2433,7 @@ STRjoin(MalStkPtr stk, InstrPtr pci, con
        canditer_init(&rci, r, cr);
        size_t l_cnt = lci.ncand, r_cnt = rci.ncand;
        size_t nested_cost = lci.ncand * rci.ncand,
-               sorted_cost = floor(0.8 * (l_cnt * log2(l_cnt) + r_cnt * 
log2(r_cnt)));
+               sorted_cost = (size_t)floor(0.8 * (l_cnt * log2((double)l_cnt) 
+ r_cnt * log2((double)r_cnt)));
 
        rl = COLnew(0, TYPE_oid, l_cnt, TRANSIENT);
        if (RR)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to