Changeset: 74f5a8d4932b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=74f5a8d4932b Modified Files: gdk/ChangeLog gdk/gdk.h gdk/gdk_private.h Branch: default Log Message:
Removed all versions of the SORTloop macro. diffs (94 lines): diff --git a/gdk/ChangeLog b/gdk/ChangeLog --- a/gdk/ChangeLog +++ b/gdk/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog +* Thu Oct 8 2015 Sjoerd Mullender <[email protected]> +- Removed all versions of the SORTloop macro. + * Thu Oct 1 2015 Sjoerd Mullender <[email protected]> - Removed Batkdiff. Use BATsubdiff instead. diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -2860,9 +2860,6 @@ gdk_export void ALIGNsetH(BAT *b1, BAT * * @item HASHloopvar * @tab * (BAT *b; Hash *h, size_t idx; ptr value, BUN w) - * @item SORTloop - * @tab - * (BAT *b,p,q,tl,th,s) * @end multitable * * The @emph{BATloop()} looks like a function call, but is actually a @@ -2990,25 +2987,6 @@ gdk_export void ALIGNsetH(BAT *b1, BAT * #define HASHloop_dbl(bi, h, hb, v) HASHloop_TYPE(bi, h, hb, v, dbl) /* - * @- loop over a BAT with ordered tail - * Here we loop over a BAT with an ordered tail column. Again, 'p' and - * 'q' are iteration variables, where 'p' points at the current - * BUN. 'tl' and 'th' are pointers to atom corresponding to the - * minimum (included) and maximum (included) bound in the selected - * range of BUNs. A nil-value means that there is no bound. The 's' - * finally is an integer denoting the bunsize, used for speed. - */ -#define SORTloop(b, p, q, tl, th) \ - if (!BATtordered(b)) \ - GDKerror("SORTloop: BAT not sorted.\n"); \ - else for (p = (ATOMcmp((b)->ttype, tl, ATOMnilptr((b)->ttype)) ? \ - SORTfndfirst((b), tl) : BUNfirst(b)), \ - q = (ATOMcmp((b)->ttype, th, ATOMnilptr((b)->ttype)) ? \ - SORTfndlast((b), th) : BUNlast(b)); \ - p < q; \ - p++) - -/* * @+ Common BAT Operations * Much used, but not necessarily kernel-operations on BATs. * diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -317,38 +317,6 @@ extern MT_Lock MT_system_lock; #define GDKcacheLock(y) GDKbbpLock[y].alloc #define BBP_free(y) GDKbbpLock[y].free -#define SORTloop_TYPE(b, p, q, tl, th, TYPE) \ - if (!BATtordered(b)) \ - GDKerror("SORTloop_" #TYPE ": BAT not sorted.\n"); \ - else for (p = simple_EQ(tl, &TYPE##_nil, TYPE) ? BUNfirst(b) : SORTfndfirst(b, tl), \ - q = simple_EQ(th, &TYPE##_nil, TYPE) ? BUNfirst(b) : SORTfndlast(b, th); \ - p < q; \ - p++) - -#define SORTloop_bte(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, bte) -#define SORTloop_sht(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, sht) -#define SORTloop_int(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, int) -#define SORTloop_lng(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, lng) -#ifdef HAVE_HGE -#define SORTloop_hge(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, hge) -#endif -#define SORTloop_flt(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, flt) -#define SORTloop_dbl(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, dbl) -#define SORTloop_oid(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, oid) -#define SORTloop_wrd(b, p, q, tl, th) SORTloop_TYPE(b, p, q, tl, th, wrd) - -#define SORTloop_loc(b,p,q,tl,th) \ - if (!BATtordered(b)) \ - GDKerror("SORTloop_loc: BAT not sorted.\n"); \ - else for (p = atom_EQ(tl, ATOMnilptr((b)->ttype), (b)->ttype) ? BUNfirst(b) : SORTfndfirst(b, tl), \ - q = atom_EQ(th, ATOMnilptr((b)->ttype), (b)->ttype) ? BUNfirst(b) : SORTfndlast(b, th); \ - p < q; \ - p++) - -#define SORTloop_var(b,p,q,tl,th) SORTloop_loc(b,p,q,tl,th) - -#define SORTloop_bit(b,p,q,tl,th) SORTloop_bte(b,p,q,tl,th) - #define Hputvalue(b, p, v, copyall) HTputvalue(b, p, v, copyall, H) #define hfastins_nocheck(b, p, v, s) HTfastins_nocheck(b, p, v, s, H) _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
