[llvm] ADT/Matrix: two-dimensional Container with View (PR #98893)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 11:24:37 PDT 2024
================
@@ -55,20 +55,25 @@ class MatrixStorage {
size_t size() const { return Base.size(); }
bool empty() const { return !size(); }
- size_t getNumRows() const { return size() / NCols; }
+ size_t getNumRows() const {
+ assert(size() % NCols == 0 && "Internal error");
----------------
arsenm wrote:
might as well drop the assert string if it's this generic
https://github.com/llvm/llvm-project/pull/98893
More information about the llvm-commits
mailing list