Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31260/sql/src/backends/monet5

Modified Files:
        sql.mx 
Log Message:

fixed indenting to make the code (more) readable;

this revealed the open questions:

Why is scaling (*o = (@2) ((*p + (*p < 0 ? -5:5))/ scal...@3]);)
in cmdconve...@1_@2()
only required for BAT tailes that might potentially hold NIL values,
but not for those that are known not to hold NIL values?


Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.379
retrieving revision 1.380
diff -u -d -r1.379 -r1.380
--- sql.mx      27 Dec 2009 23:06:36 -0000      1.379
+++ sql.mx      28 Dec 2009 08:09:04 -0000      1.380
@@ -3220,9 +3220,9 @@
                        *o++ = (@1)*p;
        }
        BATsetcount(bn, BATcount(b));
-    bn->tsorted = 0;
-    BATkey(BATmirror(bn),FALSE);
-    if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
+       bn->tsorted = 0;
+       BATkey(BATmirror(bn),FALSE);
+       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
 
        BBPkeepref( *res = bn->batCacheid);
        BBPunfix(b->batCacheid);
@@ -3297,9 +3297,9 @@
                }
        }
        BATsetcount(bn, BATcount(b));
-    bn->tsorted = 0;
-    BATkey(BATmirror(bn),FALSE);
-    if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
+       bn->tsorted = 0;
+       BATkey(BATmirror(bn),FALSE);
+       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
 
        BBPkeepref( *res = bn->batCacheid);
        BBPunfix(b->batCacheid);
@@ -3402,9 +3402,9 @@
                        *o = (@1) ((*p +  (*p<0)?-5:5) / scales[scale]);
        }
        BATsetcount(bn, BATcount(b));
-    bn->tsorted = 0;
-    BATkey(BATmirror(bn),FALSE);
-    if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
+       bn->tsorted = 0;
+       BATkey(BATmirror(bn),FALSE);
+       if (!(bn->batDirty&2)) bn = BATsetaccess(bn, BAT_READ);
 
        BBPkeepref( *res = bn->batCacheid);
        BBPunfix(b->batCacheid);
@@ -3565,9 +3565,9 @@
     BAT *b,*bn;
     @2 *o;
 
-       if( (b= BATdescriptor(*bid)) == NULL ){ 
-         throw(MAL, "batca...@2", RUNTIME_OBJECT_MISSING);
-   }
+    if( (b= BATdescriptor(*bid)) == NULL ){ 
+        throw(MAL, "batca...@2", RUNTIME_OBJECT_MISSING);
+    }
 
     bn = BATnew(TYPE_void, ty...@2, BATcount(b));
     BATseqbase(bn, b->hseqbase);
@@ -3595,20 +3595,20 @@
             for(; p<q; o++, p++)
                 *o = (@2) *p;
         else
-                       if (@3) {
-            for(; p<q; o++, p++)
-                if (*p == @1_nil) {
-                    *o = @2_nil;
-                    bn->T->nonil = 0;
-                } else
-                    *o = (@2) ((*p + (*p < 0 ? -5:5))/ scal...@3]);
-                       } else
-            for(; p<q; o++, p++)
-                if (*p == @1_nil) {
-                    *o = @2_nil;
-                    bn->T->nonil = 0;
-                } else
-                    *o = (@2) *p;
+            if (@3) {
+                for(; p<q; o++, p++)
+                    if (*p == @1_nil) {
+                        *o = @2_nil;
+                        bn->T->nonil = 0;
+                    } else
+                        *o = (@2) ((*p + (*p < 0 ? -5:5))/ scal...@3]);
+            } else
+                for(; p<q; o++, p++)
+                    if (*p == @1_nil) {
+                        *o = @2_nil;
+                        bn->T->nonil = 0;
+                    } else
+                        *o = (@2) *p;
 
     }
        /* wrapup */


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to