mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
Modify GEMM to handle m=0, n=0, and k=0 cases.
This commit is contained in:
parent
e6297741c9
commit
002c2923c2
@ -50,12 +50,18 @@ int EIGEN_BLAS_FUNC(gemm)(char *opa, char *opb, int *m, int *n, int *k, RealScal
|
||||
if(info)
|
||||
return xerbla_(SCALAR_SUFFIX_UP"GEMM ",&info,6);
|
||||
|
||||
if (*m == 0 || *n == 0)
|
||||
return 0;
|
||||
|
||||
if(beta!=Scalar(1))
|
||||
{
|
||||
if(beta==Scalar(0)) matrix(c, *m, *n, *ldc).setZero();
|
||||
else matrix(c, *m, *n, *ldc) *= beta;
|
||||
}
|
||||
|
||||
if(*k == 0)
|
||||
return 0;
|
||||
|
||||
internal::gemm_blocking_space<ColMajor,Scalar,Scalar,Dynamic,Dynamic,Dynamic> blocking(*m,*n,*k,1,true);
|
||||
|
||||
int code = OP(*opa) | (OP(*opb) << 2);
|
||||
|
Loading…
Reference in New Issue
Block a user