Changeset: d31a08b8785c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d31a08b8785c Modified Files: gdk/gdk_calc.c gdk/gdk_calc_compare.h Branch: default Log Message:
Reduce number of values we have to define. diffs (276 lines): diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -12415,13 +12415,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop lt_typeswitchloop #define BATcalcop_intern BATcalclt_intern #define BATcalcop BATcalclt -#define BATcalcop_name "BATcalclt" #define BATcalcopcst BATcalcltcst -#define BATcalcopcst_name "BATcalcltcst" #define BATcalccstop BATcalccstlt -#define BATcalccstop_name "BATcalccstlt" #define VARcalcop VARcalclt -#define VARcalcop_name "VARcalclt" #include "gdk_calc_compare.h" @@ -12429,13 +12425,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name /* ---------------------------------------------------------------------- */ /* greater than (any "linear" type) */ @@ -12444,13 +12436,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop gt_typeswitchloop #define BATcalcop_intern BATcalcgt_intern #define BATcalcop BATcalcgt -#define BATcalcop_name "BATcalcgt" #define BATcalcopcst BATcalcgtcst -#define BATcalcopcst_name "BATcalcgtcst" #define BATcalccstop BATcalccstgt -#define BATcalccstop_name "BATcalccstgt" #define VARcalcop VARcalcgt -#define VARcalcop_name "VARcalclt" #include "gdk_calc_compare.h" @@ -12458,13 +12446,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name /* ---------------------------------------------------------------------- */ /* less than or equal (any "linear" type) */ @@ -12475,13 +12459,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop le_typeswitchloop #define BATcalcop_intern BATcalcle_intern #define BATcalcop BATcalcle -#define BATcalcop_name "BATcalcle" #define BATcalcopcst BATcalclecst -#define BATcalcopcst_name "BATcalclecst" #define BATcalccstop BATcalccstle -#define BATcalccstop_name "BATcalccstle" #define VARcalcop VARcalcle -#define VARcalcop_name "VARcalcle" #include "gdk_calc_compare.h" @@ -12489,13 +12469,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name /* ---------------------------------------------------------------------- */ /* greater than or equal (any "linear" type) */ @@ -12506,13 +12482,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop ge_typeswitchloop #define BATcalcop_intern BATcalcge_intern #define BATcalcop BATcalcge -#define BATcalcop_name "BATcalcge" #define BATcalcopcst BATcalcgecst -#define BATcalcopcst_name "BATcalcgecst" #define BATcalccstop BATcalccstge -#define BATcalccstop_name "BATcalccstge" #define VARcalcop VARcalcge -#define VARcalcop_name "VARcalcge" #include "gdk_calc_compare.h" @@ -12520,13 +12492,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name /* ---------------------------------------------------------------------- */ /* equal (any type) */ @@ -12537,13 +12505,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop eq_typeswitchloop #define BATcalcop_intern BATcalceq_intern #define BATcalcop BATcalceq -#define BATcalcop_name "BATcalceq" #define BATcalcopcst BATcalceqcst -#define BATcalcopcst_name "BATcalceqcst" #define BATcalccstop BATcalccsteq -#define BATcalccstop_name "BATcalccsteq" #define VARcalcop VARcalceq -#define VARcalcop_name "VARcalceq" #include "gdk_calc_compare.h" @@ -12551,13 +12515,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name /* ---------------------------------------------------------------------- */ /* not equal (any type) */ @@ -12568,13 +12528,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop ne_typeswitchloop #define BATcalcop_intern BATcalcne_intern #define BATcalcop BATcalcne -#define BATcalcop_name "BATcalcne" #define BATcalcopcst BATcalcnecst -#define BATcalcopcst_name "BATcalcnecst" #define BATcalccstop BATcalccstne -#define BATcalccstop_name "BATcalccstne" #define VARcalcop VARcalcne -#define VARcalcop_name "VARcalcne" #include "gdk_calc_compare.h" @@ -12582,13 +12538,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name #undef TYPE_TPE #undef TPE @@ -12608,13 +12560,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #define op_typeswitchloop cmp_typeswitchloop #define BATcalcop_intern BATcalccmp_intern #define BATcalcop BATcalccmp -#define BATcalcop_name "BATcalccmp" #define BATcalcopcst BATcalccmpcst -#define BATcalcopcst_name "BATcalccmpcst" #define BATcalccstop BATcalccstcmp -#define BATcalccstop_name "BATcalccstcmp" #define VARcalcop VARcalccmp -#define VARcalcop_name "VARcalccmp" #include "gdk_calc_compare.h" @@ -12622,13 +12570,9 @@ VARcalcrsh(ValPtr ret, const ValRecord * #undef op_typeswitchloop #undef BATcalcop_intern #undef BATcalcop -#undef BATcalcop_name #undef BATcalcopcst -#undef BATcalcopcst_name #undef BATcalccstop -#undef BATcalccstop_name #undef VARcalcop -#undef VARcalcop_name #undef TYPE_TPE #undef TPE diff --git a/gdk/gdk_calc_compare.h b/gdk/gdk_calc_compare.h --- a/gdk/gdk_calc_compare.h +++ b/gdk/gdk_calc_compare.h @@ -629,10 +629,10 @@ BATcalcop(BAT *b1, BAT *b2, BAT *s) BUN start, end, cnt; const oid *restrict cand = NULL, *candend = NULL; - BATcheck(b1, BATcalcop_name, NULL); - BATcheck(b2, BATcalcop_name, NULL); + BATcheck(b1, __func__, NULL); + BATcheck(b2, __func__, NULL); - if (checkbats(b1, b2, BATcalcop_name) != GDK_SUCCEED) + if (checkbats(b1, b2, __func__) != GDK_SUCCEED) return NULL; CANDINIT(b1, s, start, end, cnt, cand, candend); @@ -658,7 +658,7 @@ BATcalcop(BAT *b1, BAT *b2, BAT *s) b2->T->width, cnt, start, end, cand, candend, b1->hseqbase, cand == NULL && b1->T->nonil && b2->T->nonil, - b1->H->seq, BATcalcop_name); + b1->H->seq, __func__); return bn; } @@ -670,9 +670,9 @@ BATcalcopcst(BAT *b, const ValRecord *v, BUN start, end, cnt; const oid *restrict cand = NULL, *candend = NULL; - BATcheck(b, BATcalcopcst_name, NULL); + BATcheck(b, __func__, NULL); - if (checkbats(b, NULL, BATcalcopcst_name) != GDK_SUCCEED) + if (checkbats(b, NULL, __func__) != GDK_SUCCEED) return NULL; CANDINIT(b, s, start, end, cnt, cand, candend); @@ -684,7 +684,7 @@ BATcalcopcst(BAT *b, const ValRecord *v, NULL, 0, cnt, start, end, cand, candend, b->hseqbase, cand == NULL && b->T->nonil && ATOMcmp(v->vtype, VALptr(v), ATOMnilptr(v->vtype)) != 0, - b->H->seq, BATcalcopcst_name); + b->H->seq, __func__); return bn; } @@ -696,9 +696,9 @@ BATcalccstop(const ValRecord *v, BAT *b, BUN start, end, cnt; const oid *restrict cand = NULL, *candend = NULL; - BATcheck(b, BATcalccstop_name, NULL); + BATcheck(b, __func__, NULL); - if (checkbats(b, NULL, BATcalccstop_name) != GDK_SUCCEED) + if (checkbats(b, NULL, __func__) != GDK_SUCCEED) return NULL; CANDINIT(b, s, start, end, cnt, cand, candend); @@ -710,7 +710,7 @@ BATcalccstop(const ValRecord *v, BAT *b, b->T->width, cnt, start, end, cand, candend, b->hseqbase, cand == NULL && b->T->nonil && ATOMcmp(v->vtype, VALptr(v), ATOMnilptr(v->vtype)) != 0, - b->H->seq, BATcalccstop_name); + b->H->seq, __func__); return bn; } @@ -722,7 +722,7 @@ VARcalcop(ValPtr ret, const ValRecord *l if (op_typeswitchloop(VALptr(lft), ATOMbasetype(lft->vtype), 0, NULL, 0, VALptr(rgt), ATOMbasetype(rgt->vtype), 0, NULL, 0, VALget(ret), 1, 0, 1, NULL, NULL, 0, 0, - VARcalcop_name) == BUN_NONE) + __func__) == BUN_NONE) return GDK_FAIL; return GDK_SUCCEED; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list