On Wed, Dec 12, 2007 at 12:40:09PM +0100, Stefan Manegold wrote:
> On Tue, Dec 11, 2007 at 05:32:04PM +0000, Niels Nes wrote:
> > Update of /cvsroot/monetdb/MonetDB5/src/modules/kernel
> > In directory
> > sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28347/src/modules/kernel
> >
> > Modified Files:
> > batcalc.mx batifthen.mx group.mx kprelude.mx
> > Log Message:
> > batifthen.mx: use (fast) direct assignments instead of bunfastins for
> > ifthenelse (not for ifthen as it can be small as the input bat)
> > group.mx: return read only bats.
>
> Intel's icc says:
> ========
> icc -no-gcc -DHAVE_CONFIG_H -I.
> -I/scratch/monet.Int.64.64.d.23892/MonetDB5/src/modules/kernel -I../../..
> -I/scratch/monet.Int.64.64.d.23892/MonetDB5/src/modules/kernel -I../atoms
> -I/scratch/monet.Int.64.64.d.23892/MonetDB5/src/modules/kernel/../
> atoms -I../../mal
> -I/scratch/monet.Int.64.64.d.23892/MonetDB5/src/modules/kernel/../../mal
> -I/scratch/monet.Int.64.64.d.23892/MonetDB/.Int.64.64.d-Fedora6/include/MonetDB
> -I/scratch/monet.Int.64.64.d.23892/MonetDB/.Int.64.64.d-Fedora6/include/Mone
> tDB/common
> -I/scratch/monet.Int.64.64.d.23892/MonetDB/.Int.64.64.d-Fedora6/include/MonetDB/gdk
> -DLIBBATIFTHEN -we140 -wd1418 -Wall -w2 -c99 -mp1 -O3 -restrict -unroll
> -tpp7 -axWP -we266 -Werror -wd1418,1419,279,981,810,193,111,1357,1572,1599
> -D_RE
> ENTRANT -c batifthen.c -KPIC -DPIC -o .libs/lib_batifthen_la-batifthen.o
> /scratch/monet.Int.64.64.d.23892/MonetDB5/src/modules/kernel/batifthen.mx(430):
> error #593: variable "bi" was set but never used
> BATiter bi, tbi;
> ^
>
> /scratch/monet.Int.64.64.d.23892/MonetDB5/src/modules/kernel/batifthen.mx(430):
> error #593: variable "bi" was set but never used
> BATiter bi, tbi;
> ^
>
> compilation aborted for batifthen.c (code 2)
> make[7]: *** [lib_batifthen_la-batifthen.lo] Error 1
> ========
>
> basic questions: is it correct that the input's heads are no longer used in
> [EMAIL PROTECTED](), while they are (still) used in
> [EMAIL PROTECTED](), [EMAIL PROTECTED]() & [EMAIL PROTECTED]()
No in this fall back case all should still use the head. I'll check in a
fix shortly.
Niels
> ?
>
> Stefan
>
> [...]
> > Index: batifthen.mx
> > ===================================================================
> > RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/batifthen.mx,v
> > retrieving revision 1.10
> > retrieving revision 1.11
> > diff -u -d -r1.10 -r1.11
> > --- batifthen.mx 14 Nov 2007 12:52:15 -0000 1.10
> > +++ batifthen.mx 11 Dec 2007 17:32:02 -0000 1.11
> [...]
> > @@ -289,38 +436,31 @@
> > @:getBATdescriptor(bid,b,"batcalc.ifThenElse")@
> >
> > @:getBATdescriptor(tid,tb,"batcalc.ifThenElse",BBPreleaseref(b->batCacheid);)@
> > @:chkSize(b,tb,ifThenElse)@
> > - @:resBAT(@1,"batcalc.ifThenElse")@
> > + @:resultBAT(@1,"batcalc.ifThenElse")@
> > + bn->tsorted = FALSE;
> > + BATkey(BATmirror(bn), FALSE);
> >
> > - if (ATOMvarsized([EMAIL PROTECTED]))
> > - val = *(@1**)val;
> > bi = bat_iterator(b);
> > tbi = bat_iterator(tb);
> >
> > t = (bit*) Tloc(b,BUNfirst(b));
> > -
> > +
> > + if (ATOMvarsized([EMAIL PROTECTED]))
> > + val = *(@1**)val;
> > BATloop(b, p, q) {
> > if (*t == bit_nil)
> > - BUNfastins(bn, BUNhead(bi,p), (ptr) &nilval);
> > + BUNfastins(bn, NULL, (ptr) &nilval);
> > else if (*t)
> > - BUNfastins(bn, BUNhead(bi,p), BUNtail(tbi, p));
> > + BUNfastins(bn, NULL, BUNtail(tbi, p));
> > else
> > - BUNfastins(bn, BUNhead(bi,p), val);
> > + BUNfastins(bn, NULL, val);
> > t++;
> > }
> > BBPreleaseref(tb->batCacheid);
> > @:wrapup@
> > }
> > +@:ifthenImpl(@1)@
> > @c
> > -#include "mal_config.h"
> > -#include "batifthen.h"
> > -
> > -@:ifthencstImpl(int)@
> > -@:ifthencstImpl(sht)@
> > -@:ifthencstImpl(lng)@
> > -@:ifthencstImpl(oid)@
> > -@:ifthencstImpl(flt)@
> > -@:ifthencstImpl(dbl)@
> > -@:ifthencstImpl(str)@
> > -@:ifthencstImpl(chr)@
> > -@:ifthencstImpl(bit)@
> > +@:ifthenelseDefault(oid)@
> > +@:ifthenelseDefault(str)@
> > @}
> >
> [...]
>
> --
> | Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] |
> | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
> | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
> | The Netherlands | Fax : +31 (20) 592-4312 |
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Monetdb-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers
--
Niels Nes, Centre for Mathematics and Computer Science (CWI)
Kruislaan 413, 1098 SJ Amsterdam, The Netherlands
room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312
url: http://www.cwi.nl/~niels e-mail: [EMAIL PROTECTED]
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers