@@ -5163,7 +5163,7 @@ \subsubsection{{\sf GxB\_Matrix\_reshape:} reshape a matrix}
51635163 bool by_col, // true if reshape by column, false if by row
51645164 GrB_Index nrows_new, // new number of rows of C
51655165 GrB_Index ncols_new, // new number of columns of C
5166- const GrB_Descriptor desc // to control # of threads used
5166+ const GrB_Descriptor desc
51675167) ;
51685168\end{verbatim} } \end{mdframed}
51695169
@@ -5217,7 +5217,7 @@ \subsubsection{{\sf GxB\_Matrix\_reshapeDup:} reshape a matrix}
52175217 bool by_col, // true if reshape by column, false if by row
52185218 GrB_Index nrows_new, // number of rows of C
52195219 GrB_Index ncols_new, // number of columns of C
5220- const GrB_Descriptor desc // to control # of threads used
5220+ const GrB_Descriptor desc
52215221) ;
52225222\end{verbatim} } \end{mdframed}
52235223
@@ -5601,7 +5601,6 @@ \subsubsection{{\sf GxB\_Vector\_serialize:} serialize a vector}
56015601 // input:
56025602 GrB_Vector u, // vector to serialize
56035603 const GrB_Descriptor desc // descriptor to select compression method
5604- // and to control # of threads used
56055604) ;
56065605\end{verbatim}
56075606} \end{mdframed}
@@ -5656,7 +5655,7 @@ \subsubsection{{\sf GxB\_Vector\_deserialize:} deserialize a vector}
56565655 GrB_Type type, // type of the vector w. See GxB_Matrix_deserialize.
56575656 const void *blob, // the blob
56585657 GrB_Index blob_size, // size of the blob
5659- const GrB_Descriptor desc // to control # of threads used
5658+ const GrB_Descriptor desc
56605659) ;
56615660\end{verbatim}
56625661} \end{mdframed}
@@ -5748,7 +5747,6 @@ \subsubsection{{\sf GxB\_Matrix\_serialize:} serialize a matrix}
57485747 // input:
57495748 GrB_Matrix A, // matrix to serialize
57505749 const GrB_Descriptor desc // descriptor to select compression method
5751- // and to control # of threads used
57525750) ;
57535751\end{verbatim}
57545752} \end{mdframed}
@@ -5817,7 +5815,7 @@ \subsubsection{{\sf GxB\_Matrix\_deserialize:} deserialize a matrix}
58175815 // type of C.
58185816 const void *blob, // the blob
58195817 GrB_Index blob_size, // size of the blob
5820- const GrB_Descriptor desc // to control # of threads used
5818+ const GrB_Descriptor desc
58215819) ;
58225820\end{verbatim}
58235821} \end{mdframed}
@@ -7598,16 +7596,14 @@ \subsection{GraphBLAS descriptors: {\sf GrB\_Descriptor}} %=====================
75987596\begin{mdframed}[userdefinedwidth=6in]
75997597{\footnotesize
76007598\begin{verbatim}
7601- #define GxB_NTHREADS 5 // for both GrB_Desc_field and GxB_Option_field
7599+ #define GxB_NTHREADS 5 // for GxB_Option_field
76027600#define GxB_CHUNK 7
76037601typedef enum
76047602{
76057603 GrB_OUTP = 0, // descriptor for output of a method
76067604 GrB_MASK = 1, // descriptor for the mask input of a method
76077605 GrB_INP0 = 2, // descriptor for the first input of a method
76087606 GrB_INP1 = 3, // descriptor for the second input of a method
7609- GxB_DESCRIPTOR_NTHREADS = GxB_NTHREADS, // number of threads to use
7610- GxB_DESCRIPTOR_CHUNK = GxB_CHUNK, // chunk size for small problems
76117607 GxB_AxB_METHOD = 1000, // descriptor for selecting C=A*B algorithm
76127608 GxB_SORT = 35 // control sort in GrB_mxm
76137609 GxB_COMPRESSION = 36, // select compression for serialize
@@ -7775,17 +7771,12 @@ \subsection{GraphBLAS descriptors: {\sf GrB\_Descriptor}} %=====================
77757771
77767772 \end{itemize}
77777773
7778- \item \verb'GxB_NTHREADS' controls how many threads a method uses.
7779- By default (if set to zero, or \verb'GxB_DEFAULT'), all available threads
7780- are used. The maximum available threads is controlled by the global
7781- setting, which is \verb'omp_get_max_threads ( )' by default. If set to
7782- some positive integer \verb'nthreads' less than this maximum, at most
7783- \verb'nthreads' threads will be used. See Section~\ref{omp_parallelism}
7784- for details.
7774+ \item \verb'GxB_NTHREADS' controls how many threads a method uses, via
7775+ the descriptor, but is deprecated.
7776+ It will be removed from the descriptor entirely in v8.0.0.
77857777
7786- \item \verb'GxB_CHUNK' is a \verb'double' value that controls how many threads
7787- a method uses for small problems. See Section~\ref{omp_parallelism} for
7788- details.
7778+ \item \verb'GxB_CHUNK' is deprecated as used in the descriptor.
7779+ It will be removed from the descriptor entirely in v8.0.0.
77897780
77907781\item \verb'GxB_SORT' provides a hint to \verb'GrB_mxm', \verb'GrB_mxv',
77917782 \verb'GrB_vxm', and \verb'GrB_reduce' (to vector). These methods can leave
@@ -7894,7 +7885,7 @@ \subsubsection{{\sf GrB\_Descriptor\_set:} set a parameter in a descriptor}
78947885\verb'GrB_Descriptor_set' sets a descriptor field (\verb'GrB_OUTP',
78957886\verb'GrB_MASK', \verb'GrB_INP0', \verb'GrB_INP1', or \verb'GxB_AxB_METHOD') to
78967887a particular value. Use \verb'GxB_Dec_set' to set the value of
7897- \verb'GxB_NTHREADS', \verb'GxB_CHUNK', and \verb' GxB_SORT'.
7888+ \verb'GxB_SORT'.
78987889If an error occurs, \verb'GrB_error(&err,desc)' returns details about the error.
78997890
79007891\vspace{0.2in}
@@ -8046,16 +8037,6 @@ \subsubsection{{\sf GrB\_DESC\_*:} built-in descriptors}
80468037Attempts to modify them result in an error (\verb'GrB_INVALID_VALUE'); attempts
80478038to free them are silently ignored.
80488039
8049- % \verb'GrB_NULL' is the default descriptor, with all settings at their defaults:
8050- % \verb'OUTP': do not replace the output,
8051- % \verb'MASK': mask is valued and not complemented,
8052- % \verb'INP0': first input not transposed, and
8053- % \verb'INP1': second input not transposed.
8054- % For these pre-defined descriptors, the
8055- % \verb'GxB_NTHREADS',
8056- % \verb'GxB_CHUNK', and
8057- % \verb'GxB_SORT' settings are at their default values.
8058-
80598040\vspace{0.2in}
80608041\noindent
80618042{\footnotesize
@@ -8394,10 +8375,6 @@ \section{SuiteSparse:GraphBLAS Options} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83948375\verb'GrB_MASK' & \verb'GrB_Desc_Value' & mask option \\
83958376\verb'GrB_INP0' & \verb'GrB_Desc_Value' & transpose input 0 \\
83968377\verb'GrB_INP1' & \verb'GrB_Desc_Value' & transpose input 1 \\
8397- \verb'GxB_DESCRIPTOR_NTHREADS' & \verb'int' & number of threads to use \\
8398- \verb'GxB_NTHREADS' & \verb'int' & number of threads to use \\
8399- \verb'GxB_DESCRIPTOR_CHUNK' & \verb'double' & chunk size \\
8400- \verb'GxB_CHUNK' & \verb'double' & chunk size \\
84018378\verb'GxB_AxB_METHOD' & \verb'int' & method for matrix multiply \\
84028379\verb'GxB_SORT' & \verb'int' & lazy vs aggressive sort \\
84038380\verb'GxB_COMPRESSION' & \verb'int' & compression for serialization \\
@@ -8495,10 +8472,6 @@ \section{SuiteSparse:GraphBLAS Options} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84958472\verb'GrB_MASK' & \verb'GrB_Desc_Value' & mask option \\
84968473\verb'GrB_INP0' & \verb'GrB_Desc_Value' & transpose input 0 \\
84978474\verb'GrB_INP1' & \verb'GrB_Desc_Value' & transpose input 1 \\
8498- \verb'GxB_DESCRIPTOR_NTHREADS' & \verb'int' & number of threads to use \\
8499- \verb'GxB_NTHREADS' & \verb'int' & number of threads to use \\
8500- \verb'GxB_DESCRIPTOR_CHUNK' & \verb'double' & chunk size \\
8501- \verb'GxB_CHUNK' & \verb'double' & chunk size \\
85028475\verb'GxB_AxB_METHOD' & \verb'int' & method for matrix multiply \\
85038476\verb'GxB_SORT' & \verb'int' & lazy vs aggressive sort \\
85048477\verb'GxB_COMPRESSION' & \verb'int' & compression for serialization \\
@@ -8544,19 +8517,9 @@ \subsection{OpenMP parallelism}
85448517 GxB_set (GxB_NTHREADS, nthreads_max) ;
85458518 GxB_set (GxB_CHUNK, (double) 20000) ; \end{verbatim} }
85468519
8547- \item Per operation: Most GraphBLAS operations take a \verb'GrB_Descriptor'
8548- input, and this can be modified to set the number of threads and chunk
8549- size for the operation that uses this descriptor. Note that \verb'chunk'
8550- is a \verb'double'.
8551-
8552- {\footnotesize
8553- \begin{verbatim}
8554- GrB_Descriptor desc ;
8555- GrB_Descriptor_new (&desc)
8556- int nthreads_max = 40 ;
8557- GxB_set (desc, GxB_NTHREADS, nthreads_max) ;
8558- double chunk = 20000 ;
8559- GxB_set (desc, GxB_CHUNK, chunk) ; \end{verbatim} }
8520+ \item Per operation: Setting the number of threads and the chunk
8521+ size in the descriptor is deprecated.
8522+ It will be removed entirely in v8.0.0 from the descriptor.
85608523
85618524\end{itemize}
85628525
@@ -8568,15 +8531,9 @@ \subsection{OpenMP parallelism}
85688531The default for \verb'nthreads_max' is the return value from
85698532\verb'omp_get_max_threads', and the default chunk size is currently 65,536.
85708533
8571- If a descriptor value for either parameter is left at its default, or set to
8572- \verb'GxB_DEFAULT', then the global setting is used. This global setting may
8573- have been modified from its default, and this modified value will be used.
8574-
85758534For example, suppose \verb'omp_get_max_threads' reports 8 threads. If \newline
85768535\verb'GxB_set (GxB_NTHREADS, 4)' is used, then the global setting is four
8577- threads, not eight. If a descriptor is used but its \verb'GxB_NTHREADS' is not
8578- set, or set to \verb'GxB_DEFAULT', then any operation that uses this descriptor
8579- will use 4 threads.
8536+ threads, not eight.
85808537
85818538GraphBLAS may be compiled without OpenMP, by setting \verb'-DNOPENMP=1'.
85828539The library will be thread-safe, with one exception. \verb'GrB_wait' is
@@ -9145,8 +9102,8 @@ \subsection{{\sf GxB\_Desc\_set:} set a {\sf GrB\_Descriptor} value}
91459102
91469103This usage is similar to \verb'GrB_Descriptor_set', just with a name that is
91479104consistent with the other usages of this generic function. Unlike
9148- \verb'GrB_Descriptor_set', the \verb'field' may also be \verb'GxB_NTHREADS',
9149- \verb'GxB_CHUNK', \verb' GxB_SORT', \verb'GxB_COMPRESSION', or
9105+ \verb'GrB_Descriptor_set', the \verb'field' may also be
9106+ \verb'GxB_SORT', \verb'GxB_COMPRESSION', or
91509107\verb'GxB_IMPORT'. Refer to Sections~\ref{descriptor_set}~and~\ref{desc_set}
91519108for details. If an error occurs, \verb'GrB_error(&err,desc)' returns details
91529109about the error.
@@ -9333,8 +9290,6 @@ \subsection{{\sf GxB\_Desc\_get:} retrieve a {\sf GrB\_Descriptor} value}
93339290This usage is the same as \verb'GxB_Desc_get'. The \verb'field' parameter can
93349291be \verb'GrB_OUTP', \verb'GrB_MASK', \verb'GrB_INP0', \verb'GrB_INP1',
93359292\verb'GxB_AxB_METHOD',
9336- \verb'GxB_NTHREADS',
9337- \verb'GxB_CHUNK',
93389293\verb'GxB_SORT',
93399294\verb'GxB_COMPRESSION', or
93409295\verb'GxB_IMPORT'.
@@ -9458,10 +9413,6 @@ \subsection{Summary of usage of {\sf GxB\_set} and {\sf GxB\_get}}
94589413 GxB_set (GrB_Descriptor d, GxB_AxB_METHOD, GxB_AxB_SAXPY) ;
94599414 GxB_set (GrB_Descriptor d, GxB_AxB_METHOD, GxB_AxB_DOT) ;
94609415 GxB_get (GrB_Descriptor d, GrB_AxB_METHOD, GrB_Desc_Value *v) ;
9461- GxB_set (GrB_Descriptor d, GxB_NTHREADS, int nthreads) ;
9462- GxB_get (GrB_Descriptor d, GxB_NTHREADS, int *nthreads) ;
9463- GxB_set (GrB_Descriptor d, GxB_CHUNK, double chunk) ;
9464- GxB_get (GrB_Descriptor d, GxB_CHUNK, double *chunk) ;
94659416 GxB_set (GrB_Descriptor d, GxB_SORT, sort) ;
94669417 GxB_get (GrB_Descriptor d, GxB_SORT, int *sort) ;
94679418 GxB_set (GrB_Descriptor d, GxB_COMPRESSION, GxB_FAST_IMPORT) ;
@@ -15542,6 +15493,10 @@ \section{Release Notes}
1554215493
1554315494 \begin{itemize}
1554415495 \item minor change to build system: for SuiteSparse v7.0.0.
15496+ \item deprecation notice: in GraphBLAS v8.0.0, the ability to set the
15497+ number of threads, and chunk size, in the descriptor will be removed.
15498+ It still appears in v7.x, but will be replaced by a Context object
15499+ in v8.0.0.
1554515500 \end{itemize}
1554615501
1554715502\item Version 7.4.1 (Dec 29, 2022)
0 commit comments