Changeset: bfd4f50722f3 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/bfd4f50722f3
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
monetdb5/modules/mal/pipeline.c
sql/backends/monet5/sql_pp_statement.c
Branch: pp_hashjoin
Log Message:
removed the 'pipeline ptr' parameter from pipeline.{counter_get, done,
concat_block} functions
diffs (156 lines):
diff --git a/clients/Tests/MAL-signatures-hge.test
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -50030,7 +50030,7 @@ PPconcat_add
Add source to concat
pipeline
concat_block
-pattern pipeline.concat_block(X_0:bat[:bte], X_1:int, X_2:bit, X_3:ptr):bit
+pattern pipeline.concat_block(X_0:bat[:bte], X_1:int, X_2:bit):bit
PPconcat_block
Add source to concat
pipeline
@@ -50055,12 +50055,12 @@ PPcounter
return counter source
pipeline
counter_get
-unsafe pattern pipeline.counter_get(X_0:bat[:bte], X_1:ptr):int
+unsafe pattern pipeline.counter_get(X_0:bat[:bte]):int
PPcounter_get
return current number from the counter
pipeline
done
-unsafe pattern pipeline.done(X_0:bat[:any_1], X_1:bit, X_2:ptr):bit
+unsafe pattern pipeline.done(X_0:bat[:any_1], X_1:bit):bit
PPdone
return counter based on source, != 0 means done
pipeline
diff --git a/clients/Tests/MAL-signatures.test
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -38400,7 +38400,7 @@ PPconcat_add
Add source to concat
pipeline
concat_block
-pattern pipeline.concat_block(X_0:bat[:bte], X_1:int, X_2:bit, X_3:ptr):bit
+pattern pipeline.concat_block(X_0:bat[:bte], X_1:int, X_2:bit):bit
PPconcat_block
Add source to concat
pipeline
@@ -38425,12 +38425,12 @@ PPcounter
return counter source
pipeline
counter_get
-unsafe pattern pipeline.counter_get(X_0:bat[:bte], X_1:ptr):int
+unsafe pattern pipeline.counter_get(X_0:bat[:bte]):int
PPcounter_get
return current number from the counter
pipeline
done
-unsafe pattern pipeline.done(X_0:bat[:any_1], X_1:bit, X_2:ptr):bit
+unsafe pattern pipeline.done(X_0:bat[:any_1], X_1:bit):bit
PPdone
return counter based on source, != 0 means done
pipeline
diff --git a/monetdb5/modules/mal/pipeline.c b/monetdb5/modules/mal/pipeline.c
--- a/monetdb5/modules/mal/pipeline.c
+++ b/monetdb5/modules/mal/pipeline.c
@@ -183,8 +183,7 @@ PPcounter_get(Client cntxt, MalBlkPtr mb
(void)mb;
int *cur = getArgReference_int(stk, pci, 0);
bat cb = *getArgReference_bat(stk, pci, 1);
- Pipeline *p = (Pipeline*)*getArgReference_ptr(stk, pci, 2);
- // Pipeline *p = MT_thread_getdata();
+ Pipeline *p = pipeline_get_thread_private_pipeline();
BAT *b = BATdescriptor(cb);
if (!b)
@@ -296,7 +295,7 @@ PPdone(Client cntxt, MalBlkPtr mb, MalSt
bit *res = getArgReference_bit(stk, pci, 0);
bat B = *getArgReference_bat(stk, pci, 1);
bit redo = *getArgReference_bit(stk, pci, 2);
- Pipeline *p = (Pipeline*)*getArgReference_ptr(stk, pci, 3);
+ Pipeline *p = pipeline_get_thread_private_pipeline();
(void)cntxt; (void)mb;
BAT *b = BATdescriptor(B);
@@ -400,7 +399,7 @@ PPconcat_block(Client cntxt, MalBlkPtr m
bat cb = *getArgReference_bat(stk, pci, 1);
int blockid = *getArgReference_int(stk, pci, 2);
bit prefcnd = *getArgReference_bit(stk, pci, 3);
- Pipeline *p = (Pipeline*)*getArgReference_ptr(stk, pci, 4);
+ Pipeline *p = pipeline_get_thread_private_pipeline();
if (prefcnd) {
*r = false;
@@ -680,16 +679,14 @@ static mel_func pipeline_init_funcs[] =
batargany("col", 1), /* BAT to be sliced into nparts for the counter */
arg("sync", bool) /* sync (ie all workers need to call this
counter once, before any can continue) */
)),
- pattern("pipeline", "counter_get", PPcounter_get, true, "return current
number from the counter", args(1,3,
+ pattern("pipeline", "counter_get", PPcounter_get, true, "return current
number from the counter", args(1,2,
arg("", int),
- batarg("sink", bte),
- arg("pipeline", ptr)
+ batarg("sink", bte)
)),
- pattern("pipeline", "done", PPdone, true, "return counter based on source, !=
0 means done", args(1,4,
+ pattern("pipeline", "done", PPdone, true, "return counter based on source, !=
0 means done", args(1,3,
arg("res", bit),
batargany("b", 1),
- arg("redo", bit),
- arg("pipeline", ptr)
+ arg("redo", bit)
)),
pattern("pipeline", "concat", PPconcat, false, "This source iterates
sequentialy through the input sources", args(1,2,
batarg("sink", bte),
@@ -700,12 +697,11 @@ static mel_func pipeline_init_funcs[] =
batarg("concat", bte),
batargany("input", 1)
)),
- pattern("pipeline", "concat_block", PPconcat_block, false, "Add source to
concat", args(1,5,
+ pattern("pipeline", "concat_block", PPconcat_block, false, "Add source to
concat", args(1,4,
arg("res", bit),
batarg("concat", bte),
arg("blockid", int),
- arg("prefcond", bit),
- arg("pipeline", ptr)
+ arg("prefcond", bit)
)),
pattern("pipeline", "resultset", PPresultset, false, "return sink for
synchronizing appends into resultset", args(1,1,
batarg("sink", bte)
diff --git a/sql/backends/monet5/sql_pp_statement.c
b/sql/backends/monet5/sql_pp_statement.c
--- a/sql/backends/monet5/sql_pp_statement.c
+++ b/sql/backends/monet5/sql_pp_statement.c
@@ -957,7 +957,6 @@ pipeline_leave(backend *be, stmt *pp)
return NULL;
r = pushArgument(be->mb, r, be->source /* source/sink bat */);
r = pushBit(be->mb, r, false);
- r = pushArgument(be->mb, r, getArg(pp->q, 2) /* pipeline */);
//int arg = getDestVar(r);
pushInstruction(be->mb, r);
/*
@@ -1054,7 +1053,6 @@ stmt_pp_jump(backend *be, stmt *label, i
//getArg(r, 0) = getArg(label->q, 1); /* counter variable */
r = pushArgument(be->mb, r, be->source /* source/sink bat */);
r = pushBit(be->mb, r, true);
- r = pushArgument(be->mb, r, getArg(label->q, 2) /* pipeline */);
arg = getDestVar(r);
}
pushInstruction(be->mb, r);
@@ -1259,7 +1257,6 @@ stmt_concat_barrier(backend *be, int con
} else {
q = pushBit(be->mb, q, FALSE);
}
- q = pushArgument(be->mb, q, be->pipeline);
q->barrier = BARRIERsymbol;
pushInstruction(be->mb, q);
return getArg(q, 0);
@@ -1336,7 +1333,6 @@ pp_counter_get(backend *be, int counter)
InstrPtr q = newStmt(be->mb, "pipeline", "counter_get");
q->argv[0] = be->pp;
q = pushArgument(be->mb, q, counter);
- q = pushArgument(be->mb, q, be->pipeline);
pushInstruction(be->mb, q);
return getArg(q, 0);
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]