Update of /cvsroot/monetdb/MonetDB5/src/modules/kernel
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23107/src/modules/kernel

Modified Files:
      Tag: GDK-2
        Makefile.ag algebra.mx algebra2.mx array.mx calc.mx 
        counters.mx mmath.mx 
Log Message:
propagated changes of Monday Sep 10 2007 - Tuesday Sep 18 2007
from the development trunk to the GDK-2 branch


Index: calc.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/calc.mx,v
retrieving revision 1.62
retrieving revision 1.62.2.1
diff -u -d -r1.62 -r1.62.2.1
--- calc.mx     29 Jun 2007 11:21:42 -0000      1.62
+++ calc.mx     18 Sep 2007 12:43:19 -0000      1.62.2.1
@@ -514,147 +514,6 @@
 command setoid{unsafe}() :oid 
 address CALCsetoidBase
 comment "Equivalent to setoid(1:oid).";
[EMAIL PROTECTED] Example script 
-The following example MIL script will do each operation in the
-calc module. It can be used for testing and the M2m compiler.
-
[EMAIL PROTECTED]
-setoid(oid(20000000));
-chr1 := 'a';
-chr2 := 'c';
-sht1 := sht(2);
-sht2 := sht(5);
-int1 := 5;
-int2 := 2;
-flt1 := 2.5;
-flt2 := 5.4;
-dbl1 := dbl(-2.500001);               # may also need string since float is 
default
-dbl2 := dbl(54.00456789);      # real and is less significant  
-lng1 := lng("-9000000000000"); # string needed because lng doesn't fit in an
-lng2 := lng("5400456789");     # int
-oid1 := oid(int1);
-oid2 := oid(int2);
-
-@:mil_comp_ops('a','z')@
-@:mil_comp_ops(sht1,sht2)@
-@:mil_comp_ops(int1,int2)@
-@:mil_comp_ops(flt1,flt2)@
-@:mil_comp_ops(dbl1,dbl2)@
-@:mil_comp_ops("abcde","abcdf")@
-
-@:mil_calc_ops(chr1,chr2)@
-@:mil_calc_ops(chr1,sht2)@
-@:mil_calc_ops(chr1,int2)@
-@:mil_calc_ops(chr1,lng2)@
-@:mil_calc_ops(chr1,flt2)@
-@:mil_calc_ops(chr1,dbl2)@
-
-@:mil_calc_ops(sht1,chr2)@
-@:mil_calc_ops(sht1,sht2)@
-@:mil_calc_ops(sht1,int2)@
-@:mil_calc_ops(sht1,lng2)@
-@:mil_calc_ops(sht1,flt2)@
-@:mil_calc_ops(sht1,dbl2)@
-
-@:mil_calc_ops(int1,chr2)@
-@:mil_calc_ops(int1,sht2)@
-@:mil_calc_ops(int1,int2)@
-@:mil_calc_ops(int1,lng2)@
-@:mil_calc_ops(int1,flt2)@
-@:mil_calc_ops(int1,dbl2)@
-
-@:mil_calc_ops(lng1,chr2)@
-@:mil_calc_ops(lng1,sht2)@
-@:mil_calc_ops(lng1,int2)@
-@:mil_calc_ops(lng1,lng2)@
-@:mil_calc_ops(lng1,flt2)@
-@:mil_calc_ops(lng1,dbl2)@
-
-@:mil_calc_ops(flt1,chr2)@
-@:mil_calc_ops(flt1,sht2)@
-@:mil_calc_ops(flt1,int2)@
-@:mil_calc_ops(flt1,lng2)@
-@:mil_calc_ops(flt1,flt2)@
-@:mil_calc_ops(flt1,dbl2)@
-
-@:mil_calc_ops(dbl1,chr2)@
-@:mil_calc_ops(dbl1,sht2)@
-@:mil_calc_ops(dbl1,int2)@
-@:mil_calc_ops(dbl1,lng2)@
-@:mil_calc_ops(dbl1,flt2)@
-@:mil_calc_ops(dbl1,dbl2)@
-
-@:mil_calc_ops(oid1,oid2)@
-
-max(sht1,sht2).print;
-max(int1,int2).print;
-max(lng1,lng2).print;
-max(flt1,flt2).print;
-max(dbl1,dbl2).print;
-
-min(sht1,sht2).print;
-min(int1,int2).print;
-min(flt1,flt2).print;
-min(dbl1,dbl2).print;
-min(lng1,lng2).print;
-
-abs(sht2).print;
-abs(int2).print;
-abs(flt2).print;
-abs(dbl2).print;
-abs(lng2).print;
-
-@:mil_calc_ops(oid1,oid2)@
-max(oid1,oid2).print;
-min(oid1,oid2).print;
-
-inv(sht2).print;
-inv(int2).print;
-inv(flt2).print;
-inv(dbl2).print;
-inv(lng2).print;
-
-(int1% int2).print;
-(int1<<int2).print;
-(int1>>int2).print;
-
-(int1 or  int2).print;
-(int1 and int2).print;
-(int1 xor int2).print;
-not(int2).print;
-
-bit1 := true;
-bit2 := false;
-(bit1 or  bit2).print;
-(bit1 and bit2).print;
-(bit1 xor bit2).print;
-not(bit2).print;
-
-srand( 1234 );
-rand().print;
-quit;
[EMAIL PROTECTED]
-The @emph{comp_ops} implements the mil example script comparison 
-operations.  It gets two parameters which are the operants for the operations.
-
[EMAIL PROTECTED] mil_comp_ops
- (@1 < @2).print;  (@2 < @1).print;  (@1 < @1).print;
-(@1 <= @2).print; (@2 <= @1).print; (@1 <= @1).print;
- (@1 = @2).print;  (@2 = @1).print;  (@1 = @1).print;
-(@1 >= @2).print; (@2 >= @1).print; (@1 >= @1).print;
- (@1 > @2).print;  (@2 > @1).print;  (@1 > @1).print;
-@
-
-The @emph{calc_ops} implements the mil example script arithmetic 
-operations.  It gets two parameters which are the operants for the operations.
-
[EMAIL PROTECTED] mil_calc_ops
-(@1 + @2).print;
-(@1 - @2).print;
-(@1 * @2).print;
-(@1 / @2).print;
-@
-
 @+ Implementation
 The implementation below differs from the pre-V5 implementation in
 that all strings and pointers are passed by reference, rather than

Index: algebra.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/algebra.mx,v
retrieving revision 1.181.2.2
retrieving revision 1.181.2.3
diff -u -d -r1.181.2.2 -r1.181.2.3
--- algebra.mx  11 Aug 2007 22:32:00 -0000      1.181.2.2
+++ algebra.mx  18 Sep 2007 12:43:08 -0000      1.181.2.3
@@ -604,9 +604,9 @@
 address ALGuhashsplit
 comment "Same as hashsplit, but only collect the head values in the fragments";
 @- Range Split
[EMAIL PROTECTED]
[EMAIL PROTECTED]
 command rangesplit ( b:bat[:any_1,:any_2], ranges:int ) 
-               :bat[:any_2,bat[:any_1,:any_2]] 
+               :bat[:any_2,:bat] 
 address ALGrangesplit
 comment "Split a BAT on tail column in 'ranges' equally sized consecutive 
                ranges. Returns a recursive BAT, containing the fragments in 
the tail, 
@@ -614,7 +614,7 @@
        range is 'nil'.";
 
 command urangesplit( b:bat[:any_1,:any_2], ranges:int ) 
-               :bat[:any_2,bat[:any_1,:oid]] 
+               :bat[:any_2,:bat] 
 address ALGurangesplit
 comment "Same as rangesplit, but only collect the head values in the 
fragments" ;
 

Index: mmath.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/mmath.mx,v
retrieving revision 1.34
retrieving revision 1.34.4.1
diff -u -d -r1.34 -r1.34.4.1
--- mmath.mx    20 May 2007 09:54:08 -0000      1.34
+++ mmath.mx    18 Sep 2007 12:43:23 -0000      1.34.4.1
@@ -203,27 +203,6 @@
 
 @-
 The constants defined in math.h are defined in const.mx
[EMAIL PROTECTED]
-module(mmath);
-# these tests are disabled: they're in mmath2 test
-setoid(oid(20000000));
-#asin(sin(M_PI)).print;
-#acos(cos(M_PI)).print;
-#atan(tan(M_PI_2)).print;
-#atan(tan(M_PI_4)).print;
-#tan(atan2(dbl(0.1),dbl(1.0))).print;
-#sqrt(pow(dbl(2),dbl(2))).print;
-
-#exp(dbl(10)).print;
-#log(dbl(10)).print;
-#log10(dbl(10)).print;
-
-#ceil(dbl(1.2)).print;
-#fabs(dbl(1.2)).print;
-#floor(dbl(1.2)).print;
-#fmod(dbl(15.2),dbl(2.5)).print;
-
-quit;
 @h
 #ifndef __MMATH_H__
 #define __MMATH_H__

Index: array.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/array.mx,v
retrieving revision 1.36.6.1
retrieving revision 1.36.6.2
diff -u -d -r1.36.6.1 -r1.36.6.2
--- array.mx    10 Aug 2007 14:54:50 -0000      1.36.6.1
+++ array.mx    18 Sep 2007 12:43:18 -0000      1.36.6.2
@@ -574,22 +574,3 @@
 
 
 
/*============================================================================*/
[EMAIL PROTECTED]
-
-PROC cons(int n,any::1 v) : bat[void,any::1] {
-       return project(grid(1,n,1,0),v);
-}
-ADDHELP("cons", "A.R. van Ballegooij", "Sep 20 2003",
-"generates a bat with a constant column", "array");
-
-PROC concat(bat[oid,any::1] a,bat[oid,any::1] b,int o) : bat[oid,any::1] {
-       return access(insert(access(copy(a),BAT_WRITE),
-                       reverse([oid]([+]([int](reverse(b)),o)))) ,
-                       BAT_READ);
-}
-ADDHELP("concat", "A.R. van Ballegooij", "Sep 20 2003",
-"Adds 'offset' two second arrays indexes and merges tables", "array");
-
-if (mod() = "main"){
-       print("Array module loaded...");
-}

Index: counters.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/counters.mx,v
retrieving revision 1.21
retrieving revision 1.21.6.1
diff -u -d -r1.21 -r1.21.6.1
--- counters.mx 3 Jan 2007 12:20:21 -0000       1.21
+++ counters.mx 18 Sep 2007 12:43:21 -0000      1.21.6.1
@@ -99,7 +99,6 @@
 comment "Initialize counters module (to be used on initial load, only)";
 
 counters.init();
[EMAIL PROTECTED]
 @+ Implementation
 @h
 #include "gdk.h"

Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/Makefile.ag,v
retrieving revision 1.61.2.3
retrieving revision 1.61.2.4
diff -u -d -r1.61.2.3 -r1.61.2.4
--- Makefile.ag 3 Sep 2007 13:08:18 -0000       1.61.2.3
+++ Makefile.ag 18 Sep 2007 12:43:05 -0000      1.61.2.4
@@ -104,10 +104,11 @@
                
 }
 
-scripts_mal = {
+headers_mal = {
+       HEADERS = mal
        DIR = pkglibdir
        SOURCES = calc.mx bat5.mx algebra.mx status.mx unix.mx \
-               mapi.mx mmath.mx lock.mx sema.mx alarm.mx batstr.mx batmtime.mx 
\
+               mmath.mx lock.mx sema.mx alarm.mx batstr.mx batmtime.mx \
                batcolor.mx batifthen.mx batcast.mx batcalc.mx batmath.mx \
                group.mx aggr.mx array.mx \
                counters.mx logger.mx pqueue.mx mkey.mx microbenchmark.mx

Index: algebra2.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/algebra2.mx,v
retrieving revision 1.19
retrieving revision 1.19.6.1
diff -u -d -r1.19 -r1.19.6.1
--- algebra2.mx 3 Jan 2007 12:20:20 -0000       1.19
+++ algebra2.mx 18 Sep 2007 12:43:15 -0000      1.19.6.1
@@ -116,23 +116,6 @@
 @:sum(flt)@
 @:sum(dbl)@
 
[EMAIL PROTECTED] milsum
-  PROC {csum}( BAT[oid,@1] b): BAT[oid,@1] {
-       IF ( b.ordered() )
-         RETURN {_csum}( b );
-       ELSE
-         RETURN {sum}( b );
-  }
-  ADDHELP("{csum}", "arjen", "Jul 18 2000",
-         "Choose a different implementation if b is sorted on head.", 
-         mod());
-
-@:milsum(sht)@
-@:milsum(int)@
-@:milsum(lng)@
-@:milsum(flt)@
-@:milsum(dbl)@
-
 @* Implementation Code
 @h
 #ifndef __MALALGEBRA_H__
@@ -508,48 +491,3 @@
   }
 }
 @
[EMAIL PROTECTED]
-
-PROC test_malalgebra() : void {   
-       #
-       # Simple test of some algorithms against the baseline
-       #
-       VAR Ndiff, l, r;
-
-       var dj := new( void, oid ); var tf := new( void, int );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 10 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 20 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 30 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 30 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 20 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 10 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 20 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 30 );
-       dj.insert( nil, [EMAIL PROTECTED] );  tf.insert( nil, 10 );
-       dj.seqbase([EMAIL PROTECTED]);        tf.seqbase([EMAIL PROTECTED]);
-
-       l := dj.reverse();
-       r := tf;
-
-       var Ntestfailed := 0;
-
-       @:jointest_oid()@
-       @:compresults(hash,oid)@
-       @:compresults(fetch,oid)@
-       @:compresults(merge,oid)@
-       @:compresults(left,oid)@
-       @:compresults(lefthash,oid)@
-       @:compresults(leftfetch,oid)@
-       @:compresults(leftmerge,oid)@
-
-       @:jointest_void()@
-       @:compresults(hash,void)@
-       @:compresults(fetch,void)@
-       @:compresults(merge,void)@
-       @:compresults(left,void)@
-       @:compresults(lefthash,void)@
-       @:compresults(leftfetch,void)@
-       @:compresults(leftmerge,void)@
-
-       printf( "RESULT: %d tests failed.\n", Ntestfailed );
-}


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to