Changeset: 5191a501fe8f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5191a501fe8f
Modified Files:
clients/Tests/exports.stable.out
monetdb5/modules/mal/iterator.c
monetdb5/modules/mal/iterator.h
monetdb5/modules/mal/iterator.mal
Branch: int128
Log Message:
added int128 / "hge" support in monetdb5/modules/mal/iterator.*
diffs (56 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1477,6 +1477,7 @@ str ITRnewChunk(lng *res, int *vid, int
str ITRnextChunk(lng *res, int *vid, int *bid, lng *granule);
str ITRnext_dbl(dbl *i, dbl *step, dbl *last);
str ITRnext_flt(flt *i, flt *step, flt *last);
+str ITRnext_hge(hge *i, hge *step, hge *last);
str ITRnext_int(int *i, int *step, int *last);
str ITRnext_lng(lng *i, lng *step, lng *last);
str ITRnext_oid(oid *i, oid *step, oid *last);
diff --git a/monetdb5/modules/mal/iterator.c b/monetdb5/modules/mal/iterator.c
--- a/monetdb5/modules/mal/iterator.c
+++ b/monetdb5/modules/mal/iterator.c
@@ -204,6 +204,16 @@ str ITRnext_lng(lng *i, lng *step, lng *
*i = lng_nil;
return MAL_SUCCEED;
}
+#ifdef HAVE_HGE
+str ITRnext_hge(hge *i, hge *step, hge *last){
+ hge v = *i;
+ v = v + *step;
+ *i = v;
+ if ( *last <= v )
+ *i = hge_nil;
+ return MAL_SUCCEED;
+}
+#endif
str ITRnext_int(int *i, int *step, int *last){
int v = *i;
v = v + *step;
diff --git a/monetdb5/modules/mal/iterator.h b/monetdb5/modules/mal/iterator.h
--- a/monetdb5/modules/mal/iterator.h
+++ b/monetdb5/modules/mal/iterator.h
@@ -40,6 +40,9 @@ iterator_export str ITRbunNext(Client cn
iterator_export str ITRnext_oid(oid *i, oid *step, oid *last);
iterator_export str ITRnext_lng(lng *i, lng *step, lng *last);
+#ifdef HAVE_HGE
+iterator_export str ITRnext_hge(hge *i, hge *step, hge *last);
+#endif
iterator_export str ITRnext_int(int *i, int *step, int *last);
iterator_export str ITRnext_sht(sht *i, sht *step, sht *last);
iterator_export str ITRnext_flt(flt *i, flt *step, flt *last);
diff --git a/monetdb5/modules/mal/iterator.mal
b/monetdb5/modules/mal/iterator.mal
--- a/monetdb5/modules/mal/iterator.mal
+++ b/monetdb5/modules/mal/iterator.mal
@@ -43,6 +43,8 @@ command next(step:int,last:int):int
address ITRnext_int;
command next(step:lng,last:lng):lng
address ITRnext_lng;
+command next(step:hge,last:hge):hge
+address ITRnext_hge;
command next(step:flt,last:flt):flt
address ITRnext_flt;
command next(step:dbl,last:dbl):dbl
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list