NVPL Sparse Types Reference#
nvpl_sparse_data_type_t#
The section describes the types used in NVPL Sparse. The nvpl_sparse_data_type_t type is an enumerator to specify the data precision. It is used when the data reference does not carry the type itself (e.g. void*). For example, it is used in the routine nvpl_sparse_spmv().
Value |
Meaning |
Data Type |
Header |
|---|---|---|---|
|
The data type is 32-bit IEEE-754 floating-point |
|
|
|
The data type is 32-bit complex IEEE-754 floating-point |
|
complex.h |
|
The data type is 64-bit IEEE-754 floating-point |
|
|
|
The data type is 64-bit complex IEEE-754 floating-point |
|
complex.h |
|
The data type is 8-bit integer |
|
stdint.h |
|
The data type is 32-bit integer |
|
stdint.h |
For C++ code, std::complex<float> and std::complex<double> in <complex> can be used.
nvpl_sparse_status_t#
This data type represents the status returned by the library functions and it can have the following values:
nvpl_sparse_handle_t#
This is a pointer type to an opaque NVPL Sparse context, which the user must initialize by calling prior to calling nvpl_sparse_create() any other library function. The handle created and returned by nvpl_sparse_create() must be passed to every NVPL Sparse function.
nvpl_sparse_operation_t#
This type indicates which operations is applied to the related input (e.g. sparse matrix, or vector).
Value |
Meaning |
|---|---|
|
The non-transpose operation is selected. |
|
The transpose operation is selected. |
|
The conjugate transpose operation is selected. |
nvpl_sparse_diag_type_t#
This type indicates if the matrix diagonal entries are unity. The diagonal elements are always assumed to be present, but if NVPL_SPARSE_DIAG_TYPE_UNIT is passed to an API routine, then the routine assumes that all diagonal entries are unity and will not read or modify those entries. Note that in this case the routine assumes the diagonal entries are equal to one, regardless of what those entries are actually set to in memory.
Value |
Meaning |
|---|---|
|
The matrix diagonal has non-unit elements. |
|
The matrix diagonal has unit elements. |
nvpl_sparse_fill_mode_t#
This type indicates if the lower or upper part of a matrix is stored in sparse storage.
Value |
Meaning |
|---|---|
|
The lower triangular part is stored. |
|
The upper triangular part is stored. |
nvpl_sparse_index_base_t#
This type indicates if the base of the matrix indices is zero or one.
Value |
Meaning |
|---|---|
|
The base index is zero (C compatibility). |
|
The base index is one (Fortran compatibility). |