diff --git a/include/operations/blas3_trees.hpp b/include/operations/blas3_trees.hpp index 91f13ab94..beaf737b6 100644 --- a/include/operations/blas3_trees.hpp +++ b/include/operations/blas3_trees.hpp @@ -489,9 +489,9 @@ class NoLocalGemmFactory { // when C is uninitialized the element of the C can be NaN, and Nan*0 // will be NaN if (0 == beta) { - C[i * wg_rows] = alpha * reg_res[i][j] + beta * C[i * wg_rows]; - } else { C[i * wg_rows] = alpha * reg_res[i][j]; + } else { + C[i * wg_rows] = alpha * reg_res[i][j] + beta * C[i * wg_rows]; } } }