MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / RG_Matrix_Synced

Function RG_Matrix_Synced

src/graph/rg_matrix/rg_matrix.c:52–70  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

50// a synced delta matrix does not contains any entries in
51// either its delta-plus and delta-minus internal matrices
52bool 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
73void RG_Matrix_Lock

Callers 4

RG_mxmFunction · 0.85
test_RGMatrix_newFunction · 0.85
test_RGMatrix_delFunction · 0.85
test_RGMatrix_del_entryFunction · 0.85

Calls 1

GrB_Matrix_nvalsFunction · 0.85

Tested by 3

test_RGMatrix_newFunction · 0.68
test_RGMatrix_delFunction · 0.68
test_RGMatrix_del_entryFunction · 0.68