Changeset: 8fabd57132bc for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8fabd57132bc
Modified Files:
        gdk/gdk.h
        gdk/gdk_aggr.c
        gdk/gdk_align.c
        gdk/gdk_bat.c
        gdk/gdk_batop.c
        gdk/gdk_bbp.c
        gdk/gdk_calc.c
        gdk/gdk_calc_compare.h
        gdk/gdk_cross.c
        gdk/gdk_delta.c
        gdk/gdk_delta.h
        gdk/gdk_firstn.c
        gdk/gdk_group.c
        gdk/gdk_hash.c
        gdk/gdk_hash.h
        gdk/gdk_imprints.c
        gdk/gdk_join.c
        gdk/gdk_logger.c
        gdk/gdk_orderidx.c
        gdk/gdk_project.c
        gdk/gdk_sample.c
        gdk/gdk_select.c
        gdk/gdk_storage.c
        gdk/gdk_unique.c
        monetdb5/extras/pyapi/connection.c
        monetdb5/extras/pyapi/pyapi.c
        monetdb5/extras/rapi/converters.c.h
        monetdb5/extras/sphinx/sphinx.c
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_resource.c
        monetdb5/mal/mal_runtime.c
        monetdb5/modules/atoms/batxml.c
        monetdb5/modules/atoms/json.c
        monetdb5/modules/atoms/mtime.c
        monetdb5/modules/kernel/algebra.c
        monetdb5/modules/kernel/bat5.c
        monetdb5/modules/kernel/batcolor.c
        monetdb5/modules/kernel/batmmath.c
        monetdb5/modules/kernel/batstr.c
        monetdb5/modules/kernel/status.c
        monetdb5/modules/mal/manifold.c
        monetdb5/modules/mal/mat.c
        monetdb5/modules/mal/mkey.c
        monetdb5/modules/mal/orderidx.c
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/remote.c
        monetdb5/modules/mal/tablet.c
        monetdb5/modules/mal/tokenizer.c
        monetdb5/modules/mal/zorder.c
        sql/backends/monet5/generator/generator.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_cast_impl_down_from_int.h
        sql/backends/monet5/sql_cast_impl_up_to_flt.h
        sql/backends/monet5/sql_cast_impl_up_to_int.h
        sql/backends/monet5/sql_fround_impl.h
        sql/backends/monet5/sql_rank.c
        sql/backends/monet5/sql_round_impl.h
        sql/backends/monet5/sql_statistics.c
        sql/backends/monet5/vaults/bam/bam_lib.c
        sql/backends/monet5/vaults/netcdf/netcdf.c
        sql/storage/bat/bat_storage.c
        sql/storage/bat/bat_table.c
Branch: default
Log Message:

Introduce abbreviated names for all remaining COLrec members.
Things like twidth for T->width.


diffs (truncated from 8447 to 300 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -928,6 +928,19 @@ typedef int (*GDKfcn) ();
 #define tident         T->id
 #define talign         T->align
 #define torderidx      T->orderidx
+#define twidth         T->width
+#define tshift         T->shift
+#define tnonil         T->nonil
+#define tnil           T->nil
+#define tnokey         T->nokey
+#define tnosorted      T->nosorted
+#define tnorevsorted   T->norevsorted
+#define tnodense       T->nodense
+#define theap          T->heap
+#define tvheap         T->vheap
+#define thash          T->hash
+#define timprints      T->imprints
+#define tprops         T->props
 
 
 
@@ -1102,15 +1115,15 @@ gdk_export bte ATOMelmshift(int sz);
                if ((b)->tvarsized && (b)->ttype) {                     \
                        var_t _d;                                       \
                        ptr _ptr;                                       \
-                       ATOMputVAR((b)->ttype, (b)->T->vheap, &_d, v);  \
-                       if ((b)->T->width < SIZEOF_VAR_T &&             \
-                           ((b)->T->width <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->T->width))) { \
+                       ATOMputVAR((b)->ttype, (b)->tvheap, &_d, v);    \
+                       if ((b)->twidth < SIZEOF_VAR_T &&               \
+                           ((b)->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->twidth))) { \
                                /* doesn't fit in current heap, upgrade it */ \
                                if (GDKupgradevarheap((b)->T, _d, (copyall), 
(b)->batRestricted == BAT_READ) != GDK_SUCCEED) \
                                        goto bunins_failed;             \
                        }                                               \
                        _ptr = (p);                                     \
-                       switch ((b)->T->width) {                        \
+                       switch ((b)->twidth) {                          \
                        case 1:                                         \
                                * (unsigned char *) _ptr = (unsigned char) (_d 
- GDK_VAROFFSET); \
                                break;                                  \
@@ -1134,7 +1147,7 @@ gdk_export bte ATOMelmshift(int sz);
                        var_t _d;                                       \
                        ptr _ptr;                                       \
                        _ptr = (p);                                     \
-                       switch ((b)->T->width) {                        \
+                       switch ((b)->twidth) {                          \
                        case 1:                                         \
                                _d = (var_t) * (unsigned char *) _ptr + 
GDK_VAROFFSET; \
                                break;                                  \
@@ -1148,15 +1161,15 @@ gdk_export bte ATOMelmshift(int sz);
                                _d = * (var_t *) _ptr;                  \
                                break;                                  \
                        }                                               \
-                       ATOMreplaceVAR((b)->ttype, (b)->T->vheap, &_d, v); \
-                       if ((b)->T->width < SIZEOF_VAR_T &&             \
-                           ((b)->T->width <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->T->width))) { \
+                       ATOMreplaceVAR((b)->ttype, (b)->tvheap, &_d, v); \
+                       if ((b)->twidth < SIZEOF_VAR_T &&               \
+                           ((b)->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->twidth))) { \
                                /* doesn't fit in current heap, upgrade it */ \
                                if (GDKupgradevarheap((b)->T, _d, 0, 
(b)->batRestricted == BAT_READ) != GDK_SUCCEED) \
                                        goto bunins_failed;             \
                        }                                               \
                        _ptr = (p);                                     \
-                       switch ((b)->T->width) {                        \
+                       switch ((b)->twidth) {                          \
                        case 1:                                         \
                                * (unsigned char *) _ptr = (unsigned char) (_d 
- GDK_VAROFFSET); \
                                break;                                  \
@@ -1180,15 +1193,15 @@ gdk_export bte ATOMelmshift(int sz);
                if ((b)->tvarsized && (b)->ttype) {                     \
                        var_t _d;                                       \
                        ptr _ptr;                                       \
-                       ATOMputVAR((b)->ttype, (b)->T->vheap, &_d, v);  \
-                       if ((b)->T->width < SIZEOF_VAR_T &&             \
-                           ((b)->T->width <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->T->width))) { \
+                       ATOMputVAR((b)->ttype, (b)->tvheap, &_d, v);    \
+                       if ((b)->twidth < SIZEOF_VAR_T &&               \
+                           ((b)->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->twidth))) { \
                                /* doesn't fit in current heap, upgrade it */ \
                                if (GDKupgradevarheap((b)->T, _d, (copyall), 
(b)->batRestricted == BAT_READ) != GDK_SUCCEED) \
                                        goto bunins_failed;             \
                        }                                               \
                        _ptr = (p);                                     \
-                       switch ((b)->T->width) {                        \
+                       switch ((b)->twidth) {                          \
                        case 1:                                         \
                                * (unsigned char *) _ptr = (unsigned char) (_d 
- GDK_VAROFFSET); \
                                break;                                  \
@@ -1209,7 +1222,7 @@ gdk_export bte ATOMelmshift(int sz);
                        var_t _d;                                       \
                        ptr _ptr;                                       \
                        _ptr = (p);                                     \
-                       switch ((b)->T->width) {                        \
+                       switch ((b)->twidth) {                          \
                        case 1:                                         \
                                _d = (var_t) * (unsigned char *) _ptr + 
GDK_VAROFFSET; \
                                break;                                  \
@@ -1220,15 +1233,15 @@ gdk_export bte ATOMelmshift(int sz);
                                _d = * (var_t *) _ptr;                  \
                                break;                                  \
                        }                                               \
-                       ATOMreplaceVAR((b)->ttype, (b)->T->vheap, &_d, v); \
-                       if ((b)->T->width < SIZEOF_VAR_T &&             \
-                           ((b)->T->width <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->T->width))) { \
+                       ATOMreplaceVAR((b)->ttype, (b)->tvheap, &_d, v); \
+                       if ((b)->twidth < SIZEOF_VAR_T &&               \
+                           ((b)->twidth <= 2 ? _d - GDK_VAROFFSET : _d) >= 
((size_t) 1 << (8 * (b)->twidth))) { \
                                /* doesn't fit in current heap, upgrade it */ \
                                if (GDKupgradevarheap((b)->T, _d, 0, 
(b)->batRestricted == BAT_READ) != GDK_SUCCEED) \
                                        goto bunins_failed;             \
                        }                                               \
                        _ptr = (p);                                     \
-                       switch ((b)->T->width) {                        \
+                       switch ((b)->twidth) {                          \
                        case 1:                                         \
                                * (unsigned char *) _ptr = (unsigned char) (_d 
- GDK_VAROFFSET); \
                                break;                                  \
@@ -1246,8 +1259,8 @@ gdk_export bte ATOMelmshift(int sz);
 #endif
 #define tfastins_nocheck(b, p, v, s)                   \
        do {                                            \
-               (b)->T->heap.free += (s);               \
-               (b)->T->heap.dirty |= (s) != 0;         \
+               (b)->theap.free += (s);                 \
+               (b)->theap.dirty |= (s) != 0;           \
                Tputvalue((b), Tloc((b), (p)), (v), 0); \
        } while (0)
 
@@ -1308,13 +1321,13 @@ gdk_export BUN BUNfnd(BAT *b, const void
 
 #define BATttype(b)    ((b)->ttype == TYPE_void && (b)->tseqbase != oid_nil ? \
                         TYPE_oid : (b)->ttype)
-#define Tbase(b)       ((b)->T->vheap->base)
+#define Tbase(b)       ((b)->tvheap->base)
 
-#define Tsize(b)       ((b)->T->width)
+#define Tsize(b)       ((b)->twidth)
 
-#define tailsize(b,p)  ((b)->ttype?((size_t)(p))<<(b)->T->shift:0)
+#define tailsize(b,p)  ((b)->ttype?((size_t)(p))<<(b)->tshift:0)
 
-#define Tloc(b,p)      ((b)->T->heap.base+((p)<<(b)->T->shift))
+#define Tloc(b,p)      ((b)->theap.base+((p)<<(b)->tshift))
 
 #if SIZEOF_VAR_T < SIZEOF_VOID_P
 /* NEW 11/4/2009: when compiled with 32-bits oids/var_t on 64-bits
@@ -1361,7 +1374,7 @@ typedef var_t stridx_t; /* TODO: should 
         ((var_t *) (b))[p])
 #endif
 #define VarHeapVal(b,p,w) ((size_t) VarHeapValRaw(b,p,w)  << GDK_VARSHIFT)
-#define BUNtvaroff(bi,p) VarHeapVal((bi).b->T->heap.base, (p), 
(bi).b->T->width)
+#define BUNtvaroff(bi,p) VarHeapVal((bi).b->theap.base, (p), (bi).b->twidth)
 
 #define BUNtloc(bi,p)  Tloc((bi).b,p)
 #define BUNtpos(bi,p)  Tpos(&(bi),p)
@@ -1452,8 +1465,8 @@ gdk_export int BATgetaccess(BAT *b);
 
 #define BATdirty(b)    ((b)->batCopiedtodisk == 0 || (b)->batDirty ||  \
                         (b)->batDirtydesc ||                           \
-                        (b)->T->heap.dirty ||                          \
-                        ((b)->T->vheap?(b)->T->vheap->dirty:0))
+                        (b)->theap.dirty ||                            \
+                        ((b)->tvheap?(b)->tvheap->dirty:0))
 
 #define PERSISTENT             0
 #define TRANSIENT              1
@@ -2742,11 +2755,11 @@ gdk_export void ALIGNsetT(BAT *b1, BAT *
  */
 #define isVIEW(x)                                                      \
        (assert((x)->batCacheid > 0),                                   \
-        ((x)->T->heap.parentid ||                                      \
-         ((x)->T->vheap && (x)->T->vheap->parentid != (x)->batCacheid)))
+        ((x)->theap.parentid ||                                        \
+         ((x)->tvheap && (x)->tvheap->parentid != (x)->batCacheid)))
 
-#define VIEWtparent(x) ((x)->T->heap.parentid)
-#define VIEWvtparent(x)        ((x)->T->vheap == NULL || 
(x)->T->vheap->parentid == (x)->batCacheid ? 0 : (x)->T->vheap->parentid)
+#define VIEWtparent(x) ((x)->theap.parentid)
+#define VIEWvtparent(x)        ((x)->tvheap == NULL || (x)->tvheap->parentid 
== (x)->batCacheid ? 0 : (x)->tvheap->parentid)
 
 /*
  * @+ BAT Iterators
@@ -2817,7 +2830,7 @@ gdk_export void ALIGNsetT(BAT *b1, BAT *
 /*
  * @- hash-table supported loop over BUNs
  * The first parameter `b' is a BAT, the second (`h') should point to
- * `b->T->hash', and `v' a pointer to an atomic value (corresponding
+ * `b->thash', and `v' a pointer to an atomic value (corresponding
  * to the head column of `b'). The 'hb' is an integer index, pointing
  * out the `hb'-th BUN.
  */
diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c
--- a/gdk/gdk_aggr.c
+++ b/gdk/gdk_aggr.c
@@ -493,7 +493,7 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT 
 
        if ((e == NULL ||
             (BATcount(e) == BATcount(b) && e->hseqbase == b->hseqbase)) &&
-           (BATtdense(g) || (g->tkey && g->T->nonil))) {
+           (BATtdense(g) || (g->tkey && g->tnonil))) {
                /* trivial: singleton groups, so all results are equal
                 * to the inputs (but possibly a different type) */
                return BATconvert(b, s, tp, abort_on_error);
@@ -509,7 +509,7 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT 
        else
                gids = (const oid *) Tloc(g, BUNfirst(g) + start);
 
-       nils = dosum(Tloc(b, BUNfirst(b)), b->T->nonil, b->hseqbase, start, end,
+       nils = dosum(Tloc(b, BUNfirst(b)), b->tnonil, b->hseqbase, start, end,
                     Tloc(bn, BUNfirst(bn)), ngrp, b->ttype, tp,
                     cand, candend, gids, min, max,
                     skip_nils, abort_on_error, 1, "BATgroupsum");
@@ -519,8 +519,8 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT 
                bn->tkey = BATcount(bn) <= 1;
                bn->tsorted = BATcount(bn) <= 1;
                bn->trevsorted = BATcount(bn) <= 1;
-               bn->T->nil = nils != 0;
-               bn->T->nonil = nils == 0;
+               bn->tnil = nils != 0;
+               bn->tnonil = nils == 0;
        } else {
                BBPunfix(bn->batCacheid);
                bn = NULL;
@@ -638,7 +638,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s
        }
        if (BATcount(b) == 0)
                return GDK_SUCCEED;
-       nils = dosum(Tloc(b, BUNfirst(b)), b->T->nonil, b->hseqbase, start, end,
+       nils = dosum(Tloc(b, BUNfirst(b)), b->tnonil, b->hseqbase, start, end,
                     res, 1, b->ttype, tp, cand, candend, &min, min, max,
                     skip_nils, abort_on_error, nil_if_empty, "BATsum");
        return nils < BUN_NONE ? GDK_SUCCEED : GDK_FAIL;
@@ -1097,7 +1097,7 @@ BATgroupprod(BAT *b, BAT *g, BAT *e, BAT
 
        if ((e == NULL ||
             (BATcount(e) == BATcount(b) && e->hseqbase == b->hseqbase)) &&
-           (BATtdense(g) || (g->tkey && g->T->nonil))) {
+           (BATtdense(g) || (g->tkey && g->tnonil))) {
                /* trivial: singleton groups, so all results are equal
                 * to the inputs (but possibly a different type) */
                return BATconvert(b, s, tp, abort_on_error);
@@ -1123,8 +1123,8 @@ BATgroupprod(BAT *b, BAT *g, BAT *e, BAT
                bn->tkey = BATcount(bn) <= 1;
                bn->tsorted = BATcount(bn) <= 1;
                bn->trevsorted = BATcount(bn) <= 1;
-               bn->T->nil = nils != 0;
-               bn->T->nonil = nils == 0;
+               bn->tnil = nils != 0;
+               bn->tnonil = nils == 0;
        } else {
                BBPunfix(bn->batCacheid);
                bn = NULL;
@@ -1391,7 +1391,7 @@ BATgroupavg(BAT **bnp, BAT **cntsp, BAT 
 
        if ((e == NULL ||
             (BATcount(e) == BATcount(b) && e->hseqbase == b->hseqbase)) &&
-           (BATtdense(g) || (g->tkey && g->T->nonil))) {
+           (BATtdense(g) || (g->tkey && g->tnonil))) {
                /* trivial: singleton groups, so all results are equal
                 * to the inputs (but possibly a different type) */
                if ((bn = BATconvert(b, s, TYPE_dbl, abort_on_error)) == NULL)
@@ -1487,15 +1487,15 @@ BATgroupavg(BAT **bnp, BAT **cntsp, BAT 
                (*cntsp)->tkey = BATcount(*cntsp) <= 1;
                (*cntsp)->tsorted = BATcount(*cntsp) <= 1;
                (*cntsp)->trevsorted = BATcount(*cntsp) <= 1;
-               (*cntsp)->T->nil = 0;
-               (*cntsp)->T->nonil = 1;
+               (*cntsp)->tnil = 0;
+               (*cntsp)->tnonil = 1;
        }
        BATsetcount(bn, ngrp);
        bn->tkey = BATcount(bn) <= 1;
        bn->tsorted = BATcount(bn) <= 1;
        bn->trevsorted = BATcount(bn) <= 1;
-       bn->T->nil = nils != 0;
-       bn->T->nonil = nils == 0;
+       bn->tnil = nils != 0;
+       bn->tnonil = nils == 0;
        *bnp = bn;
        return GDK_SUCCEED;
 
@@ -1814,8 +1814,8 @@ BATgroupcount(BAT *b, BAT *g, BAT *e, BA
        bn->tkey = BATcount(bn) <= 1;
        bn->tsorted = BATcount(bn) <= 1;
        bn->trevsorted = BATcount(bn) <= 1;
-       bn->T->nil = 0;
-       bn->T->nonil = 1;
+       bn->tnil = 0;
+       bn->tnonil = 1;
        return bn;
 }
 
@@ -1892,8 +1892,8 @@ BATgroupsize(BAT *b, BAT *g, BAT *e, BAT
        bn->tkey = BATcount(bn) <= 1;
        bn->tsorted = BATcount(bn) <= 1;
        bn->trevsorted = BATcount(bn) <= 1;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to