Blitz logo

Blitz Support :

From: Julian Cummings (cummings_at_[hidden])
Date: 2004-11-06 18:32:49


The "new" expression template machinery uses the Barton-Nackman trick (also
known as Curiously Recursive Templates) to reduce the explosion of
combinations that need to be handled for each of the basic binary operators.
The trick is to have each class that is to be expression-enabled inherit
from an ETBase class. The ETBase class is a template with a single template
parameter. Each derived class gives itself as the template argument to the
parent class ETBase. This way, the ETBase class is capable of converting
itself (with a static_cast) to the derived type on demand. The inheritance
feature reduces the number of type combinations that you have to worry
about, while the static cast capability preserves function inlining and
maximal performance.

This template technique was developed a little after the initial development
of the basic expression template technique. Thus, at some point Todd
Veldhuizen introduced a simplified "new" ET machinery using the recursive
templates idea and made it an option for his Array class. Since then, I
have basically abandoned the "old" ET machinery for the Arrays because it is
so much more verbose and clumsy. I have also introduced some ideas from
PETE (the Portable Expression Template Engine) to simplify the handling of
scalar types in Array expressions. Unfortunately, the Vector/Matrix and
TinyVector/TinyMatrix classes continue to rest upon the old ET machinery, so
we have two sets of these ET classes floating around in blitz. I intend to
address this problem in the next release.
I want to move the Vector/Matrix classes to the new ET machinery and
segregate the Tiny classes from the non-Tiny classes in terms of ET support.
This should pave the way for replacing the Tiny classes with the
corresponding classes from the tvmet package. The tvmet classes were
developed as a spinoff of the blitz Tiny classes, and since then they have
become much more fully functional than the original blitz Tiny classes. It
makes sense to just adopt the tvmet classes in blitz rather than duplicating
all of the work that has already been done there. So that is the basic plan
going forward. Of course, I make no promises on delivery dates for these
changes, since this is purely volunteer work on my part. ;-)

Regards, Julian C.

> -----Original Message-----
> From: blitz-support-bounces_at_[hidden]
> [mailto:blitz-support-bounces_at_[hidden]] On Behalf Of
> Dirk Gregorius
> Sent: Saturday, November 06, 2004 1:03 AM
> To: cummings_at_[hidden]; Support list for Blitz++
> Subject: Re: [Blitz-support] Version 0.8
>
>
> Thanks for the reply. You mention a newer ET machinery. What
> do mean by
> this?
>
> Regards,
>
> -Dirk
>
>
> ----- Original Message -----
> From: "Julian C. Cummings" <cummings_at_[hidden]>
> To: "'Support list for Blitz++'" <blitz-support_at_[hidden]>
> Sent: Friday, November 05, 2004 9:39 PM
> Subject: RE: [Blitz-support] Version 0.8
>
>
> > Hello Dirk,
> >
> > We just posted the version 0.8 release on the blitz SourceForge
> > website
> > (http://www.sourceforge.net/projects/blitz) yesterday. There are no
> > major new "features" per se, as we are only doing
> maintenance for blitz
> > at this time. But we have standardized the usage of
> autoconf for easy
> > configuration and installation of blitz, improved the
> documentation with
> > the use of texinfo and doxygen, simplified the expression template
> > machinery
> > somewhat, and made Array iterators STL compliant. In
> addition, we have
> > addressed several bug reports from the blitz users
> community. Please see
> > the ChangeLog for the details. Moving forward, I intend to
> migrate the
> > blitz Vector and Matrix classes to the newer expression
> template machinery
> > that the Array class is using and finally drop the older ET
> classes.
> > Also,
> > I would like to separate ET support for the
> TinyVector/TinyMatrix classes
> > from that of the Vector/Matrix classes and provide an
> option for replacing
> > TinyVector/TinyMatrix with the equivalent and more complete
> classes from
> > the tvmet package (http://www.sourceforge.net/projects/tvmet).
> >
> > Regards, Julian C.
> >
> > Dr. Julian C. Cummings
> > Staff Scientist, CACR/Caltech
> > (626) 395-2543
> > cummings_at_[hidden]
> >
> >
> >> -----Original Message-----
> >> From: blitz-support-bounces_at_[hidden]
> >> [mailto:blitz-support-bounces_at_[hidden]] On Behalf Of Dirk
> >> Gregorius
> >> Sent: Wednesday, November 03, 2004 7:07 AM
> >> To: Support list for Blitz++
> >> Subject: [Blitz-support] Version 0.8
> >>
> >>
> >> I heard that a new version will be released soon. Does
> anybody know
> >> when this new release will be published and what new features it
> >> will contain?
> >>
> >> Regards,
> >>
> >> -Dirk
> >>
> >> _______________________________________________
> >> Blitz-support mailing list
> >> Blitz-support_at_[hidden]
> >> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
> >>
> >
> >
> > _______________________________________________
> > Blitz-support mailing list
> > Blitz-support_at_[hidden]
> > http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support
>