Changeset: e60a897ca58f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e60a897ca58f
Modified Files:
        monetdb5/modules/kernel/vss.c
Branch: nested
Log Message:

reenabled avg for now
added debuging steps


diffs (53 lines):

diff --git a/monetdb5/modules/kernel/vss.c b/monetdb5/modules/kernel/vss.c
--- a/monetdb5/modules/kernel/vss.c
+++ b/monetdb5/modules/kernel/vss.c
@@ -125,18 +125,17 @@ bond_create(allocator *ma, BAT **dim_bat
                        for (int d = 0; d < ndims; d++) {
                                BAT *b = dim_bats[d];
                                bc->dims[d] = b;
-                               /*
                                dbl avg;
                                BUN cnt;
                                if (BATcalcavg(b, NULL, &avg, &cnt, 0) != 
GDK_SUCCEED)
                                        return NULL;
                                bc->dim_means[d] = avg;
+                               /*
                                bc->dim_max[d] = *(dbl*)BATmax(b, NULL);
                                bc->dim_min[d] = *(dbl*)BATmin(b, NULL);
+                               bc->dim_max[d] =
+                               bc->dim_min[d] = *(dbl*)Tloc(b, 0);
                                */
-                               bc->dim_means[d] =
-                               bc->dim_max[d] =
-                               bc->dim_min[d] = 1;
                        }
                        return bc;
                }
@@ -204,8 +203,7 @@ bond_search_fast(allocator *ma, bond_col
                        BUN k, int *dim_order, BAT *cands,
                        BAT **oid_result, BAT **dist_result)
 {
-       (void) cands;
-       if (!bc || !query_vals || k == 0 || !oid_result || !dist_result || 
!dim_order)
+       if (cands || !bc || !query_vals || k == 0 || !oid_result || 
!dist_result || !dim_order)
                throw(MAL, "vss.bond_search", "invalid arguments");
 
        dbl *partial_dists = ma_zalloc(ma, sizeof(dbl) * bc->nvecs);
@@ -293,6 +291,7 @@ bond_search_fast(allocator *ma, bond_col
                                write_pos++;
                        }
                }
+               k = write_pos;
        }
        BATsetcount(koids, k);
     koids->tsorted = false;
@@ -303,6 +302,9 @@ bond_search_fast(allocator *ma, bond_col
     //kdist->tnonil = true;
     kdist->tkey = false;
 
+       BATprint(GDKstdout, koids);
+       BATprint(GDKstdout, kdist);
+
        *oid_result = koids;
        *dist_result = kdist;
        return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to