Changeset: 0960327203eb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0960327203eb
Modified Files:
gdk/gdk_analytic.h
Branch: Dec2025
Log Message:
Layout.
diffs (64 lines):
diff --git a/gdk/gdk_analytic.h b/gdk/gdk_analytic.h
--- a/gdk/gdk_analytic.h
+++ b/gdk/gdk_analytic.h
@@ -69,26 +69,32 @@ gdk_export BAT *GDKanalytical_covariance
gdk_export BAT *GDKanalytical_correlation(BAT *p, BAT *o, BAT *b1, BAT *b2,
BAT *s, BAT *e, int tpe, int frame_type)
__attribute__((__warn_unused_result__));
-#define SEGMENT_TREE_FANOUT 16 /* Segment tree fanout size. Later we could do
experiments from it */
-#define NOTHING /* used for not used optional arguments for aggregate
computation */
+/* Segment tree fanout size. Later we could do experiments from it */
+#define SEGMENT_TREE_FANOUT 16
+/* used for unused arguments for aggregate computation */
+#define NOTHING
#define NOTHING_ARGS(...) ((void) 0)
-/* 'segment_tree' is the tree as an array, 'levels_offset' contains the
offsets in the tree where each level does start,
- and 'nlevels' is the number of levels on the current segment tree.
- In order to run in out-of-memory situations they are allocated inside a
BAT. The 'levels_offset' are allocated after
- the segment tree. The beginning pointers for both are returned. */
+/* 'segment_tree' is the tree as an array, 'levels_offset' contains the
+ * offsets in the tree where each level starts, and 'nlevels' is the
+ * number of levels on the current segment tree. In order to run in
+ * out-of-memory situations they are allocated inside a BAT. The
+ * 'levels_offset' are allocated after the segment tree. The beginning
+ * pointers for both are returned. */
gdk_export BAT *GDKinitialize_segment_tree(void)
__attribute__((__warn_unused_result__));
gdk_export gdk_return GDKrebuild_segment_tree(oid ncount, oid data_size, BAT
*st, void **segment_tree, oid **levels_offset, oid *nlevels);
-/* segment_tree, levels_offset and nlevels must be already defined. ARG1, ARG2
and ARG3 are to be used by the aggregate */
+/* segment_tree, levels_offset and nlevels must be already
+ * defined. ARG1, ARG2 and ARG3 are to be used by the aggregate */
#define populate_segment_tree(CAST, COUNT, INIT_AGGREGATE, COMPUTE_LEVEL0,
COMPUTE_LEVELN, COMPUTE_LEVELN_FINISH, ARG1, ARG2, ARG3) \
do { \
CAST *ctree = (CAST *) segment_tree; \
CAST *prev_level_begin = ctree; \
oid level_size = COUNT, tree_offset = 0, current_level = 0; \
\
- levels_offset[current_level++] = 0; /* first level is trivial
*/ \
+ /* first level is trivial */ \
+ levels_offset[current_level++] = 0; \
for (oid pos = 0; pos < level_size; pos += SEGMENT_TREE_FANOUT)
{ \
oid end = MIN(level_size, pos + SEGMENT_TREE_FANOUT); \
\
@@ -99,7 +105,8 @@ gdk_export gdk_return GDKrebuild_segment
} \
} \
\
- while (current_level < nlevels) { /* for the following levels
we have to use the previous level results */ \
+ /* for the following levels we have to use the previous level
results */ \
+ while (current_level < nlevels) { \
oid prev_tree_offset = tree_offset; \
levels_offset[current_level++] = tree_offset; \
for (oid pos = 0; pos < level_size; pos +=
SEGMENT_TREE_FANOUT) { \
@@ -118,7 +125,8 @@ gdk_export gdk_return GDKrebuild_segment
} while (0)
#define compute_on_segment_tree(CAST, START, END, INIT_AGGREGATE, COMPUTE,
FINALIZE_AGGREGATE, ARG1, ARG2, ARG3) \
- do { /* taken from https://www.vldb.org/pvldb/vol8/p1058-leis.pdf */ \
+ do { \
+ /* taken from https://www.vldb.org/pvldb/vol8/p1058-leis.pdf */
\
oid begin = START, tend = END; \
CAST computed; \
INIT_AGGREGATE(ARG1, ARG2, ARG3); \
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]