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

Function GB_enumify_mxm

deps/GraphBLAS/Source/GB_enumify_mxm.c:23–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21// the same as the monoid binary operator.
22
23void GB_enumify_mxm // enumerate a GrB_mxm problem
24(
25 // output: // future: may need to become 2 x uint64
26 uint64_t *scode, // unique encoding of the entire semiring
27 // input:
28 // C matrix:
29 bool C_iso, // if true, semiring is ignored
30 int C_sparsity, // sparse, hyper, bitmap, or full
31 GrB_Type ctype, // C=((ctype) T) is the final typecast
32 // M matrix:
33 GrB_Matrix M, // may be NULL
34 bool Mask_struct, // mask is structural
35 bool Mask_comp, // mask is complemented
36 // semiring:
37 GrB_Semiring semiring, // the semiring to enumify
38 bool flipxy, // multiplier is: mult(a,b) or mult(b,a)
39 // A and B:
40 GrB_Matrix A,
41 GrB_Matrix B
42)
43{
44
45 //--------------------------------------------------------------------------
46 // handle the C_iso case
47 //--------------------------------------------------------------------------
48
49 if (C_iso)
50 {
51 semiring = GxB_ANY_PAIR_BOOL ;
52 flipxy = false ;
53 }
54
55 //--------------------------------------------------------------------------
56 // get the semiring
57 //--------------------------------------------------------------------------
58
59 // GxB_print (semiring, 3) ;
60 GrB_Monoid add = semiring->add ;
61 GrB_BinaryOp mult = semiring->multiply ;
62 GrB_BinaryOp addop = add->op ;
63
64 //--------------------------------------------------------------------------
65 // get the types
66 //--------------------------------------------------------------------------
67
68 GrB_Type atype = A->type ;
69 GrB_Type btype = B->type ;
70 GrB_Type mtype = (M == NULL) ? NULL : M->type ;
71
72 GrB_Type xtype = mult->xtype ;
73 GrB_Type ytype = mult->ytype ;
74 GrB_Type ztype = mult->ztype ;
75
76 GB_Opcode mult_opcode = mult->opcode ;
77 GB_Opcode add_opcode = addop->opcode ;
78
79 GB_Type_code xcode = xtype->code ;
80 GB_Type_code ycode = ytype->code ;

Callers 2

GB_debugify_mxmFunction · 0.85
mxm_factoryMethod · 0.85

Calls 6

GB_boolean_renameFunction · 0.85
GB_enumify_binopFunction · 0.85
GB_enumify_monoidFunction · 0.85
GB_enumify_maskFunction · 0.85
GB_sparsityFunction · 0.85
GB_enumify_sparsityFunction · 0.85

Tested by

no test coverage detected