LvArray icon indicating copy to clipboard operation
LvArray copied to clipboard

Type of `SparsityPatternView::numColumns()` should be `COL_TYPE`

Open klevzoff opened this issue 2 years ago • 0 comments

Type of SparsityPatternView::m_numCols and related method parameters/return values (numColumns(), resize(), etc.) is currently specified to be INDEX_TYPE, but should perhaps be COL_TYPE instead.

Currently this only results in rare clang-tidy warnings about narrowing conversions (e.g. with INDEX_TYPE = int and COL_TYPE = long long), but as soon as we try to assemble a matrix with >2B global DOFs, it becomes a real issue (at the very least, it would fail the column index check in Debug, since m_numCols would truncate in an implementation-defined way).

klevzoff avatar Apr 23 '22 04:04 klevzoff