checks if C is fully synced a synced delta matrix does not contains any entries in either its delta-plus and delta-minus internal matrices
| 50 | // a synced delta matrix does not contains any entries in |
| 51 | // either its delta-plus and delta-minus internal matrices |
| 52 | bool RG_Matrix_Synced |
| 53 | ( |
| 54 | const RG_Matrix C // matrix to inquery |
| 55 | ) { |
| 56 | ASSERT(C); |
| 57 | |
| 58 | // quick indication, if the matrix is marked as dirty that means |
| 59 | // entires exists in either DP or DM |
| 60 | if(C->dirty) { |
| 61 | return false; |
| 62 | } |
| 63 | |
| 64 | GrB_Index dp_nvals; |
| 65 | GrB_Index dm_nvals; |
| 66 | GrB_Matrix_nvals(&dp_nvals, RG_MATRIX_DELTA_PLUS(C)); |
| 67 | GrB_Matrix_nvals(&dm_nvals, RG_MATRIX_DELTA_MINUS(C)); |
| 68 | |
| 69 | return ((dp_nvals + dm_nvals) == 0); |
| 70 | } |
| 71 | |
| 72 | // locks the matrix |
| 73 | void RG_Matrix_Lock |