![]() |
Blitz Support : |
From: Colin Morningstar (colin_morningstar_at_[hidden])
Date: 2004-03-13 16:21:48
Dear Mr. Veldhuizen:
I am currently trying to use expression templates to write C++ code
to efficiently manipulate 3x3 complex matrices (SU(3) matrices for use
in lattice QCD simulations) including SSE inline assembly on pentium
clusters. A colleague brought Blitz++ to my attention, so I have a
quick question about it, if I may.
In an expression such as
A = B*C*D*adjoint(F)
where A,B,C,D,F are 3x3 complex matrices, would Blitz++ completely
unroll all of the loops in this expression (which is not optimal for
me), or would it evaluate B*C -> T1 (temporary), T1*D-> T2, etc.?
The use of templates to efficiently evaluate matrix expressions is a
clever idea. Thanks. Having programmed in Fortran for so long, the
transition to C++ with templates is not as smooth as I had hoped.
Regards,
Colin Morningstar
-- Colin Morningstar, Asst. Professor of Physics Department of Physics, Carnegie Mellon University 5000 Forbes Ave., 8313 Wean Hall, Pittsburgh, PA 15213-3890 Tel: (412)268-2728 Fax: (412)681-0648 email: colin_morningstar_at_[hidden]