Skip to content

Commit d742a1b

Browse files
authored
[oneMKL][spblas] Add sorted_by_rows property (#583)
* [oneMKL][spblas] Add sorted_by_rows property * Avoid new lines in table * an -> a * Reword description
1 parent 7687188 commit d742a1b

File tree

4 files changed

+47
-18
lines changed

4 files changed

+47
-18
lines changed

source/elements/oneMKL/source/domains/spblas/data_types/set_matrix_property.rst

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Matrix properties
1919
enum class matrix_property {
2020
symmetric,
2121
sorted,
22+
sorted_by_rows,
2223
};
2324
2425
}
@@ -28,23 +29,51 @@ Matrix properties
2829
holds all the given properties. A property can be set as a hint for backends
2930
to optimize some operations. Multiple properties can be set to the same handle.
3031

32+
symmetric
33+
^^^^^^^^^
34+
35+
Guarantees that the user-provided matrix data are symmetric, meaning the matrix
36+
is square, the user data contain both lower and upper triangular regions, and
37+
that its transpose is equal to itself.
38+
39+
sorted
40+
^^^^^^
41+
42+
Guarantees that the user-provided matrix data is fully sorted. The table below
43+
details the property for each matrix format:
44+
45+
.. list-table::
46+
:header-rows: 1
47+
:widths: 20 80
48+
49+
* - Matrix format
50+
- Description
51+
* - CSR
52+
- Guarantees that the column indices are sorted in ascending order for
53+
a given row.
54+
* - COO
55+
- Guarantees that the indices are sorted by rows then by columns within
56+
rows in ascending order.
57+
58+
sorted_by_rows
59+
^^^^^^^^^^^^^^
60+
61+
Guarantees that the user-provided matrix data is partially sorted. The table below
62+
details the property for each matrix format:
63+
3164
.. list-table::
3265
:header-rows: 1
3366
:widths: 20 80
3467

35-
* - Value
68+
* - Matrix format
3669
- Description
37-
* - ``symmetric``
38-
- Guarantees that the user-provided matrix data are symmetric, meaning
39-
the matrix is square, the user data contain both lower and upper
40-
triangular regions, and that its transpose is equal to itself.
41-
* - ``sorted``
42-
- | Guarantees that the user-provided matrix data has some sorting
43-
property.
44-
| For CSR this guarantees that the column indices are sorted in
45-
ascending order for a given row.
46-
| For COO this guarantees that the indices are sorted by row then by
47-
column in ascending order.
70+
* - CSR
71+
- Setting this property for a matrix using the CSR format will throw a
72+
:ref:`oneapi::mkl::invalid_argument<onemkl_exception_invalid_argument>`
73+
exception.
74+
* - COO
75+
- Guarantees that the indices are sorted by rows in ascending order.
76+
The column indices within a row do not need to be sorted.
4877

4978
set_matrix_property
5079
-------------------

source/elements/oneMKL/source/domains/spblas/operations/spmm.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ spmm
275275
some of the descriptor's data such as the ``workspace``.
276276
- In the general case, not calling the functions in the order specified above
277277
is undefined behavior. Not calling ``spmm_buffer_size`` or
278-
``spmm_optimize`` at least once with a given descriptor will throw an
278+
``spmm_optimize`` at least once with a given descriptor will throw a
279279
:ref:`oneapi::mkl::uninitialized<onemkl_exception_uninitialized>`
280280
exception. Calling ``spmm`` with arguments not matching ``spmm_optimize``
281-
will throw an
281+
will throw a
282282
:ref:`oneapi::mkl::invalid_argument<onemkl_exception_invalid_argument>`
283283
exception, unless stated otherwise.
284284
- The data of the dense handles ``B_handle`` and ``C_handle`` and the scalars

source/elements/oneMKL/source/domains/spblas/operations/spmv.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ spmv
269269
some of the descriptor's data such as the ``workspace``.
270270
- In the general case, not calling the functions in the order specified above
271271
is undefined behavior. Not calling ``spmv_buffer_size`` or
272-
``spmv_optimize`` at least once with a given descriptor will throw an
272+
``spmv_optimize`` at least once with a given descriptor will throw a
273273
:ref:`oneapi::mkl::uninitialized<onemkl_exception_uninitialized>`
274274
exception. Calling ``spmv`` with arguments not matching ``spmv_optimize``
275-
will throw an
275+
will throw a
276276
:ref:`oneapi::mkl::invalid_argument<onemkl_exception_invalid_argument>`
277277
exception, unless stated otherwise.
278278
- The data of the dense handles ``x_handle`` and ``y_handle`` and the scalars

source/elements/oneMKL/source/domains/spblas/operations/spsv.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ spsv
260260
some of the descriptor's data such as the ``workspace``.
261261
- In the general case, not calling the functions in the order specified above
262262
is undefined behavior. Not calling ``spsv_buffer_size`` or
263-
``spsv_optimize`` at least once with a given descriptor will throw an
263+
``spsv_optimize`` at least once with a given descriptor will throw a
264264
:ref:`oneapi::mkl::uninitialized<onemkl_exception_uninitialized>`
265265
exception. Calling ``spsv`` with arguments not matching ``spsv_optimize``
266-
will throw an
266+
will throw a
267267
:ref:`oneapi::mkl::invalid_argument<onemkl_exception_invalid_argument>`
268268
exception, unless stated otherwise.
269269
- The data of the dense handle ``x_handle`` and scalar ``alpha`` can be reset

0 commit comments

Comments
 (0)