Changeset: 9b30d31dc9a6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9b30d31dc9a6
Modified Files:
gdk/gdk_batop.c
Branch: int128
Log Message:
added int128 / "hge" support in gdk/gdk_batop.c
diffs (90 lines):
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1005,6 +1005,11 @@ BATrestrict(BAT *b, const void *hl, cons
case TYPE_lng:
restrict1(simple, lng, BUNhloc);
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ restrict1(simple, hge, BUNhloc);
+ break;
+#endif
default:
if (b->hvarsized) {
restrict1(atom, t, BUNhvar);
@@ -1035,6 +1040,11 @@ BATrestrict(BAT *b, const void *hl, cons
case TYPE_lng:
restrict2(simple, lng, BUNhvar, BUNtloc);
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ restrict2(simple, hge, BUNhvar, BUNtloc);
+ break;
+#endif
default:
if (b->tvarsized) {
restrict2(atom, t, BUNhvar, BUNtvar);
@@ -1061,6 +1071,11 @@ BATrestrict(BAT *b, const void *hl, cons
case TYPE_lng:
restrict2(simple, lng, BUNhloc, BUNtloc);
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ restrict2(simple, hge, BUNhloc, BUNtloc);
+ break;
+#endif
default:
if (b->tvarsized) {
restrict2(atom, t, BUNhloc, BUNtvar);
@@ -1828,6 +1843,13 @@ BATconstant(int tailtype, const void *v,
((lng *) p)[i] = *(lng *) v;
bn->T->nil = n >= 1 && (ATOMstorage(tailtype) == TYPE_lng ?
*(lng *) v == lng_nil : *(dbl *) v == dbl_nil);
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ for (i = 0; i < n; i++)
+ ((hge *) p)[i] = *(hge *) v;
+ bn->T->nil = n >= 1 && *(hge *) v == hge_nil;
+ break;
+#endif
default:
bn->T->nil = n >= 1 && ATOMcmp(tailtype, v,
ATOMnilptr(tailtype)) == 0;
for (i = BUNfirst(bn), n += i; i < n; i++)
@@ -2051,6 +2073,11 @@ BAThistogram(BAT *b)
case TYPE_dbl:
histoloop_sorted(BUNtloc, simple_CMP, lng);
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ histoloop_sorted(BUNtloc, simple_CMP, hge);
+ break;
+#endif
default:
tt = bn->htype;
if (bn->hvarsized)
@@ -2075,6 +2102,11 @@ BAThistogram(BAT *b)
case TYPE_dbl:
histoloop_merge(BUNtloc, HASHloop_lng);
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ histoloop_merge(BUNtloc, HASHloop_hge);
+ break;
+#endif
default:
if (bn->hvarsized)
histoloop_merge(BUNtvar, HASHloopvar);
@@ -2171,6 +2203,12 @@ BATcount_no_nil(BAT *b)
for (i = 0; i < n; i++)
cnt += ((const lng *) p)[i] != lng_nil;
break;
+#ifdef HAVE_HGE
+ case TYPE_hge:
+ for (i = 0; i < n; i++)
+ cnt += ((const hge *) p)[i] != hge_nil;
+ break;
+#endif
case TYPE_flt:
for (i = 0; i < n; i++)
cnt += ((const flt *) p)[i] != flt_nil;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list