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

Function _copyMatrix

src/graph/rg_matrix/rg_copy.c:12–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "../../util/rmalloc.h"
11
12static void _copyMatrix
13(
14 const GrB_Matrix in,
15 GrB_Matrix out
16) {
17 GrB_Index nvals;
18 GrB_Info info = GrB_SUCCESS;
19
20 UNUSED(info);
21
22 info = GrB_Matrix_nvals(&nvals, in);
23 ASSERT(info == GrB_SUCCESS);
24
25 if(nvals > 0) {
26 info = GrB_Matrix_apply(out, NULL, NULL, GrB_IDENTITY_BOOL, in,
27 GrB_DESC_R);
28 }
29 else {
30 GrB_Matrix_clear(out);
31 }
32
33 ASSERT(info == GrB_SUCCESS);
34}
35
36GrB_Info RG_Matrix_copy
37(

Callers 1

RG_Matrix_copyFunction · 0.85

Calls 3

GrB_Matrix_nvalsFunction · 0.85
GrB_Matrix_applyFunction · 0.85
GrB_Matrix_clearFunction · 0.85

Tested by

no test coverage detected