Re: [ROOT] Complex Matrix, Complex Vector

From: Thorsten Glebe (T.Glebe@mpi-hd.mpg.de)
Date: Sat May 19 2001 - 00:32:49 MEST


Hi,

"Jacek M. Holeczek" wrote:

> 2. > - BUT, I see many people requesting:
>    > -- interactive access via CINT (debugging purpose mainly). (Rene ?)
>    ... we can't seem, however, to agree on the need of INTERACTIVE access
>    to matrices, vectors, ..., from CINT. I fully support Rene's point, and
>    more. I DO WANT interactive access to these data.
>    My idea is the following - the time consuming algorithms are compiled,
>    linked to the ROOT dynamically via a shared library. The organization
>    of what happens (and when) is done by an INTERPRETED script (I mean,
>    from the command line, for example). That is, for example, I create the
>    matrix from the root prompt, then I call a compiled function to fill
>    it, ..., and finally I look at results. Then I INTERACTIVELY multiply
>    the matrix by some kind of a vector, or a number, and repeat the
>    process. Maybe I decide to make the matrix diagonal, ... ?
>    Maybe I create two matrices and decide to add them ?
>    All these actions MUST be available from the interpreter.
>

I hope it is clear to you what this means: for active libraries like Blitz++
you have to precompile
operations like

A + B
A + B + C
A + B + C + D
A * B
A * B + C
... (and so on, of course for each dimension used individually!)

The reason is that the expressions itself are templates.

The consequence is that one can hardly provide a library which satisfies the
needs of the majority of the users. The user has to
make such a library by his own, precompiling the operations he wants to use
in CINT.
But this is not convenient any more as precompiling expression templates for
CINT is really ugly. This is something
the average user will for sure not do. Also alternative possiblities (like
wrapper functions) are not feasible if you think
about it for a minute.

All these problems do not exist of course with trivial Vector/Matrix
implementations like those of the CLHEP library. Those
you can easily incorporate in CINT, but as I mentioned, the performance is
(even in compiled code)  low.

So the problem to me is the following: A ROOT user will certainly prefer
those Vector/Matrix classes which are supported by
ROOT. If you provide Vector/Matrix classes which can easily incorporated into
CINT, you leave the user with low performant
numerical code even if he fully compiles it!!!
If you want to provide a Vector/Matrix library which has an attractive
performance compared to hand written FORTRAN/C
routines you will have certainly big problems to make a reasonable
integration into CINT.

I am pretty sure that a ROOT user wants both: CINT integration plus high
performance. Therefore the only solution might be to support both: a high
performance Vector/Matrix class with I/O capabilities but with very limited
access in CINT and
a slow but fully CINT functional Vector/Matrix class for convenient
programming.

> 5. > ... the HERA-B experiment which uses a high performance C++
>    > Vector/Matrix algebra library ... (Thorsten)
>    Can you predict whether your library can be made "visible" in CINT ?

Yes, I can predict: No!

Goodbye,
  Thorsten





This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:45 MET