| 45 | } |
| 46 | |
| 47 | static GrB_Info _removeElementMultiVal |
| 48 | ( |
| 49 | GrB_Matrix A, // matrix to remove entry from |
| 50 | GrB_Index i, // row index |
| 51 | GrB_Index j, // column index |
| 52 | uint64_t v // value to remove |
| 53 | ) { |
| 54 | ASSERT(A); |
| 55 | |
| 56 | uint64_t x; |
| 57 | uint64_t tx; |
| 58 | GrB_Info info; |
| 59 | |
| 60 | info = GrB_Matrix_extractElement(&x, A, i, j); |
| 61 | ASSERT(info == GrB_SUCCESS); |
| 62 | ASSERT((SINGLE_EDGE(x)) == false); |
| 63 | |
| 64 | // remove entry from multi-value |
| 65 | x = CLEAR_MSB(x); |
| 66 | uint64_t *entries = (uint64_t *)x; |
| 67 | if(_removeEntryFromMultiValArr(&entries, v)) { |
| 68 | // update entry |
| 69 | x = (uint64_t)entries; |
| 70 | info = GrB_Matrix_setElement(A, x, i, j); |
| 71 | } |
| 72 | |
| 73 | return info; |
| 74 | } |
| 75 | |
| 76 | GrB_Info RG_Matrix_removeEntry_UINT64 |
| 77 | ( |
no test coverage detected