mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hadrons: automatically resize output in MKL A2A matrix kernels
This commit is contained in:
parent
1ff1422e07
commit
7cd9914f0e
@ -213,6 +213,10 @@ public:
|
|||||||
{
|
{
|
||||||
static const ComplexD one(1., 0.), zero(0., 0.);
|
static const ComplexD one(1., 0.), zero(0., 0.);
|
||||||
|
|
||||||
|
if ((res.rows() != a.rows()) or (res.cols() != b.cols()))
|
||||||
|
{
|
||||||
|
res.resize(a.rows(), b.cols());
|
||||||
|
}
|
||||||
if (Mat<ComplexD, Opts...>::Options == Eigen::RowMajor)
|
if (Mat<ComplexD, Opts...>::Options == Eigen::RowMajor)
|
||||||
{
|
{
|
||||||
cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, a.rows(), b.cols(),
|
cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, a.rows(), b.cols(),
|
||||||
@ -234,6 +238,10 @@ public:
|
|||||||
{
|
{
|
||||||
static const ComplexF one(1., 0.), zero(0., 0.);
|
static const ComplexF one(1., 0.), zero(0., 0.);
|
||||||
|
|
||||||
|
if ((res.rows() != a.rows()) or (res.cols() != b.cols()))
|
||||||
|
{
|
||||||
|
res.resize(a.rows(), b.cols());
|
||||||
|
}
|
||||||
if (Mat<ComplexF, Opts...>::Options == Eigen::RowMajor)
|
if (Mat<ComplexF, Opts...>::Options == Eigen::RowMajor)
|
||||||
{
|
{
|
||||||
cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, a.rows(), b.cols(),
|
cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, a.rows(), b.cols(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user