| 107 | SparseArrayBase::~SparseArrayBase() = default; |
| 108 | |
| 109 | dim_t SparseArrayBase::getNNZ() const { |
| 110 | if (stype == AF_STORAGE_COO || stype == AF_STORAGE_CSC) { |
| 111 | return rowIdx.elements(); |
| 112 | } |
| 113 | if (stype == AF_STORAGE_CSR) { return colIdx.elements(); } |
| 114 | |
| 115 | // This is to ensure future storages are properly configured |
| 116 | return 0; |
| 117 | } |
| 118 | |
| 119 | #undef ROW_LENGTH |
| 120 | #undef COL_LENGTH |
no test coverage detected