Changeset: 2e39b00ba6d8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2e39b00ba6d8
Branch: default
Log Message:

Merge branch 'Sep2022' into 'default'


diffs (truncated from 11998 to 300 lines):

diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt
--- a/gdk/CMakeLists.txt
+++ b/gdk/CMakeLists.txt
@@ -39,9 +39,13 @@ add_library(bat SHARED)
 target_sources(bat
   PRIVATE
   gdk_select.c
+  gdk_calc_compare_eq.c gdk_calc_compare_ne.c
   gdk_calc.c gdk_calc.h
-  gdk_calc_addsub.c gdk_calc_muldiv.c gdk_calc_convert.c gdk_calc_compare.c
-  gdk_calc_compare.h gdk_calc_private.h
+  gdk_calc_addsub.c gdk_calc_mul.c gdk_calc_div.c gdk_calc_mod.c 
gdk_calc_convert.c
+  gdk_calc_compare_lt.c gdk_calc_compare_gt.c
+  gdk_calc_compare_le.c gdk_calc_compare_ge.c
+  gdk_calc_compare_generic.c
+  gdk_calc.c gdk_calc.h
   gdk_ssort.c gdk_ssort_impl.h
   gdk_aggr.c
   gdk_batop.c
diff --git a/gdk/gdk_calc_compare.c b/gdk/gdk_calc_compare.c
deleted file mode 100644
--- a/gdk/gdk_calc_compare.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0.  If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V.
- */
-
-#include "monetdb_config.h"
-#include "gdk.h"
-#include "gdk_private.h"
-#include "gdk_calc_private.h"
-
-/* ---------------------------------------------------------------------- */
-/* less than (any "linear" type) */
-
-/* these three are for all simple comparisons (6 in all) */
-#define TYPE_TPE               TYPE_bit
-#define TPE                    bit
-#define TPE_nil                        bit_nil
-#define is_TPE_nil             is_bit_nil
-
-#define OP                     LT
-#define op_typeswitchloop      lt_typeswitchloop
-#define BATcalcop_intern       BATcalclt_intern
-#define BATcalcop              BATcalclt
-#define BATcalcopcst           BATcalcltcst
-#define BATcalccstop           BATcalccstlt
-#define VARcalcop              VARcalclt
-
-#include "gdk_calc_compare.h"
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-/* ---------------------------------------------------------------------- */
-/* greater than (any "linear" type) */
-
-#define OP                     GT
-#define op_typeswitchloop      gt_typeswitchloop
-#define BATcalcop_intern       BATcalcgt_intern
-#define BATcalcop              BATcalcgt
-#define BATcalcopcst           BATcalcgtcst
-#define BATcalccstop           BATcalccstgt
-#define VARcalcop              VARcalcgt
-
-#include "gdk_calc_compare.h"
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-/* ---------------------------------------------------------------------- */
-/* less than or equal (any "linear" type) */
-
-#define LE(a, b)       ((bit) ((a) <= (b)))
-
-#define OP                     LE
-#define op_typeswitchloop      le_typeswitchloop
-#define BATcalcop_intern       BATcalcle_intern
-#define BATcalcop              BATcalcle
-#define BATcalcopcst           BATcalclecst
-#define BATcalccstop           BATcalccstle
-#define VARcalcop              VARcalcle
-
-#include "gdk_calc_compare.h"
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-/* ---------------------------------------------------------------------- */
-/* greater than or equal (any "linear" type) */
-
-#define GE(a, b)       ((bit) ((a) >= (b)))
-
-#define OP                     GE
-#define op_typeswitchloop      ge_typeswitchloop
-#define BATcalcop_intern       BATcalcge_intern
-#define BATcalcop              BATcalcge
-#define BATcalcopcst           BATcalcgecst
-#define BATcalccstop           BATcalccstge
-#define VARcalcop              VARcalcge
-
-#include "gdk_calc_compare.h"
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-/* ---------------------------------------------------------------------- */
-/* equal (any type) */
-
-#define EQ(a, b)       ((bit) ((a) == (b)))
-
-#define OP                     EQ
-#define op_typeswitchloop      eq_typeswitchloop
-#define BATcalcop_intern       BATcalceq_intern
-#define BATcalcop              BATcalceq
-#define BATcalcopcst           BATcalceqcst
-#define BATcalccstop           BATcalccsteq
-#define VARcalcop              VARcalceq
-
-#define NIL_MATCHES_FLAG 1
-
-#include "gdk_calc_compare.h"
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-/* ---------------------------------------------------------------------- */
-/* not equal (any type) */
-
-#define NE(a, b)       ((bit) ((a) != (b)))
-
-#define OP                     NE
-#define op_typeswitchloop      ne_typeswitchloop
-#define BATcalcop_intern       BATcalcne_intern
-#define BATcalcop              BATcalcne
-#define BATcalcopcst           BATcalcnecst
-#define BATcalccstop           BATcalccstne
-#define VARcalcop              VARcalcne
-
-#include "gdk_calc_compare.h"
-
-#undef NIL_MATCHES_FLAG
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-#undef TYPE_TPE
-#undef TPE
-#undef TPE_nil
-#undef is_TPE_nil
-
-/* ---------------------------------------------------------------------- */
-/* generic comparison (any "linear" type) */
-
-/* #define CMP(a, b)   ((bte) ((a) < (b) ? -1 : (a) > (b))) */
-#define CMP(a, b)      ((bte) (((a) > (b)) - ((a) < (b))))
-
-#define TYPE_TPE               TYPE_bte
-#define TPE                    bte
-#define TPE_nil                        bte_nil
-#define is_TPE_nil             is_bte_nil
-
-#define OP                     CMP
-#define op_typeswitchloop      cmp_typeswitchloop
-#define BATcalcop_intern       BATcalccmp_intern
-#define BATcalcop              BATcalccmp
-#define BATcalcopcst           BATcalccmpcst
-#define BATcalccstop           BATcalccstcmp
-#define VARcalcop              VARcalccmp
-
-#include "gdk_calc_compare.h"
-
-#undef OP
-#undef op_typeswitchloop
-#undef BATcalcop_intern
-#undef BATcalcop
-#undef BATcalcopcst
-#undef BATcalccstop
-#undef VARcalcop
-
-#undef TYPE_TPE
-#undef TPE
-#undef TPE_nil
-#undef is_TPE_nil
diff --git a/gdk/gdk_calc_compare_eq.c b/gdk/gdk_calc_compare_eq.c
new file mode 100644
--- /dev/null
+++ b/gdk/gdk_calc_compare_eq.c
@@ -0,0 +1,46 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V.
+ */
+
+#include "monetdb_config.h"
+#include "gdk.h"
+#include "gdk_private.h"
+#include "gdk_calc_private.h"
+
+/* these three are for all simple comparisons (6 in all) */
+#define TYPE_TPE               TYPE_bit
+#define TPE                    bit
+#define TPE_nil                        bit_nil
+#define is_TPE_nil             is_bit_nil
+
+/* ---------------------------------------------------------------------- */
+/* equal (any type) */
+
+#define EQ(a, b)       ((bit) ((a) == (b)))
+
+#define OP                     EQ
+#define op_typeswitchloop      eq_typeswitchloop
+#define BATcalcop_intern       BATcalceq_intern
+#define BATcalcop              BATcalceq
+#define BATcalcopcst           BATcalceqcst
+#define BATcalccstop           BATcalccsteq
+#define VARcalcop              VARcalceq
+
+#define NIL_MATCHES_FLAG 1
+
+#include "gdk_calc_compare.h"
+
+#undef NIL_MATCHES_FLAG
+
+#undef OP
+#undef op_typeswitchloop
+#undef BATcalcop_intern
+#undef BATcalcop
+#undef BATcalcopcst
+#undef BATcalccstop
+#undef VARcalcop
+
diff --git a/gdk/gdk_calc_compare_ge.c b/gdk/gdk_calc_compare_ge.c
new file mode 100644
--- /dev/null
+++ b/gdk/gdk_calc_compare_ge.c
@@ -0,0 +1,42 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Copyright 1997 - July 2008 CWI, August 2008 - 2022 MonetDB B.V.
+ */
+
+#include "monetdb_config.h"
+#include "gdk.h"
+#include "gdk_private.h"
+#include "gdk_calc_private.h"
+
+/* these three are for all simple comparisons (6 in all) */
+#define TYPE_TPE               TYPE_bit
+#define TPE                    bit
+#define TPE_nil                        bit_nil
+#define is_TPE_nil             is_bit_nil
+
+/* ---------------------------------------------------------------------- */
+/* greater than or equal (any "linear" type) */
+
+#define GE(a, b)       ((bit) ((a) >= (b)))
+
+#define OP                     GE
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to