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
|
%-------------------------------------------------------------------------------
\newpage
\subsection{{\sf GrB\_IndexUnaryOp} Options}
\label{get_set_idxunop}
%-------------------------------------------------------------------------------
\begin{mdframed}[userdefinedwidth=6in]
{\footnotesize
\begin{verbatim}
GrB_Info GrB_get (GrB_IndexUnaryOp op, GrB_Scalar value, int f) ;
GrB_Info GrB_get (GrB_IndexUnaryOp op, char * value, int f) ;
GrB_Info GrB_get (GrB_IndexUnaryOp op, int32_t * value, int f) ;
GrB_Info GrB_get (GrB_IndexUnaryOp op, size_t * value, int f) ;
GrB_Info GrB_set (GrB_IndexUnaryOp 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'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 \\
\hline
\verb'GrB_NAME' & R/W1 & \verb'char *' & % GrB_ALREADY_SET (idxunop)
name of the operator. For built-in operators, this returns the GraphBLAS
name (\verb'"GrB_TRIL"' for \verb'GrB_TRIL', for example).
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}
}
Built-in operators cannot 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.
|