Skip to content
Snippets Groups Projects
Commit 56ffd28f authored by Gauthier Becker's avatar Gauthier Becker
Browse files

fix bug

parent d5e00c3c
No related branches found
No related tags found
No related merge requests found
......@@ -177,6 +177,28 @@ void fullMatrix<double>::multWithATranspose(const fullVector<double> &x, const i
}
template<>
void fullMatrix<double>::gemmWithAtranspose(const fullMatrix<double> &a, const fullMatrix<double> &b,
double alpha, double beta)
{
int M = size2(), N = size2(), K = a.size1();
int LDA = a.size1(), LDB = b.size1(), LDC = size1();
F77NAME(dgemm)("T", "N", &M, &N, &K, &alpha, a._data, &LDA, b._data, &LDB,
&beta, _data, &LDC);
}
template<>
void fullMatrix<std::complex<double> >::gemmWithAtranspose(const fullMatrix<std::complex<double> > &a,
const fullMatrix<std::complex<double> > &b,
std::complex<double> alpha,
std::complex<double> beta)
{
int M = size2(), N = size2(), K = a.size1();
int LDA = a.size1(), LDB = b.size1(), LDC = size1();
F77NAME(zgemm)("T", "N", &M, &N, &K, &alpha, a._data, &LDA, b._data, &LDB,
&beta, _data, &LDC);
}
#endif
......
......@@ -552,7 +552,15 @@ class fullMatrix
_data[cind+i] = x(i);
}
void gemmWithAtranspose(const fullMatrix<scalar> &a, const fullMatrix<scalar> &b,
scalar alpha=1., scalar beta=1.)
#if !defined(HAVE_BLAS)
{
Msg::Error("gemmWithAtranspose is only available with blas. If blas is not installed please transpose a before used gemm_naive");
}
#endif
;
static void registerBindings(binding *b);
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment