Hi, Oleg.
From: Oleg Trott <ot14@columbia.edu>
> So I was wondering if you could define the extent of the complexity of
> the expressions for which your library provides "optimal" performance?
The closure object is used to defer the evaluation of
the right hand side of equations and to optimize the calculation,
as Stroustrup's wrote in his "C++ prog. lang." sec. 22.4.7.
So the variation of this closure determines the extent how one can
increase the complexity.
The implementation shown in "C++ prog.lang." has a certain limit;
it can deal only with u = m*v + w . But expression template
can generalize the closure type by using template, so that
any combination of operations can be compiled.
Consider vector addition. Once the following operations are implemented
vector + vector
vector + ( expression whose result is a vector )
expression + vector
vector = expression
any equation for vector addition can be compiled.
Well there are other operators -,*,/ and other operands
matrix, diagonal matrix , so I had to implement a lot of operations
in MET. ( It was really boring, and I forgot the assignment to
transposed matrix until reading your post. )
Hence MET can deal with ( hopefully ) any complexity of the
expressions. But I did not implement the inefficient operations like
matrix * ( expression whose result is matrix )
,for matrix * ( matrix + matrix ) or matrix * matrix * matrix should be
calculated in two steps.
Regards,
Masakatsu Ito
Computer Center of Institute for Molecular Science
E-mail mito@ims.ac.jp
--------------------- Object Oriented Numerics List --------------------------
* To subscribe/unsubscribe: use the handy web form at
http://oonumerics.org/oon/
* If this doesn't work, please send a note to owner-oon-list@oonumerics.org
This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:15 EST