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

Function GB_debugify_ewise

deps/GraphBLAS/Source/GB_debugify_ewise.c:13–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include "GB_stringify.h"
12
13void GB_debugify_ewise
14(
15 // C matrix:
16 bool C_iso, // if true, operator is ignored
17 int C_sparsity, // sparse, hyper, bitmap, or full
18 GrB_Type ctype, // C=((ctype) T) is the final typecast
19 // M matrix:
20 GrB_Matrix M,
21 bool Mask_struct,
22 bool Mask_comp,
23 // operator:
24 GrB_BinaryOp binaryop, // may be NULL (used by GB_wait)
25 bool flipxy,
26 // A and B matrices:
27 GrB_Matrix A,
28 GrB_Matrix B
29)
30{
31
32 uint64_t scode ;
33
34 GrB_Type atype = A->type ;
35 GrB_Type btype = B->type ;
36
37 // enumify the ewise problem
38 GB_enumify_ewise (&scode, C_iso, C_sparsity, ctype,
39 M, Mask_struct, Mask_comp, binaryop, flipxy, A, B) ;
40
41 // namify the ewise problem
42 char ewise_name [256 + 8*GxB_MAX_NAME_LEN] ;
43 GB_namify_problem (ewise_name, scode,
44 (binaryop == NULL) ? "nop" : binaryop->name,
45 NULL,
46 (binaryop == NULL) ? NULL : binaryop->xtype->name,
47 (binaryop == NULL) ? NULL : binaryop->ytype->name,
48 (binaryop == NULL) ? NULL : binaryop->ztype->name,
49 atype->name,
50 btype->name,
51 ctype->name) ;
52
53 // construct the filename and create the file
54 char filename [512 + 8*GxB_MAX_NAME_LEN] ;
55 sprintf (filename, "/tmp/GB_ewise_%s.h", ewise_name);
56 FILE *fp = fopen (filename, "w") ;
57
58 // macrofy the ewise problem
59 GB_macrofy_ewise (fp, scode, binaryop, ctype, atype, btype) ;
60 fclose (fp) ;
61}
62

Callers 7

GB_emult_04Function · 0.85
GB_dense_ewise3_noaccumFunction · 0.85
GB_emult_02Function · 0.85
GB_add_phase2Function · 0.85
GB_dense_ewise3_accumFunction · 0.85
GB_emult_phase2Function · 0.85
GB_bitmap_emultFunction · 0.85

Calls 3

GB_enumify_ewiseFunction · 0.85
GB_namify_problemFunction · 0.85
GB_macrofy_ewiseFunction · 0.85

Tested by

no test coverage detected