![]() |
Blitz Support : |
From: Mathias Wagner (mathias.wagner_at_[hidden])
Date: 2004-08-12 02:58:50
Hi,
has anyone experience with using
BLAS Level 3 function
cblass_dgemm
from GSL or Intel MKL Library with Blitz++?
I use the following code to have a nicer interface
void matmultadd(const blitz::Array<double,2> &A, const
blitz::Array<double,2> &B, blitz::Array<double,2> &C, double alpha, double
beta){
cblas_dgemm(CblasRowMajor,CblasNoTrans,CblasNoTrans,C.rows(),C.columns(),A.columns(),alpha,A.data(),A.columns(),B.data(),B.columns(),beta,C.data(),C.columns());
}
In simple cases this works fine. But if I create the matrices A,B and C with
constructs like
A(Range...,Range...) = X(Range...,Range..)
it fails. This does not depend on whether I use GSL or MKL ?
I tried isStorageContinours() for A,B and C and it returns true.
I also tried the .reference(copy()) tip from the manual, but it doesn'y change
anything?
The MKL Version is about 10 times faster then using 3 for loops for matrix
sizes about 100x100 on my P4 (iusing the Intel Compiler 8.0), so I am really
interested in fixing this.
Mathias