| 11 | #include "GB_stringify.h" |
| 12 | |
| 13 | void GB_debugify_mxm |
| 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 | // semiring: |
| 24 | GrB_Semiring semiring, |
| 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 mxm problem |
| 38 | GB_enumify_mxm (&scode, C_iso, C_sparsity, ctype, |
| 39 | M, Mask_struct, Mask_comp, semiring, flipxy, A, B) ; |
| 40 | |
| 41 | // namify the mxm problem |
| 42 | char mxm_name [256 + 8*GxB_MAX_NAME_LEN] ; |
| 43 | GB_namify_problem (mxm_name, scode, |
| 44 | semiring->add->op->name, |
| 45 | semiring->multiply->name, |
| 46 | semiring->multiply->xtype->name, |
| 47 | semiring->multiply->ytype->name, |
| 48 | semiring->multiply->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_mxm_%s.h", mxm_name); |
| 56 | FILE *fp = fopen (filename, "w") ; |
| 57 | |
| 58 | // macrofy the mxm problem |
| 59 | GB_macrofy_mxm (fp, scode, semiring, ctype, atype, btype) ; |
| 60 | fclose (fp) ; |
| 61 | } |
| 62 |
no test coverage detected