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

Function GxB_pack_HyperHash

deps/GraphBLAS/Source/GxB_pack_HyperHash.c:61–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59#define GB_FREE_ALL ;
60
61GrB_Info GxB_pack_HyperHash // move Y into A->Y
62(
63 GrB_Matrix A, // matrix to modify
64 GrB_Matrix *Y, // hyper_hash matrix to pack into A
65 const GrB_Descriptor desc // unused
66)
67{
68
69 //--------------------------------------------------------------------------
70 // check inputs and get the descriptor
71 //--------------------------------------------------------------------------
72
73 GB_WHERE1 ("GxB_pack_HyperHash (A, &Y, desc)") ;
74 GB_BURBLE_START ("GxB_pack_HyperHash") ;
75 GB_RETURN_IF_NULL_OR_FAULTY (A) ;
76 GB_RETURN_IF_NULL (Y) ;
77 GB_RETURN_IF_FAULTY (*Y) ;
78
79 //--------------------------------------------------------------------------
80 // check for quick return
81 //--------------------------------------------------------------------------
82
83 if ((*Y) == NULL || !GB_IS_HYPERSPARSE (A) || A->Y != NULL)
84 {
85 // nothing to do. A and Y are unchanged
86 return (GrB_SUCCESS) ;
87 }
88
89 //--------------------------------------------------------------------------
90 // basic error checks
91 //--------------------------------------------------------------------------
92
93 if ((*Y)->vlen != A->vdim || !GB_IS_POWER_OF_TWO ((*Y)->vdim) ||
94 (*Y)->nvals != A->nvec || !GB_IS_SPARSE (*Y) || (*Y)->Y != NULL ||
95 (*Y)->type != GrB_UINT64 || !(*Y)->is_csc || GB_ANY_PENDING_WORK (*Y))
96 {
97 // Y is invalid
98 return (GrB_INVALID_OBJECT) ;
99 }
100
101 //--------------------------------------------------------------------------
102 // pack the hyper_hash matrix Y into A
103 //--------------------------------------------------------------------------
104
105 A->Y = (*Y) ;
106 (*Y) = NULL ;
107 A->Y_shallow = false ;
108
109 GB_BURBLE_END ;
110 return (GrB_SUCCESS) ;
111}
112

Callers 3

gb_get_shallowFunction · 0.85
unpack_packFunction · 0.85
mexFunctionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected