Skip to content

Commit

Permalink
fixup! mean computation
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Jun 27, 2024
1 parent cfa695f commit 1d813ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/unified/matrix/dense_kernels.template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void compute_mean(std::shared_ptr<const DefaultExecutor> exec,
return x(i, j) * inv_total_size;
},
GKO_KERNEL_REDUCE_SUM(ValueType), result->get_values(), x->get_size(),
tmp, x, ValueType_nc{1.} / x->get_size()[0]);
tmp, x, ValueType_nc{1.} / std::max(1ul, x->get_size()[0]));
}


Expand Down

0 comments on commit 1d813ee

Please sign in to comment.