Changeset: 1b5e810dd443 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b5e810dd443
Modified Files:
        sql/backends/monet5/UDF/80_ssdb.sql
        sql/backends/monet5/UDF/ssdb.c
        sql/backends/monet5/UDF/ssdb.mal
Branch: ssdb
Log Message:

removed unnecessary parameter to cooking()


diffs (63 lines):

diff --git a/sql/backends/monet5/UDF/80_ssdb.sql 
b/sql/backends/monet5/UDF/80_ssdb.sql
--- a/sql/backends/monet5/UDF/80_ssdb.sql
+++ b/sql/backends/monet5/UDF/80_ssdb.sql
@@ -32,7 +32,7 @@ All Rights Reserved.
 --             (obsid INT, ord INT, x INT, y INT)
 -- width: width of all images, assuming they are the same
 -- height: height of all images, assuming they are the same
-CREATE PROCEDURE cooking (tin CHAR(128), tout_obs CHAR(128), tout_plg 
CHAR(128), width INT, height INT)
+CREATE PROCEDURE cooking (tin CHAR(128), tout_obs CHAR(128), tout_plg 
CHAR(128), imgsize INT)
 EXTERNAL NAME ssdb.cooking;
 
 -- Determines for each polygon in the input table 'tin' if it intersects with
diff --git a/sql/backends/monet5/UDF/ssdb.c b/sql/backends/monet5/UDF/ssdb.c
--- a/sql/backends/monet5/UDF/ssdb.c
+++ b/sql/backends/monet5/UDF/ssdb.c
@@ -451,7 +451,7 @@ CLEANUP_RETURN:
 
 str
 SSDBcooking(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{ /* cooking(tin:str, tout_obs:str, tout_plg:str, width:int, height:int):void 
*/
+{ /* cooking(tin:str, tout_obs:str, tout_plg:str, imgsize:int):void */
        mvc *sql = NULL;
        sql_table *tin = NULL, *tout_obs = NULL, *tout_plg = NULL;
        /* tin (imageid int, x int, y int, val int) */
@@ -491,7 +491,7 @@ SSDBcooking(Client cntxt, MalBlkPtr mb, 
        str tin_name = *(str *) getArgReference(stk, pci, pci->retc + 0);
        str tout_obs_name = *(str *) getArgReference(stk, pci, pci->retc + 1);
        str tout_plg_name = *(str *) getArgReference(stk, pci, pci->retc + 2);
-       int width = *(int *) getArgReference(stk, pci, pci->retc + 3);
+       int imgsize = *(int *) getArgReference(stk, pci, pci->retc + 3);
        /* int height = *(int *) getArgReference(stk, pci, pci->retc + 4); */
 
        if (msg)
@@ -554,7 +554,7 @@ SSDBcooking(Client cntxt, MalBlkPtr mb, 
                unsigned int x_prev, y_prev, x = tin_x_t[idx], y = tin_y_t[idx];
 
                /* a temporary pix_grpid (i.e., pixel's position in the image) 
*/
-               pix_grpid[idx] = y * width + x;
+               pix_grpid[idx] = y * imgsize + x;
 
                /* If the previous pixel in the input pixels is my previous 
neighbour,
                 *   and its grpid is smaller (which should be), take over its 
grpid.
@@ -1046,7 +1046,7 @@ SSDBregrid(Client cntxt, MalBlkPtr mb, M
        tout_y_t = (int*)Tloc(tout_y, BUNfirst(tout_y));
        tout_avgval_t = (dbl*)Tloc(tout_avgval, BUNfirst(tout_avgval));
 
-       size = tin_x_t[nr_points-1]+1;  /*width*/
+       size = tin_x_t[nr_points-1]+1;  /*imgsize*/
        step = size * 3;
 
        for(idx=0; idx < nr_points; idx=idx+step)
diff --git a/sql/backends/monet5/UDF/ssdb.mal b/sql/backends/monet5/UDF/ssdb.mal
--- a/sql/backends/monet5/UDF/ssdb.mal
+++ b/sql/backends/monet5/UDF/ssdb.mal
@@ -18,7 +18,7 @@
 # scalar MAL signatures
 module ssdb;
 
-pattern cooking(tin:str, tout_obs:str, tout_plg:str, width:int, 
height:int):void
+pattern cooking(tin:str, tout_obs:str, tout_plg:str, imgsize:int):void
 address SSDBcooking
 comment "Cooks all image pixels in the table 'tin' into observations and store 
them in the table 'tout_obs', the polygons of the observations are stored in 
the table 'tout_plg'";
 
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to