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:
Value |
Description |
---|---|
|
The operation completed successfully |
|
The NVPL_SPARSE library was not initialized. To correct: call The error also applies to generic APIs ( Generic APIs reference) for indicating a matrix/vector descriptor not initialized |
|
Resource allocation failed inside the NVPL_SPARSE library. This is usually caused by a host memory allocation failure To correct: prior to the function call, deallocate previously allocated memory as much as possible |
|
An unsupported value or parameter was passed to the function (a negative vector size, for example) To correct: ensure that all the parameters being passed have valid values |
|
The function requires a feature absent from the processor architecture To correct: compile and run the application on a processor with appropriate compute capability |
|
The program failed to execute. To correct: check that the hardware and the NVPL_SPARSE library are correctly installed |
|
An internal NVPL_SPARSE operation failed To correct: check that the hardware and the NVPL_SPARSE library are correctly installed. Also, check that the memory passed as a parameter to the routine is not being deallocated prior to the routine completion |
|
The matrix type is not supported by this function. This is usually caused by passing an invalid matrix descriptor to the function To correct: check that the fields in |
|
The operation or data type combination is currently not supported by the function |
|
The resources for the computation, such as memory, are not sufficient to complete the operation. The error can also indicate that the current computation mode (e.g., bit size of sparse matrix indices) does not allow to handle the given input |
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). |