Changeset: 18c74cff9f26 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=18c74cff9f26
Modified Files:
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/bat5.h
monetdb5/modules/kernel/batcolor.c
monetdb5/modules/kernel/batcolor.h
monetdb5/modules/kernel/batmmath.c
monetdb5/modules/kernel/batmmath.h
monetdb5/modules/kernel/batstr.c
monetdb5/modules/kernel/batstr.h
monetdb5/modules/kernel/mmath.c
monetdb5/modules/kernel/mmath.h
Branch: default
Log Message:
More typos...and build failure
The previous checkins were not validated properly.
The last fixes will come in a few hours.
diffs (truncated from 577 to 300 lines):
diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c
--- a/monetdb5/modules/kernel/bat5.c
+++ b/monetdb5/modules/kernel/bat5.c
@@ -2151,6 +2151,20 @@ BKCsetHash(bit *ret, int *bid, bit *prop
}
str
+BKCsetSequenceBase(int *r, int *bid, oid *o)
+{
+ BAT *b;
+
+ if ((b = BATdescriptor(*bid)) == NULL) {
+ throw(MAL, "bat.setSequenceBase", RUNTIME_OBJECT_MISSING);
+ }
+ BATseqbase(b, *o);
+ *r = b->batCacheid;
+ BBPkeepref(b->batCacheid);
+ return MAL_SUCCEED;
+}
+
+str
BKCsetSequenceBaseNil(int *r, int *bid, oid *o)
{
oid ov = oid_nil;
diff --git a/monetdb5/modules/kernel/bat5.h b/monetdb5/modules/kernel/bat5.h
--- a/monetdb5/modules/kernel/bat5.h
+++ b/monetdb5/modules/kernel/bat5.h
@@ -117,6 +117,7 @@ bat5_export str BKCmadvise2(bit *res, in
bat5_export str BKCaccbuild(int *ret, int *bid, str *acc, ptr *param);
bat5_export str BKCaccbuild_std(int *ret, int *bid, int *acc);
bat5_export str BKCsetHash(bit *ret, int *bid, bit *prop);
+bat5_export str BKCsetSequenceBase(int *r, int *bid, oid *o);
bat5_export str BKCsetSequenceBaseNil(int *r, int *bid, oid *o);
bat5_export str BKCgetSequenceBase(oid *r, int *bid);
bat5_export str BKCshrinkBAT(int *ret, int *bid, int *did);
diff --git a/monetdb5/modules/kernel/batcolor.c
b/monetdb5/modules/kernel/batcolor.c
--- a/monetdb5/modules/kernel/batcolor.c
+++ b/monetdb5/modules/kernel/batcolor.c
@@ -116,62 +116,62 @@ BATwalk(Luminance,CLRluminance,color,int
BATwalk(Cr,CLRcr,color,int)
BATwalk(Cb,CLRcb,color,int)
-#define BATwalk3(X1,X2,X3,X4)
-str CLRbat##X1(int *ret, int *l, int *bid2, int *bid3)
-{
- BATiter bi, b2i, b3i;
- BAT *bn, *b2,*b3, *b;
- BUN p,q,p2,p3;
- X3 *x, *x2, *x3;
- X4 y, *yp = &y;
-
- prepareOperand(b,l,"##X1");
- b2= BATdescriptor(*bid2);
- if(b2== NULL)
- throw(MAL, "batcolor.##X1",RUNTIME_OBJECT_MISSING);
- b3= BATdescriptor(*bid3);
- if(b3== NULL)
- throw(MAL, "batcolor.##X1",RUNTIME_OBJECT_MISSING);
- prepareResult(bn,b,getTypeIndex("##X4",-1,TYPE_int),"##X1");
-
- bi = bat_iterator(b);
- b2i = bat_iterator(b2);
- b3i = bat_iterator(b3);
-
- p2= BUNfirst(b2);
- p3= BUNfirst(b3);
- BATaccessBegin(b,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATaccessBegin(b2,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATaccessBegin(b3,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATloop(b, p, q) {
- ptr h = BUNhead(bi,p);
- x= (X3 *) BUNtail(bi,p);
- x2= (X3 *) BUNtail(b2i,p);
- x3= (X3 *) BUNtail(b3i,p);
- if (x== 0 || *x == X3##_nil ||
- x2== 0 || *x2 == X3##_nil ||
- x3== 0 || *x3 == @3_nil) {
- y = X4##_nil;
- bn->T->nonil = 0;
- } else
- X2(yp,x,x2,x3);
- bunfastins(bn, h, yp);
- p2++;
- p3++;
- }
- BATaccessEnd(b,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATaccessEnd(b2,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATaccessEnd(b3,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- bn->H->nonil = b->H->nonil;
- finalizeResult(ret,bn,b);
- return MAL_SUCCEED;
-bunins_failed:
- BATaccessEnd(b,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATaccessEnd(b2,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BATaccessEnd(b3,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);
- BBPreleaseref(b->batCacheid);
- BBPreleaseref(bn->batCacheid);
- throw(MAL, "batstr.==", OPERATION_FAILED " During bulk operation");
+#define BATwalk3(X1,X2,X3,X4)\
+str CLRbat##X1(int *ret, int *l, int *bid2, int *bid3)\
+{ \
+ BATiter bi, b2i, b3i;\
+ BAT *bn, *b2,*b3, *b;\
+ BUN p,q,p2,p3;\
+ X3 *x, *x2, *x3;\
+ X4 y, *yp = &y;\
+\
+ prepareOperand(b,l,"##X1");\
+ b2= BATdescriptor(*bid2);\
+ if(b2== NULL) \
+ throw(MAL, "batcolor.##X1",RUNTIME_OBJECT_MISSING);\
+ b3= BATdescriptor(*bid3);\
+ if(b3== NULL) \
+ throw(MAL, "batcolor.##X1",RUNTIME_OBJECT_MISSING);\
+ prepareResult(bn,b,getTypeIndex("##X4",-1,TYPE_int),"##X1");\
+\
+ bi = bat_iterator(b);\
+ b2i = bat_iterator(b2);\
+ b3i = bat_iterator(b3);\
+\
+ p2= BUNfirst(b2);\
+ p3= BUNfirst(b3);\
+ BATaccessBegin(b,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATaccessBegin(b2,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATaccessBegin(b3,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATloop(b, p, q) {\
+ ptr h = BUNhead(bi,p);\
+ x= (X3 *) BUNtail(bi,p);\
+ x2= (X3 *) BUNtail(b2i,p);\
+ x3= (X3 *) BUNtail(b3i,p);\
+ if (x== 0 || *x == X3##_nil ||\
+ x2== 0 || *x2 == X3##_nil ||\
+ x3== 0 || *x3 == X3##_nil) {\
+ y = X4##_nil;\
+ bn->T->nonil = 0;\
+ } else \
+ X2(yp,x,x2,x3);\
+ bunfastins(bn, h, yp);\
+ p2++;\
+ p3++;\
+ }\
+ BATaccessEnd(b,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATaccessEnd(b2,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATaccessEnd(b3,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ bn->H->nonil = b->H->nonil;\
+ finalizeResult(ret,bn,b);\
+ return MAL_SUCCEED;\
+bunins_failed:\
+ BATaccessEnd(b,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATaccessEnd(b2,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BATaccessEnd(b3,USE_HEAD|USE_TAIL,MMAP_SEQUENTIAL);\
+ BBPreleaseref(b->batCacheid);\
+ BBPreleaseref(bn->batCacheid);\
+ throw(MAL, "batstr.==", OPERATION_FAILED " During bulk operation");\
}
BATwalk3(Hsv,CLRhsv,flt,color)
diff --git a/monetdb5/modules/kernel/batcolor.h
b/monetdb5/modules/kernel/batcolor.h
--- a/monetdb5/modules/kernel/batcolor.h
+++ b/monetdb5/modules/kernel/batcolor.h
@@ -50,6 +50,7 @@ batcolor_export str CLRbatGreen(int *ret
batcolor_export str CLRbatBlue(int *ret, int *l);
batcolor_export str CLRbatSaturation(int *ret, int *l);
batcolor_export str CLRbatValue(int *ret, int *l);
+batcolor_export str CLRbatHue(int *ret, int *l);
batcolor_export str CLRbatHueInt(int *ret, int *l);
batcolor_export str CLRbatSaturationInt(int *ret, int *l);
batcolor_export str CLRbatValueInt(int *ret, int *l);
diff --git a/monetdb5/modules/kernel/batmmath.c
b/monetdb5/modules/kernel/batmmath.c
--- a/monetdb5/modules/kernel/batmmath.c
+++ b/monetdb5/modules/kernel/batmmath.c
@@ -48,12 +48,10 @@ str CMDscience_bat_##X2##_##X1(int *ret,
{\
BAT *b,*bn;\
X2 *o, *p, *q;\
-\
- if ((b = BATdescriptor(*bid)) == NULL) {
- throw(MAL, X3, RUNTIME_OBJECT_MISSING);
- }
- voidresultBAT(TYPE_##X2,"batcalc.##X1")\
-\
+ if ((b = BATdescriptor(*bid)) == NULL) {\
+ throw(MAL, "##X2", RUNTIME_OBJECT_MISSING);\
+ }\
+ voidresultBAT(TYPE_##X2,"batcalc.##X1"); \
o = (X2*) Tloc(bn, BUNfirst(bn));\
p = (X2*) Tloc(b, BUNfirst(b));\
q = (X2*) Tloc(b, BUNlast(b));\
@@ -71,9 +69,7 @@ str CMDscience_bat_##X2##_##X1(int *ret,
bn->tsorted = 0;\
bn->trevsorted = 0;\
BATkey(BATmirror(bn),0); \
- \
if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ); \
-\
if (b->htype != bn->htype) {\
BAT *r = VIEWcreate(b,bn);\
\
@@ -91,11 +87,10 @@ str CMDscience_bat_cst_##X1##_##X2(int *
BAT *b,*bn;\
X2 *o, *p, *q;\
\
- if ((b = BATdescriptor(*bid)) == NULL) {
- throw(MAL, X3, RUNTIME_OBJECT_MISSING);
- }
+ if ((b = BATdescriptor(*bid)) == NULL) {\
+ throw(MAL, "##X2", RUNTIME_OBJECT_MISSING);\
+ }\
voidresultBAT(TYPE_##X2,"batcalc.##X1")\
-\
o = (X2*) Tloc(bn, BUNfirst(bn));\
p = (X2*) Tloc(b, BUNfirst(b));\
q = (X2*) Tloc(b, BUNlast(b));\
@@ -130,7 +125,7 @@ str CMDscience_bat_cst_##X1##_##X2(int *
#define scienceImpl(Operator)\
scienceFcnImpl(Operator,dbl,)\
-scienceFcnImpl(Operator,flt,f)
+scienceFcnImpl(Operator,flt,)
scienceImpl(asin)
scienceImpl(acos)
diff --git a/monetdb5/modules/kernel/batmmath.h
b/monetdb5/modules/kernel/batmmath.h
--- a/monetdb5/modules/kernel/batmmath.h
+++ b/monetdb5/modules/kernel/batmmath.h
@@ -16,13 +16,12 @@
* Copyright August 2008-2012 MonetDB B.V.
* All Rights Reserved.
*/
-#ifdef _BATMATH_H
+#ifndef _BATMATH_H
#define _BATMATH_H
#include "monetdb_config.h"
#include "gdk.h"
#include "math.h"
#include "mal_exception.h"
-#include "batmmath.h"
#ifdef WIN32
#if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) &&
!defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) &&
!defined(LIBMONETDB5)
@@ -40,9 +39,9 @@
#define degreesf(x) ((flt) degrees(x))
-#define scienceDef(Oper)\
-batmmath_export str CMDscience_bat_dbl_##Oper(int *ret, int *bid);\
-batmmath_export str CMDscience_bat_flt_##Oper(int *ret, int *bid);
+#define scienceDef(X1)\
+batmmath_export str CMDscience_bat_dbl_##X1(int *ret, int *bid);\
+batmmath_export str CMDscience_bat_flt_##X1(int *ret, int *bid);
scienceDef(asin)
scienceDef(acos)
@@ -63,8 +62,8 @@ scienceDef(ceil)
scienceDef(fabs)
scienceDef(floor)
-batmmath_export str CMDscience_bat_cst_atan2_dbl(int *ret, int *bid, @2 *d);
-batmmath_export str CMDscience_bat_cst_atan2_dbl(int *ret, int *bid, @2 *d);
-batmmath_export str CMDscience_bat_cst_pow_dbl(int *ret, int *bid, @2 *d);
-batmmath_export str CMDscience_bat_cst_pow_flt(int *ret, int *bid, @2 *d);
+batmmath_export str CMDscience_bat_cst_atan2_dbl(int *ret, int *bid, dbl *d);
+batmmath_export str CMDscience_bat_cst_atan2_flt(int *ret, int *bid, flt *d);
+batmmath_export str CMDscience_bat_cst_pow_dbl(int *ret, int *bid, dbl *d);
+batmmath_export str CMDscience_bat_cst_pow_flt(int *ret, int *bid, flt *d);
#endif /* _BATMATH_H */
diff --git a/monetdb5/modules/kernel/batstr.c b/monetdb5/modules/kernel/batstr.c
--- a/monetdb5/modules/kernel/batstr.c
+++ b/monetdb5/modules/kernel/batstr.c
@@ -30,6 +30,7 @@
* are limited to :void, which can be cheaply realized using
* the GRPsplit operation.
*/
+#include "batstr.h"
#define prepareOperand(X,Y,Z) \
if( (X= BATdescriptor(*Y)) == NULL ) \
@@ -127,7 +128,7 @@ str STRbatstringLength(int *ret, int *l)
y= int_nil;
bn->T->nonil = 0;
} else
- @2(yp,x);
+ strSQLLength(yp,x);
bunfastins(bn, h, yp);
}
BATaccessEnd(b, USE_HEAD|USE_TAIL, MMAP_SEQUENTIAL);
@@ -500,7 +501,7 @@ bunins_failed:
throw(MAL, "batstr." "suffix", OPERATION_FAILED " During bulk
operation");
}
-str STRbatSuffixcst(int *ret, int *l, int *cst)
+str STRbatSuffixcst(int *ret, int *l, str *cst)
{
BATiter lefti;
BAT *bn, *left;
@@ -531,7 +532,7 @@ bunins_failed:
throw(MAL, "batstr""suffix", OPERATION_FAILED " During bulk operation");
}
-str STRcstSuffixbat(int *ret, int *cst, int *r)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list