Changeset: f6d6d157e81e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6d6d157e81e
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geomBulk.c
Branch: sfcgal
Log Message:
Remove the properties set when the BAT was empty and then derive trivial
properties. BATderiveprops will soon be gone.
diffs (245 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -6285,7 +6285,8 @@ pnpoly(int *out, int nvert, dbl *vx, dbl
}
BATsetcount(bo, cnt);
- BATderiveProps(bo, FALSE);
+ BATrmprops(bo)
+ BATsettrivprop(bo);
BBPunfix(bpx->batCacheid);
BBPunfix(bpy->batCacheid);
BBPkeepref(*out = bo->batCacheid);
@@ -6372,7 +6373,8 @@ pnpolyWithHoles(bat *out, int nvert, dbl
*cs++ = wn & 1;
}
BATsetcount(bo, cnt);
- BATderiveProps(bo, FALSE);
+ BATrmprops(bo)
+ BATsettrivprop(bo);
BBPunfix(bpx->batCacheid);
BBPunfix(bpy->batCacheid);
BBPkeepref(*out = bo->batCacheid);
@@ -6733,8 +6735,10 @@ Intersectssubjoin_intern(bat *lres, bat
}
GDKfree(rGeometries);
}
- BATderiveProps(xl, FALSE);
- BATderiveProps(xr, FALSE);
+ BATrmprops(xl)
+ BATsettrivprop(xl);
+ BATrmprops(xr)
+ BATsettrivprop(xr);
BBPunfix(*lid);
BBPunfix(*rid);
BBPkeepref(*lres = xl->batCacheid);
diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h
--- a/geom/monetdb5/geom.h
+++ b/geom/monetdb5/geom.h
@@ -38,6 +38,12 @@
#define geom_export extern
#endif
+#define BATrmprops(b) \
+ b->tsorted = b->trevsorted = 0; \
+ b->tnosorted = b->tnorevsorted = 1; \
+ b->tkey |= 0; \
+ b->tnokey[0] = b->tnokey[1] = 1; \
+ b->tnodense = 1;
/* general functions */
geom_export str geoHasZ(int* res, int* info);
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -14,8 +14,8 @@
#include <omp.h>
#define GEOMBULK_DEBUG 0
-#define OPENCL_DYNAMIC 0
-#define OPENCL_THREADS 1
+#define OPENCL_DYNAMIC 1
+#define OPENCL_THREADS 8
/*******************************/
/********** One input **********/
@@ -104,7 +104,8 @@ geom_2_geom_bat(bat *outBAT_id, bat *inB
#endif
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -225,8 +226,8 @@ wkbCoordinateFromMBR_bat(bat *outBAT_id,
//set some properties of the new BAT
BATsetcount(outBAT, BATcount(inBAT));
+ BATrmprops(outBAT)
BATsettrivprop(outBAT);
- //BATderiveProps(outBAT, FALSE);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -360,7 +361,8 @@ WKBtoDBL_bat(bat *outBAT_id, bat *inBAT_
}
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -461,7 +463,8 @@ WKBtoWKB_bat(bat *outBAT_id, bat *inBAT_
//set the number of elements in the outBAT
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -566,7 +569,8 @@ WKBtoWKBflagINT_bat(bat *outBAT_id, bat
#endif
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -651,7 +655,8 @@ WKBtoBIT_bat(bat *outBAT_id, bat *inBAT_
}
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -765,7 +770,8 @@ WKBWKBtoBIT_bat(bat *outBAT_id, bat *aBA
}
BATsetcount(outBAT, q);
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -897,7 +903,8 @@ WKBtoBITxyzDBL_bat(bat *outBAT_id, bat *
}
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -977,7 +984,8 @@ WKBtoINT_bat(bat *outBAT_id, bat *inBAT_
}
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -1065,7 +1073,8 @@ WKBtoINTflagINT_bat(bat *outBAT_id, bat
//set the number of elements in the outBAT
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -1151,7 +1160,8 @@ wkbGetCoordinate_bat(bat *outBAT_id, bat
}
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -1298,7 +1308,8 @@ WKBtoWKBxyzDBL_bat(bat *outBAT_id, bat *
#endif
BATsetcount(outBAT, BATcount(inBAT));
- BATderiveProps(outBAT, FALSE);
+ BATrmprops(outBAT)
+ BATsettrivprop(outBAT);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -1538,8 +1549,8 @@ wkbFromWKB_bat(bat *outBAT_id, bat *inBA
//set some properties of the new BAT
BATsetcount(outBAT, BATcount(inBAT));
+ BATrmprops(outBAT)
BATsettrivprop(outBAT);
- BATderiveProps(outBAT, FALSE);
BBPunfix(inBAT->batCacheid);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
@@ -1881,12 +1892,15 @@ wkbDump_bat(bat *parentBAT_id, bat *idBA
/*Set counts*/
BATsetcount(idBAT, geometriesCnt);
- BATderiveProps(idBAT, FALSE);
+ BATrmprops(idBAT)
+ BATsettrivprop(idBAT);
BATsetcount(geomBAT, geometriesCnt);
- BATderiveProps(geomBAT, FALSE);
+ BATrmprops(geomBAT)
+ BATsettrivprop(geomBAT);
if (inParentBAT_id) {
BATsetcount(parentBAT, geometriesCnt);
- BATderiveProps(parentBAT, FALSE);
+ BATrmprops(parentBAT)
+ BATsettrivprop(parentBAT);
}
/*Keep refs for output BATs*/
@@ -1968,11 +1982,9 @@ wkbFilter_bat(bat *aBATfiltered_id, bat
//set some properties of the new BATs
BATsetcount(aBATfiltered, remainingElements);
BATsettrivprop(aBATfiltered);
- BATderiveProps(aBATfiltered, FALSE);
BATsetcount(bBATfiltered, remainingElements);
BATsettrivprop(bBATfiltered);
- BATderiveProps(bBATfiltered, FALSE);
BBPunfix(aBAT->batCacheid);
BBPunfix(bBAT->batCacheid);
@@ -2054,7 +2066,6 @@ wkbFilter_geom_bat(bat *BATfiltered_id,
//set some properties of the new BATs
BATsetcount(BATfiltered, remainingElements);
BATsettrivprop(BATfiltered);
- BATderiveProps(BATfiltered, FALSE);
BBPunfix(BAToriginal->batCacheid);
BBPkeepref(*BATfiltered_id = BATfiltered->batCacheid);
@@ -2110,8 +2121,8 @@ wkbMBR_bat(bat *outBAT_id, bat *inBAT_id
//set some properties of the new BAT
BATsetcount(outBAT, BATcount(inBAT));
+ BATrmprops(outBAT)
BATsettrivprop(outBAT);
- BATderiveProps(outBAT, FALSE);
BBPunfix(inBAT->batCacheid);
BBPkeepref(*outBAT_id = outBAT->batCacheid);
return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list