Changeset: ad37c9b0810d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad37c9b0810d
Modified Files:
clients/Tests/MAL-signatures_all.stable.out
clients/Tests/MAL-signatures_fits_geom.stable.out
clients/Tests/MAL-signatures_geom.stable.out
clients/Tests/MAL-signatures_none.stable.out
clients/Tests/exports.stable.out
gdk/gdk_select.c
monetdb5/modules/kernel/bat5.mal
testing/exportutils.py
testing/listexports.py.in
testing/malcheck.py
Branch: Oct2014
Log Message:
Merge with default.
diffs (truncated from 480 to 300 lines):
diff --git a/clients/Tests/MAL-signatures_all.stable.out
b/clients/Tests/MAL-signatures_all.stable.out
--- a/clients/Tests/MAL-signatures_all.stable.out
+++ b/clients/Tests/MAL-signatures_all.stable.out
@@ -31621,10 +31621,6 @@ command bat.delete(b:bat[:any_1,:any_2],
address BKCdelete_bat_bun;
comment Delete from the first BAT all BUNs with a corresponding BUN in
the second.
-command
bat.deleteHead(b:bat[:any_1,:any_2],src:bat[:any_1,:any]):bat[:any_1,:any_2]
-address BKCdelete_bat;
-comment Delete from the first BAT all BUNs with a corresponding head
in the second.
-
command bat.delete(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
address BKCdelete_all;
comment Delete all BUNs in a BAT.
@@ -31905,7 +31901,11 @@ command bat.shrink(b:bat[:oid,:any_1],de
address BKCshrinkBAT;
comment Shrink the BAT based on a list of entries identified as to-be-deleted
-command bat.setHash(b:bat[:oid,:any_2],prop:bit):bit
+command bat.setImprints(b:bat[:oid,:any_2]):bit
+address BKCsetImprints;
+comment Create n imprints structure on the column
+
+command bat.setHash(b:bat[:oid,:any_2]):bit
address BKCsetHash;
comment Create a hash structure on the column
diff --git a/clients/Tests/MAL-signatures_fits_geom.stable.out
b/clients/Tests/MAL-signatures_fits_geom.stable.out
--- a/clients/Tests/MAL-signatures_fits_geom.stable.out
+++ b/clients/Tests/MAL-signatures_fits_geom.stable.out
@@ -31542,10 +31542,6 @@ command bat.delete(b:bat[:any_1,:any_2],
address BKCdelete_bat_bun;
comment Delete from the first BAT all BUNs with a corresponding BUN in
the second.
-command
bat.deleteHead(b:bat[:any_1,:any_2],src:bat[:any_1,:any]):bat[:any_1,:any_2]
-address BKCdelete_bat;
-comment Delete from the first BAT all BUNs with a corresponding head
in the second.
-
command bat.delete(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
address BKCdelete_all;
comment Delete all BUNs in a BAT.
@@ -31826,7 +31822,11 @@ command bat.shrink(b:bat[:oid,:any_1],de
address BKCshrinkBAT;
comment Shrink the BAT based on a list of entries identified as to-be-deleted
-command bat.setHash(b:bat[:oid,:any_2],prop:bit):bit
+command bat.setImprints(b:bat[:oid,:any_2]):bit
+address BKCsetImprints;
+comment Create n imprints structure on the column
+
+command bat.setHash(b:bat[:oid,:any_2]):bit
address BKCsetHash;
comment Create a hash structure on the column
diff --git a/clients/Tests/MAL-signatures_geom.stable.out
b/clients/Tests/MAL-signatures_geom.stable.out
--- a/clients/Tests/MAL-signatures_geom.stable.out
+++ b/clients/Tests/MAL-signatures_geom.stable.out
@@ -31542,10 +31542,6 @@ command bat.delete(b:bat[:any_1,:any_2],
address BKCdelete_bat_bun;
comment Delete from the first BAT all BUNs with a corresponding BUN in
the second.
-command
bat.deleteHead(b:bat[:any_1,:any_2],src:bat[:any_1,:any]):bat[:any_1,:any_2]
-address BKCdelete_bat;
-comment Delete from the first BAT all BUNs with a corresponding head
in the second.
-
command bat.delete(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
address BKCdelete_all;
comment Delete all BUNs in a BAT.
@@ -31826,7 +31822,11 @@ command bat.shrink(b:bat[:oid,:any_1],de
address BKCshrinkBAT;
comment Shrink the BAT based on a list of entries identified as to-be-deleted
-command bat.setHash(b:bat[:oid,:any_2],prop:bit):bit
+command bat.setImprints(b:bat[:oid,:any_2]):bit
+address BKCsetImprints;
+comment Create n imprints structure on the column
+
+command bat.setHash(b:bat[:oid,:any_2]):bit
address BKCsetHash;
comment Create a hash structure on the column
diff --git a/clients/Tests/MAL-signatures_none.stable.out
b/clients/Tests/MAL-signatures_none.stable.out
--- a/clients/Tests/MAL-signatures_none.stable.out
+++ b/clients/Tests/MAL-signatures_none.stable.out
@@ -31537,10 +31537,6 @@ command bat.delete(b:bat[:any_1,:any_2],
address BKCdelete_bat_bun;
comment Delete from the first BAT all BUNs with a corresponding BUN in
the second.
-command
bat.deleteHead(b:bat[:any_1,:any_2],src:bat[:any_1,:any]):bat[:any_1,:any_2]
-address BKCdelete_bat;
-comment Delete from the first BAT all BUNs with a corresponding head
in the second.
-
command bat.delete(b:bat[:any_1,:any_2]):bat[:any_1,:any_2]
address BKCdelete_all;
comment Delete all BUNs in a BAT.
@@ -31821,7 +31817,11 @@ command bat.shrink(b:bat[:oid,:any_1],de
address BKCshrinkBAT;
comment Shrink the BAT based on a list of entries identified as to-be-deleted
-command bat.setHash(b:bat[:oid,:any_2],prop:bit):bit
+command bat.setImprints(b:bat[:oid,:any_2]):bit
+address BKCsetImprints;
+comment Create n imprints structure on the column
+
+command bat.setHash(b:bat[:oid,:any_2]):bit
address BKCsetHash;
comment Create a hash structure on the column
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
@@ -950,7 +950,8 @@ str BKCsetAccess(bat *res, const bat *bi
str BKCsetAppendMode(bat *res, const bat *bid);
str BKCsetColumn(void *r, const bat *bid, const char *const *tname);
str BKCsetColumns(void *r, const bat *bid, const char *const *hname, const
char *const *tname);
-str BKCsetHash(bit *ret, const bat *bid, const bit *prop);
+str BKCsetHash(bit *ret, const bat *bid);
+str BKCsetImprints(bit *ret, const bat *bid);
str BKCsetName(void *r, const bat *bid, const char *const *s);
str BKCsetPersistent(void *r, const bat *bid);
str BKCsetReadMode(bat *res, const bat *bid);
diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -226,24 +226,26 @@ do {
\
e = (BUN) (i+limit-pr_off+off); \
if (im[icnt] & mask) { \
if ((im[icnt] & ~innermask) == 0) { \
- while (o < e && p < q) { \
+ while (p < q && o < e) { \
v = src[o-off]; \
ADD; \
cnt++; \
p++; \
- CAND; \
+ if (p < q) \
+ CAND; \
} \
} else { \
- while (o < e && p < q) { \
+ while (p < q && o < e) { \
v = src[o-off]; \
ADD; \
cnt += (TEST); \
p++; \
- CAND; \
+ if (p < q) \
+ CAND; \
} \
} \
} else { \
- while (o < e && p <= q) { \
+ while (p <= q && o < e) { \
p++; \
CAND; \
} \
@@ -263,24 +265,24 @@ do {
\
bte rpp = ATOMelmshift(IMPS_PAGE >> b->T->shift); \
CAND; \
for (i = 0, dcnt = 0, icnt = 0; \
- (dcnt < imprints->dictcnt) && (i + off < w + pr_off) && (p < q); \
+ dcnt < imprints->dictcnt && i + off < w + pr_off && p < q; \
dcnt++) { \
limit = ((BUN) d[dcnt].cnt) << rpp; \
- while ((i+limit+off) <= (o+pr_off)) { \
+ while (i + limit + off <= o + pr_off) { \
i += limit; \
- icnt += d[dcnt].repeat?1:d[dcnt].cnt; \
+ icnt += d[dcnt].repeat ? 1 : d[dcnt].cnt; \
dcnt++; \
limit = ((BUN) d[dcnt].cnt) << rpp; \
} \
if (!d[dcnt].repeat) { \
limit = (BUN) 1 << rpp; \
l = icnt + d[dcnt].cnt; \
- while ((i+limit+off) <= (o+pr_off)) { \
+ while (i + limit + off <= o + pr_off) { \
icnt++; \
i += limit; \
} \
for (; \
- icnt < l && (i+off < w+pr_off); \
+ icnt < l && i + off < w + pr_off; \
icnt++) { \
impscheck(CAND,TEST,ADD); \
i += limit; \
@@ -295,10 +297,10 @@ do {
\
} while (0)
#define quickins(dst, cnt, o, bn) \
- do{ \
+ do { \
assert((cnt) < BATcapacity(bn)); \
dst[cnt] = (o); \
- } while(0)
+ } while (0)
/* construct the mask */
#define impsmask(CAND,TEST,B) \
@@ -310,13 +312,13 @@ do {
\
imprints->bins, tl); \
hbin = IMPSgetbin(ATOMstorage(b->ttype), imprints->bits, \
imprints->bins, th); \
- /* note: (1<<n)-1 gives a sequence o n one bits */ \
+ /* note: (1<<n)-1 gives a sequence of n one bits */ \
/* to set bits hbin..lbin inclusive, we would do: */ \
/* mask = ((1 << (hbin + 1)) - 1) - ((1 << lbin) - 1); */ \
/* except ((1 << (hbin + 1)) - 1) is not defined if */ \
/* hbin == sizeof(uint##B##_t)*8 - 1 */ \
/* the following does work, however */ \
- mask = (((((uint##B##_t) 1 << hbin) - 1) << 1) | 1) - (((uint##B##_t) 1
<< lbin) - 1); \
+ mask = (((((uint##B##_t) 1 << hbin) - 1) << 1) | 1) - (((uint##B##_t) 1
<< lbin) - 1); \
innermask = mask; \
if (!b->T->nonil || vl != minval) \
innermask = IMPSunsetBit(B, innermask, lbin); \
@@ -350,25 +352,25 @@ do {
\
s && BATtdense(s) ? "(dense)" : "", \
anti, #TEST); \
switch (imprints->bits) { \
- case 8: impsmask(CAND,TEST,8); break; \
- case 16: impsmask(CAND,TEST,16); break; \
- case 32: impsmask(CAND,TEST,32); break; \
- case 64: impsmask(CAND,TEST,64); break; \
- default: assert(0); break; \
+ case 8: impsmask(CAND,TEST,8); break; \
+ case 16: impsmask(CAND,TEST,16); break; \
+ case 32: impsmask(CAND,TEST,32); break; \
+ case 64: impsmask(CAND,TEST,64); break; \
+ default: assert(0); break; \
} \
} while (0)
/* scan select without imprints */
/* core scan select loop with & without candidates */
-#define scanloop(CAND,TEST) \
+#define scanloop(NAME,CAND,TEST) \
do { \
ALGODEBUG fprintf(stderr, \
"#BATsubselect(b=%s#"BUNFMT",s=%s%s,anti=%d): " \
- "scanselect %s\n", BATgetId(b), BATcount(b), \
+ "%s %s\n", BATgetId(b), BATcount(b), \
s ? BATgetId(s) : "NULL", \
s && BATtdense(s) ? "(dense)" : "", \
- anti, #TEST); \
+ anti, #NAME, #TEST); \
if (BATcapacity(bn) < maximum) { \
while (p < q) { \
CAND; \
@@ -429,13 +431,13 @@ do {
\
#define MAXVALUEflt GDK_flt_max
#define MAXVALUEdbl GDK_dbl_max
-#define choose(CAND, TEST) \
- do { \
- if (use_imprints) { \
- bitswitch(CAND, TEST); \
- } else { \
- scanloop(CAND, TEST); \
- } \
+#define choose(NAME, CAND, TEST) \
+ do { \
+ if (use_imprints) { \
+ bitswitch(CAND, TEST); \
+ } else { \
+ scanloop(NAME, CAND, TEST); \
+ } \
} while (0)
/* definition of type-specific core scan select function */
@@ -474,19 +476,19 @@ NAME##_##TYPE (BAT *b, BAT *s, BAT *bn,
END; \
if (equi) { \
assert(!use_imprints); \
- scanloop(CAND, v == vl); \
+ scanloop(NAME, CAND, v == vl); \
} else if (anti) { \
if (b->T->nonil) { \
- choose(CAND,(v <= vl || v >= vh)); \
+ choose(NAME,CAND,(v <= vl || v >= vh)); \
} else { \
- choose(CAND,(v <= vl || v >= vh) && v != nil); \
+ choose(NAME,CAND,(v <= vl || v >= vh) && v != nil); \
} \
} else if (b->T->nonil && vl == minval) { \
- choose(CAND,v <= vh); \
+ choose(NAME,CAND,v <= vh); \
} else if (vh == maxval) { \
- choose(CAND,v >= vl); \
+ choose(NAME,CAND,v >= vl); \
} else { \
- choose(CAND,v >= vl && v <= vh); \
+ choose(NAME,CAND,v >= vl && v <= vh); \
} \
return cnt; \
}
@@ -510,7 +512,7 @@ candscan_any (BAT *b, BAT *s, BAT *bn, c
if (equi) {
ALGODEBUG fprintf(stderr,
"#BATsubselect(b=%s#"BUNFMT",s=%s%s,anti=%d):
"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list