![]() |
Blitz Support : |
From: Olivier Saut (novocaine_at_[hidden])
Date: 2004-07-13 12:19:23
Hello,
in my program I use the type Array<TinyMatrix<complex<double>,5,5,2> to
represent a density matrix. I access an element by (rho(y,z))(i,j)
where 0<=i,j<=4. Given a couple (y,z), I do a lot of products
TinyMatrix<complex<double>, 5,5> times TinyMatrix<complex<double>, 5,5>
(==dipolarMatrix) using the method
dipolarMatrix product(const dipolarMatrix & A, const dipolarMatrix &B) {
dipolarMatrix D;
for(int i=0; i<5; i++)
for(int j=0; j<5; j++) {
D(i,j)=0;
for(int p=0; p<5; p++)
D(i,j)+=A(i,p)*B(p,j);
}
return D;
}
I am a bit disappointed by the speed (compared to f90), is there any
chance I could speed up my program by changing this type to
Array<complex<double>,4>?
Should I use the CVS version instead of 0.7?
Thanks a lot,
- Olivier