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

Function _MatrixResizeToCapacity

src/graph/graph.c:233–250  ·  view source on GitHub ↗

resize matrix to node capacity

Source from the content-addressed store, hash-verified

231
232// resize matrix to node capacity
233void _MatrixResizeToCapacity
234(
235 const Graph *g,
236 RG_Matrix m
237) {
238 GrB_Index nrows;
239 GrB_Index ncols;
240 RG_Matrix_ncols(&ncols, m);
241 RG_Matrix_nrows(&nrows, m);
242 GrB_Index cap = Graph_RequiredMatrixDim(g);
243
244 // this policy should only be used in a thread-safe context,
245 // so no locking is required
246 if(nrows != cap || ncols != cap) {
247 GrB_Info res = RG_Matrix_resize(m, cap, cap);
248 ASSERT(res == GrB_SUCCESS);
249 }
250}
251
252// do not update matrices
253void _MatrixNOP

Callers

nothing calls this directly

Calls 4

RG_Matrix_ncolsFunction · 0.85
RG_Matrix_nrowsFunction · 0.85
Graph_RequiredMatrixDimFunction · 0.85
RG_Matrix_resizeFunction · 0.85

Tested by

no test coverage detected