diff --git a/util/mat.h b/util/mat.h index 2a89820..a455579 100644 --- a/util/mat.h +++ b/util/mat.h @@ -200,6 +200,8 @@ class MatPtr : public IFields { private_rows_); } override_rows_ = static_cast(rows); + num_elements_ = static_cast( + ComputeNumElements(type_, Extents2D(override_rows_, cols_))); } // Changes the number of rows and columns without reallocating the memory.