File: GB_macrofy_family.c

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 254,920 kB
  • sloc: ansic: 1,134,743; cpp: 46,133; makefile: 4,875; fortran: 2,087; java: 1,826; sh: 996; ruby: 725; python: 495; asm: 371; sed: 166; awk: 44
file content (87 lines) | stat: -rw-r--r-- 2,657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//------------------------------------------------------------------------------
// GB_macrofy_family: construct all macros for all methods
//------------------------------------------------------------------------------

// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2025, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

//------------------------------------------------------------------------------

#include "GB.h"
#include "jitifyer/GB_stringify.h"

void GB_macrofy_family
(
    // output:
    FILE *fp,                   // target file to write, already open
    // input:
    GB_jit_family family,       // family to macrofy
    uint64_t method_code,       // encoding of the specific problem
    uint64_t kcode,             // kernel code
    GrB_Semiring semiring,      // semiring (for mxm family only)
    GrB_Monoid monoid,          // monoid (for reduce family only)
    GB_Operator op,             // unary/index_unary/binary op
    GrB_Type type1,
    GrB_Type type2,
    GrB_Type type3
)
{

    switch (family)
    {

        case GB_jit_apply_family  : 
            GB_macrofy_apply (fp, method_code, op, type1, type2) ;
            break ;

        case GB_jit_assign_family : 
            GB_macrofy_assign (fp, method_code, (GrB_BinaryOp) op,
                type1, type2) ;
            break ;

        case GB_jit_build_family  : 
            GB_macrofy_build (fp, method_code, (GrB_BinaryOp) op,
                type1, type2) ;
            break ;

        case GB_jit_ewise_family  : 
            GB_macrofy_ewise (fp, method_code, kcode, (GrB_BinaryOp) op,
                type1, type2, type3) ;
            break ;

        case GB_jit_mxm_family    : 
            GB_macrofy_mxm (fp, method_code, semiring, type1, type2, type3) ;
            break ;

        case GB_jit_reduce_family : 
            GB_macrofy_reduce (fp, method_code, monoid, type1) ;
            break ;

        case GB_jit_select_family : 
            GB_macrofy_select (fp, method_code, (GrB_IndexUnaryOp) op, type1) ;
            break ;

        case GB_jit_user_op_family : 
            GB_macrofy_user_op (fp, op) ;
            break ;

        case GB_jit_user_type_family : 
            GB_macrofy_user_type (fp, type1) ;
            break ;

        case GB_jit_masker_family : 
            GB_macrofy_masker (fp, method_code, type1) ;
            break ;

        case GB_jit_subref_family : 
            GB_macrofy_subref (fp, method_code, type1) ;
            break ;

        case GB_jit_sort_family : 
            GB_macrofy_sort (fp, method_code, (GrB_BinaryOp) op, type1) ;
            break ;

        default: ;
    }
}