diff options
-rw-r--r-- | blas/level3_impl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/blas/level3_impl.h b/blas/level3_impl.h index b3b727675..563101dfc 100644 --- a/blas/level3_impl.h +++ b/blas/level3_impl.h @@ -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); |