File: GrB_get_set_IndexBinaryOp.tex

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 (60 lines) | stat: -rw-r--r-- 2,945 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

%-------------------------------------------------------------------------------
\newpage
\subsection{{\sf GxB\_IndexBinaryOp} Options}
\label{get_set_idxbinop}
%-------------------------------------------------------------------------------

\begin{mdframed}[userdefinedwidth=6in]
{\footnotesize
\begin{verbatim}
GrB_Info GrB_get (GxB_IndexBinaryOp op, GrB_Scalar value, int f) ;
GrB_Info GrB_get (GxB_IndexBinaryOp op, char *     value, int f) ;
GrB_Info GrB_get (GxB_IndexBinaryOp op, int32_t *  value, int f) ;
GrB_Info GrB_get (GxB_IndexBinaryOp op, size_t *   value, int f) ;

GrB_Info GrB_set (GxB_IndexBinaryOp op, char *     value, int f) ;
\end{verbatim}
}\end{mdframed}

\noindent
{\small
\begin{tabular}{|l|l|l|p{2.8in}|}
\hline
\verb'int field'                    & R/W  & C type        & description \\
\hline
\verb'GrB_INP0_TYPE_CODE'          & R    & \verb'int32_t'& 1st input type code (see \verb'GrB_Type_code') \\
\verb'GrB_INP1_TYPE_CODE'          & R    & \verb'int32_t'& 2nd input type code \\
\verb'GrB_OUTP_TYPE_CODE'          & R    & \verb'int32_t'& output type code \\
\verb'GxB_THETA_TYPE_CODE'         & R    & \verb'int32_t'& $\Theta$ type code \\
\verb'GrB_INP0_TYPE_STRING'        & R    & \verb'char *' & name of the 1st input type \\
\verb'GrB_INP1_TYPE_STRING'        & R    & \verb'char *' & name of the 2nd input type \\
\verb'GrB_OUTP_TYPE_STRING'        & R    & \verb'char *' & name of the output type \\
\verb'GxB_THETA_TYPE_STRING'       & R    & \verb'char *' & name of the $\Theta$ type \\
\hline
\verb'GrB_NAME'                     & R/W1 & \verb'char *' &    % GrB_ALREADY_SET (binop)
    name of the operator.
    For user-defined operators, the name can be any string of any length.  It
    is not used by the JIT.  It can be set at most once. \\
\verb'GxB_JIT_C_NAME'               & R/W1 & \verb'char *' &
    This must be a valid name of a C function to enable its use in the JIT.
    The length of the name can be at most \verb'GxB_MAX_NAME_LEN', including
    the \verb'nul' terminating byte.  It can be set at most once. \\
\verb'GxB_JIT_C_DEFINITION'         & R/W1 & \verb'char *' &
    definition for a user-defined operator, as a C function; built-in operators
    return an empty string.  It can be set at most once. \\
\hline
\end{tabular}
}

There are no built-in index-binary operators, but if there are in the future,
they will not be be modified by \verb'GrB_set'.  User-defined operators can be
used without setting their name or definition, but they can be used in JIT
kernels only when both the JIT C name and the definition are set.

To use the JIT, all semirings that access this index-binary operator must
be defined after the user-defined operator has been given both a name and a
definition.  GraphBLAS can use a semiring that uses a binary operator
without a name, but it cannot use the JIT, even if the operator is given a name
later on after the operator is created.