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

Function GraphBLAS_Init

src/module.c:81–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81static int GraphBLAS_Init(RedisModuleCtx *ctx) {
82 // GraphBLAS should use Redis allocator
83 GrB_Info res = GxB_init(GrB_NONBLOCKING, RedisModule_Alloc,
84 RedisModule_Calloc, RedisModule_Realloc, RedisModule_Free);
85 if(res != GrB_SUCCESS) {
86 RedisModule_Log(ctx, "warning", "Encountered error initializing GraphBLAS");
87 return REDISMODULE_ERR;
88 }
89
90 // all matrices in CSR format
91 GxB_set(GxB_FORMAT, GxB_BY_ROW);
92
93 return REDISMODULE_OK;
94}
95
96int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
97 if(RedisModule_Init(ctx, "graph", REDISGRAPH_MODULE_VERSION,

Callers 1

RedisModule_OnLoadFunction · 0.85

Calls 1

GxB_initFunction · 0.85

Tested by

no test coverage detected