File: GrB_objects.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 (73 lines) | stat: -rw-r--r-- 3,432 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

\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{GraphBLAS Objects and their Methods} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{objects}

SuiteSparse:GraphBLAS defines 14 different objects to represent matrices, vectors,
scalars, data types, operators (binary, unary, and index-unary), monoids,
semirings, a {\em descriptor} object used to specify optional parameters
that modify the behavior of a GraphBLAS operation, a {\em context}
object for controlling computational resources, a matrix/vector iterator,
and a container object for moving data in and out of the GraphBLAS opaque
matrix/vector objects.

The GraphBLAS API makes a distinction between {\em methods} and {\em
operations}.  A method is a function that works on a GraphBLAS object, creating
it, destroying it, or querying its contents.  An operation (not to be confused
with an operator) acts on matrices and/or vectors in a semiring.

\vspace{0.1in}
\noindent
{\small
\begin{tabular}{ll}
\hline
\verb'GrB_Type'      & a scalar data type \\
\verb'GrB_UnaryOp'   & a unary operator $z=f(x)$, where $z$ and $x$ are scalars\\
\verb'GrB_BinaryOp'  & a binary operator $z=f(x,y)$, where $z$, $x$, and $y$ are scalars\\
\verb'GrB_IndexUnaryOp'  & an index-unary operator \\
\verb'GxB_IndexBinaryOp'  & an index-binary operator \\
\verb'GrB_Monoid'    & an associative and commutative binary operator  \\
                     & and its identity value \\
\verb'GrB_Semiring'  & a monoid that defines the ``plus'' and a binary operator\\
                     & that defines the ``multiply'' for an algebraic semiring \\
\verb'GrB_Matrix'    & a 2D sparse matrix of any type \\
\verb'GrB_Vector'    & a 1D sparse column vector of any type \\
\verb'GrB_Scalar'    & a scalar of any type \\
\verb'GrB_Descriptor'& a collection of parameters that modify an operation \\
\verb'GxB_Context'   & allocating computational resources \\
\verb'GxB_Iterator'  & a matrix/vector iterator (See Section~\ref{iter}) \\
\verb'GxB_Container' & for moving data between GraphBLAS and a user application \\
\hline
\end{tabular}
}
\vspace{0.1in}

Most of these objects are implemented in C as an opaque handle, which is a
pointer to a data structure held by GraphBLAS.  User applications may not
examine the content of the object directly; instead, they can pass the handle
back to GraphBLAS which will do the work.  Assigning one handle to another
is valid but it does not make a copy of the underlying object.

The \verb'GxB_Container' object is non-opaque but includes opaque objects
as its contents.  All other objects are entirely opaque.

\input{UserGuide/GrB_objects_Type.tex}
\input{UserGuide/GrB_objects_UnaryOp.tex}
\input{UserGuide/GrB_objects_BinaryOp.tex}
\input{UserGuide/GrB_objects_IndexUnaryOp.tex}
\input{UserGuide/GrB_objects_IndexBinaryOp.tex}
\input{UserGuide/GrB_objects_Monoid.tex}
\input{UserGuide/GrB_objects_Semiring.tex}
\input{UserGuide/GrB_objects_Scalar.tex}
\input{UserGuide/GrB_objects_Vector.tex}
\input{UserGuide/GrB_objects_Matrix.tex}
\input{UserGuide/GrB_objects_Serialize.tex}
\input{UserGuide/GrB_objects_Container.tex}
\input{UserGuide/GrB_objects_formats.tex}
\input{UserGuide/GrB_objects_import.tex}
\input{UserGuide/GrB_objects_sort.tex}
\input{UserGuide/GrB_objects_Descriptor.tex}
\input{UserGuide/GrB_objects_free.tex}