Move no-op test in mat_mul_general to fallback case
@@ -399,11 +399,6 @@ fn mat_mul_general<A>(alpha: A,
c: &mut ArrayViewMut2<A>)
where A: LinalgScalar,
{
- // It's a no-op if `c` has zero length.
- if c.len() == 0 {
- return;
- }
-
let ((m, k), (_, n)) = (lhs.dim(), rhs.dim());
// common parameters for gemm
@@ -444,6 +439,11 @@ fn mat_mul_general<A>(alpha: A,
);
}
} else {
+ // It's a no-op if `c` has zero length.
+ if c.len() == 0 {
+ return;
+ }
+
// initialize memory if beta is zero
if beta.is_zero() {
c.fill(beta);
