advance iterator
| 168 | |
| 169 | // advance iterator |
| 170 | GrB_Info RG_MatrixTupleIter_next_BOOL |
| 171 | ( |
| 172 | RG_MatrixTupleIter *iter, // iterator to consume |
| 173 | GrB_Index *row, // optional output row index |
| 174 | GrB_Index *col, // optional output column index |
| 175 | bool *val // optional value at A[row, col] |
| 176 | ) { |
| 177 | if(IS_DETACHED(iter)) return GrB_NULL_POINTER ; |
| 178 | |
| 179 | GrB_Info info = GrB_SUCCESS ; |
| 180 | GrB_Matrix DM = RG_MATRIX_DELTA_MINUS(iter->A) ; |
| 181 | GxB_Iterator dp_it = &iter->dp_it ; |
| 182 | |
| 183 | if(!iter->m_depleted) { |
| 184 | info = _next_m_iter_bool(iter, DM, row, col, val, &iter->m_depleted) ; |
| 185 | if(info == GrB_SUCCESS) return GrB_SUCCESS ; |
| 186 | } |
| 187 | |
| 188 | if(iter->dp_depleted) { |
| 189 | return GxB_EXHAUSTED ; |
| 190 | } |
| 191 | |
| 192 | if(row) *row = GxB_rowIterator_getRowIndex (dp_it) ; |
| 193 | if(col) *col = GxB_rowIterator_getColIndex (dp_it) ; |
| 194 | if(val) *val = GxB_Iterator_get_BOOL (dp_it) ; |
| 195 | |
| 196 | // prep value for next iteration |
| 197 | _iter_next(dp_it, iter->max_row, &iter->dp_depleted); |
| 198 | |
| 199 | return GrB_SUCCESS ; |
| 200 | } |
| 201 | |
| 202 | // iterate over M matrix |
| 203 | static GrB_Info _next_m_iter_uint64 |
no test coverage detected