Changeset: af92397f8328 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=af92397f8328 Modified Files: gdk/gdk_setop.mx monetdb5/modules/kernel/batmtime.mx Branch: default Log Message:
Whitespace and comment cleanup. diffs (183 lines): diff --git a/gdk/gdk_setop.mx b/gdk/gdk_setop.mx --- a/gdk/gdk_setop.mx +++ b/gdk/gdk_setop.mx @@ -43,23 +43,28 @@ All Rights Reserved. * @item [s,k]intersection * produce bat intersection. * @end itemize - * Implementations typically take two forms: if the input relation(s) is/are - * ordered, a merge-algorithm is used. Otherwise, hash-indices are produced - * on demand for the hash-based versions. * - * The @emph{[k,s]intersect(l,r)} operations result in all BUNs of @emph{l} that - * are also in @emph{r}. They do not do double-elimination over the @emph{l} BUNs. + * Implementations typically take two forms: if the input relation(s) + * is/are ordered, a merge-algorithm is used. Otherwise, hash-indices + * are produced on demand for the hash-based versions. * - * The @emph{[k,s]diff(l,r)} operations result in all BUNs of @emph{l} that are - * not in @emph{r}. They do not do double-elimination over the @emph{l} BUNs. + * The @emph{[k,s]intersect(l,r)} operations result in all BUNs of + * @emph{l} that are also in @emph{r}. They do not do + * double-elimination over the @emph{l} BUNs. * - * The @emph{[k,s]union(l,r)} operations result in all BUNs of @emph{l}, plus - * all BUNs of @emph{r} that are not in @emph{l}. They do not do double-elimination - * over the @emph{l} nor @emph{r} BUNs. + * The @emph{[k,s]diff(l,r)} operations result in all BUNs of @emph{l} + * that are not in @emph{r}. They do not do double-elimination over + * the @emph{l} BUNs. * - * Operations with double-elimination can be formed by performing @emph{[k,s]unique(l)} on their operands. + * The @emph{[k,s]union(l,r)} operations result in all BUNs of + * @emph{l}, plus all BUNs of @emph{r} that are not in @emph{l}. They + * do not do double-elimination over the @emph{l} nor @emph{r} BUNs. * - * The @emph{kintersect(l,r)} is used also as implementation for the @emph{semijoin()}. + * Operations with double-elimination can be formed by performing + * @emph{[k,s]unique(l)} on their operands. + * + * The @emph{kintersect(l,r)} is used also as implementation for the + * @emph{semijoin()}. */ @h #ifndef _GDK_SETOP_H @@ -404,10 +409,10 @@ BATsunique(BAT *b) /* * @+ Difference and Intersect * Difference and Intersection are handled together. For each routine - * there are two versions: @`BATkdiff@5(l,r) and @`BATkintersect@5(l,r) (which - * look at the head column only), versus @`BATsdiff@5(l,r) and - * @`BATsintersect@5(l,r) (looking at both columns). - * TODO synced/key case.. + * there are two versions: @`BATkdiff@5(l,r) and + * @`BATkintersect@5(l,r) (which look at the head column only), versus + * @`BATsdiff@5(l,r) and @`BATsintersect@5(l,r) (looking at both + * columns). TODO synced/key case.. */ @= mergecheck BUN p1 = BUNfirst(l), p2 = BUNfirst(r); diff --git a/monetdb5/modules/kernel/batmtime.mx b/monetdb5/modules/kernel/batmtime.mx --- a/monetdb5/modules/kernel/batmtime.mx +++ b/monetdb5/modules/kernel/batmtime.mx @@ -119,7 +119,7 @@ batmtime_export str MTIMEbat_@1_cst_@2(i @= baselineCode str MTIMEbat_@1_@2(int *ret, int *l, int *r) -{ +{ BAT *bn, *b, *right; @1 *p, *q, *t; bit *o; @@ -139,7 +139,7 @@ str MTIMEbat_@1_@2(int *ret, int *l, int p = (@1*)Tloc(b,BUNfirst(b)); q = (@1*)Tloc(b,BUNlast(b)); t = (@1*)Tloc(right,BUNfirst(right)); - + BATaccessBegin(b, USE_TAIL, MMAP_SEQUENTIAL); BATaccessBegin(right, USE_TAIL, MMAP_SEQUENTIAL); if (b->T->nonil && right->T->nonil) { @@ -158,20 +158,20 @@ str MTIMEbat_@1_@2(int *ret, int *l, int *o = bit_nil; else @1@2(o,p,t); else - for (;p<q; p++, t++, o++) + for (;p<q; p++, t++, o++) if ( @1_isnil(*p) || @1_isnil(*t)) *o = bit_nil; else @1@2(o,p,t); BATaccessEnd(right, USE_TAIL, MMAP_SEQUENTIAL); BATaccessEnd(b, USE_TAIL, MMAP_SEQUENTIAL); - if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); + if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); BATsetcount(bn, BATcount(b)); if (b->htype != bn->htype) { BAT *r = VIEWcreate(b,bn); - + BBPreleaseref(bn->batCacheid); bn = r; } @@ -186,7 +186,7 @@ str MTIMEbat_@1_@2(int *ret, int *l, int } str MTIMEbat_@1_@2_cst(int *ret, int *l, @1 *cst) -{ +{ BAT *bn, *b; @1 *p, *q; bit *o; @@ -200,10 +200,10 @@ str MTIMEbat_@1_@2_cst(int *ret, int *l, o = (bit*)Tloc(bn,BUNfirst(bn)); p = (@1*)Tloc(b,BUNfirst(b)); q = (@1*)Tloc(b,BUNlast(b)); - + BATaccessBegin(b, USE_TAIL, MMAP_SEQUENTIAL); if ( @1_isnil(*cst)) - for (;p<q; p++, o++) + for (;p<q; p++, o++) *o = bit_nil; else if (b->T->nonil ) @@ -235,7 +235,7 @@ str MTIMEbat_@1_@2_cst(int *ret, int *l, } str MTIMEbat_@1_cst_@2(int *ret, @1 *cst, int *l) -{ +{ BAT *bn, *b; @1 *p, *q; bit *o; @@ -248,10 +248,10 @@ str MTIMEbat_@1_cst_@2(int *ret, @1 *cst o = (bit*)Tloc(bn,BUNfirst(bn)); p = (@1*)Tloc(b,BUNfirst(b)); q = (@1*)Tloc(b,BUNlast(b)); - + BATaccessBegin(b, USE_TAIL, MMAP_SEQUENTIAL); if (@1_isnil(*cst)) - for (;p<q; p++, o++) + for (;p<q; p++, o++) *o = bit_nil; else if (b->T->nonil ) @@ -331,7 +331,7 @@ str MTIMEunaryISNIL(int *ret, int *bid) BATaccessBegin(b, USE_TAIL, MMAP_SEQUENTIAL); if ( BATttype(b) == TYPE_date) { date *p = (date*)Tloc(b,BUNfirst(b)); - date *q = (date*)Tloc(b,BUNlast(b)); + date *q = (date*)Tloc(b,BUNlast(b)); if (b->T->nonil){ for(; p<q; p++, o++ ) *o = FALSE; @@ -341,7 +341,7 @@ str MTIMEunaryISNIL(int *ret, int *bid) } else if ( BATttype(b) == TYPE_daytime) { daytime *p = (daytime*)Tloc(b,BUNfirst(b)); - daytime *q = (daytime*)Tloc(b,BUNlast(b)); + daytime *q = (daytime*)Tloc(b,BUNlast(b)); if (b->T->nonil){ for(; p<q; p++, o++ ) *o = FALSE; @@ -351,14 +351,14 @@ str MTIMEunaryISNIL(int *ret, int *bid) } else if ( BATttype(b) == TYPE_timestamp) { timestamp *p = (timestamp*)Tloc(b,BUNfirst(b)); - timestamp *q = (timestamp*)Tloc(b,BUNlast(b)); + timestamp *q = (timestamp*)Tloc(b,BUNlast(b)); if (b->T->nonil){ for(; p<q; p++, o++ ) *o = FALSE; } else for(; p<q; p++, o++ ) *o = timestamp_isnil(*p); - } + } BATaccessEnd(b, USE_TAIL, MMAP_SEQUENTIAL); BATsetcount(bn, BATcount(b)); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list