SPARSE Matrix Runtime Library APIs
This section describes the Fortran interfaces to the CUDA cuSPARSE library. The cuSPARSE functions are only accessible from host code. All of the runtime API routines are integer functions that return an error code; they return a value of CUSPARSE_STATUS_SUCCESS if the call was successful, or another cuSPARSE status return value if there was an error.
Chapter 10 contains examples of accessing the cuSPARSE library routines from OpenACC and CUDA Fortran. In both cases, the interfaces to the library can be exposed by adding the line
use cusparse
to your program unit.
A number of the function interfaces listed in this chapter can take host or device scalar arguments. Those functions have an additional v2 interface, which does not implicitly manage the pointer mode for these calls. See section 1.6 for further discussion on the handling of pointer modes.
Unless a specific kind is provided, the plain integer type used in the interfaces implies integer(4) and the plain real type implies real(4).
CUSPARSE Definitions and Helper Functions
This section contains definitions and data types used in the cuSPARSE library and interfaces to the cuSPARSE helper functions.
The cuSPARSE module contains the following derived type definitions:
type cusparseHandle
type(c_ptr) :: handle
end type cusparseHandle
type :: cusparseMatDescr
type(c_ptr) :: descr
end type cusparseMatDescr
! This type was removed in CUDA 11.0
type cusparseSolveAnalysisInfo
type(c_ptr) :: info
end type cusparseSolveAnalysisInfo
! This type was removed in CUDA 11.0
type cusparseHybMat
type(c_ptr) :: mat
end type cusparseHybMat
type cusparseCsrsv2Info
type(c_ptr) :: info
end type cusparseCsrsv2Info
type cusparseCsric02Info
type(c_ptr) :: info
end type cusparseCsric02Info
type cusparseCsrilu02Info
type(c_ptr) :: info
end type cusparseCsrilu02Info
type cusparseBsrsv2Info
type(c_ptr) :: info
end type cusparseBsrsv2Info
type cusparseBsric02Info
type(c_ptr) :: info
end type cusparseBsric02Info
type cusparseBsrilu02Info
type(c_ptr) :: info
end type cusparseBsrilu02Info
type cusparseBsrsm2Info
type(c_ptr) :: info
end type cusparseBsrsm2Info
type cusparseCsrgemm2Info
type(c_ptr) :: info
end type cusparseCsrgemm2Info
type cusparseColorInfo
type(c_ptr) :: info
end type cusparseColorInfo
type cusparseCsru2csrInfo
type(c_ptr) :: info
end type cusparseCsru2csrInfo
type cusparseSpVecDescr
type(c_ptr) :: descr
end type cusparseSpVecDescr
type cusparseDnVecDescr
type(c_ptr) :: descr
end type cusparseDnVecDescr
type cusparseSpMatDescr
type(c_ptr) :: descr
end type cusparseSpMatDescr
type cusparseDnMatDescr
type(c_ptr) :: descr
end type cusparseDnMatDescr
type cusparseSpSVDescr
type(c_ptr) :: descr
end type cusparseSpSVDescr
type cusparseSpSMDescr
type(c_ptr) :: descr
end type cusparseSpSMDescr
type cusparseSpGEMMDescr
type(c_ptr) :: descr
end type cusparseSpGEMMDescr
The cuSPARSE module contains the following constants and enumerations:
! cuSPARSE Version Info
integer, parameter :: CUSPARSE_VER_MAJOR = 12
integer, parameter :: CUSPARSE_VER_MINOR = 1
integer, parameter :: CUSPARSE_VER_PATCH = 2
integer, parameter :: CUSPARSE_VER_BUILD = 129
integer, parameter :: CUSPARSE_VERSION = (CUSPARSE_VER_MAJOR * 1000 + &
CUSPARSE_VER_MINOR * 100 + CUSPARSE_VER_PATCH)
! cuSPARSE status return values
enum, bind(C) ! cusparseStatus_t
enumerator :: CUSPARSE_STATUS_SUCCESS=0
enumerator :: CUSPARSE_STATUS_NOT_INITIALIZED=1
enumerator :: CUSPARSE_STATUS_ALLOC_FAILED=2
enumerator :: CUSPARSE_STATUS_INVALID_VALUE=3
enumerator :: CUSPARSE_STATUS_ARCH_MISMATCH=4
enumerator :: CUSPARSE_STATUS_MAPPING_ERROR=5
enumerator :: CUSPARSE_STATUS_EXECUTION_FAILED=6
enumerator :: CUSPARSE_STATUS_INTERNAL_ERROR=7
enumerator :: CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED=8
enumerator :: CUSPARSE_STATUS_ZERO_PIVOT=9
enumerator :: CUSPARSE_STATUS_NOT_SUPPORTED=10
enumerator :: CUSPARSE_STATUS_INSUFFICIENT_RESOURCES=11
end enum
enum, bind(c) ! cusparsePointerMode_t
enumerator :: CUSPARSE_POINTER_MODE_HOST = 0
enumerator :: CUSPARSE_POINTER_MODE_DEVICE = 1
end enum
enum, bind(c) ! cusparseAction_t
enumerator :: CUSPARSE_ACTION_SYMBOLIC = 0
enumerator :: CUSPARSE_ACTION_NUMERIC = 1
end enum
enum, bind(C) ! cusparseMatrixType_t
enumerator :: CUSPARSE_MATRIX_TYPE_GENERAL = 0
enumerator :: CUSPARSE_MATRIX_TYPE_SYMMETRIC = 1
enumerator :: CUSPARSE_MATRIX_TYPE_HERMITIAN = 2
enumerator :: CUSPARSE_MATRIX_TYPE_TRIANGULAR = 3
end enum
enum, bind(C) ! cusparseFillMode_t
enumerator :: CUSPARSE_FILL_MODE_LOWER = 0
enumerator :: CUSPARSE_FILL_MODE_UPPER = 1
end enum
enum, bind(C) ! cusparseDiagType_t
enumerator :: CUSPARSE_DIAG_TYPE_NON_UNIT = 0
enumerator :: CUSPARSE_DIAG_TYPE_UNIT = 1
end enum
enum, bind(C) ! cusparseIndexBase_t
enumerator :: CUSPARSE_INDEX_BASE_ZERO = 0
enumerator :: CUSPARSE_INDEX_BASE_ONE = 1
end enum
enum, bind(C) ! cusparseOperation_t
enumerator :: CUSPARSE_OPERATION_NON_TRANSPOSE = 0
enumerator :: CUSPARSE_OPERATION_TRANSPOSE = 1
enumerator :: CUSPARSE_OPERATION_CONJUGATE_TRANSPOSE = 2
end enum
enum, bind(C) ! cusparseDirection_t
enumerator :: CUSPARSE_DIRECTION_ROW = 0
enumerator :: CUSPARSE_DIRECTION_COLUMN = 1
end enum
enum, bind(C) ! cusparseHybPartition_t
enumerator :: CUSPARSE_HYB_PARTITION_AUTO = 0
enumerator :: CUSPARSE_HYB_PARTITION_USER = 1
enumerator :: CUSPARSE_HYB_PARTITION_MAX = 2
end enum
enum, bind(C) ! cusparseSolvePolicy_t
enumerator :: CUSPARSE_SOLVE_POLICY_NO_LEVEL = 0
enumerator :: CUSPARSE_SOLVE_POLICY_USE_LEVEL = 1
end enum
enum, bind(C) ! cusparseSideMode_t
enumerator :: CUSPARSE_SIDE_LEFT = 0
enumerator :: CUSPARSE_SIDE_RIGHT = 1
end enum
enum, bind(C) ! cusparseColorAlg_t
enumerator :: CUSPARSE_COLOR_ALG0 = 0
enumerator :: CUSPARSE_COLOR_ALG1 = 1
end enum
enum, bind(C) ! cusparseAlgMode_t;
enumerator :: CUSPARSE_ALG0 = 0
enumerator :: CUSPARSE_ALG1 = 1
enumerator :: CUSPARSE_ALG_NAIVE = 0
enumerator :: CUSPARSE_ALG_MERGE_PATH = 0
end enum
enum, bind(C) ! cusparseCsr2CscAlg_t;
enumerator :: CUSPARSE_CSR2CSC_ALG_DEFAULT = 1
enumerator :: CUSPARSE_CSR2CSC_ALG1 = 1
enumerator :: CUSPARSE_CSR2CSC_ALG2 = 2
end enum
enum, bind(C) ! cusparseFormat_t;
enumerator :: CUSPARSE_FORMAT_CSR = 1
enumerator :: CUSPARSE_FORMAT_CSC = 2
enumerator :: CUSPARSE_FORMAT_COO = 3
enumerator :: CUSPARSE_FORMAT_COO_AOS = 4
enumerator :: CUSPARSE_FORMAT_BLOCKED_ELL = 5
enumerator :: CUSPARSE_FORMAT_BSR = 6
enumerator :: CUSPARSE_FORMAT_SLICED_ELLPACK = 7
end enum
enum, bind(C) ! cusparseOrder_t;
enumerator :: CUSPARSE_ORDER_COL = 1
enumerator :: CUSPARSE_ORDER_ROW = 2
end enum
enum, bind(C) ! cusparseSpMVAlg_t;
enumerator :: CUSPARSE_MV_ALG_DEFAULT = 0
enumerator :: CUSPARSE_COOMV_ALG = 1
enumerator :: CUSPARSE_CSRMV_ALG1 = 2
enumerator :: CUSPARSE_CSRMV_ALG2 = 3
enumerator :: CUSPARSE_SPMV_ALG_DEFAULT = 0
enumerator :: CUSPARSE_SPMV_CSR_ALG1 = 2
enumerator :: CUSPARSE_SPMV_CSR_ALG2 = 3
enumerator :: CUSPARSE_SPMV_COO_ALG1 = 1
enumerator :: CUSPARSE_SPMV_COO_ALG2 = 4
enumerator :: CUSPARSE_SPMV_SELL_ALG1 = 5
end enum
enum, bind(C) ! cusparseSpMMAlg_t;
enumerator :: CUSPARSE_MM_ALG_DEFAULT = 0
enumerator :: CUSPARSE_COOMM_ALG1 = 1
enumerator :: CUSPARSE_COOMM_ALG2 = 2
enumerator :: CUSPARSE_COOMM_ALG3 = 3
enumerator :: CUSPARSE_CSRMM_ALG1 = 4
enumerator :: CUSPARSE_SPMM_ALG_DEFAULT = 0
enumerator :: CUSPARSE_SPMM_COO_ALG1 = 1
enumerator :: CUSPARSE_SPMM_COO_ALG2 = 2
enumerator :: CUSPARSE_SPMM_COO_ALG3 = 3
enumerator :: CUSPARSE_SPMM_COO_ALG4 = 5
enumerator :: CUSPARSE_SPMM_CSR_ALG1 = 4
enumerator :: CUSPARSE_SPMM_CSR_ALG2 = 6
enumerator :: CUSPARSE_SPMM_CSR_ALG3 = 12
enumerator :: CUSPARSE_SPMM_BLOCKED_ELL_ALG1 = 13
end enum
enum, bind(C) ! cusparseIndexType_t;
enumerator :: CUSPARSE_INDEX_16U = 1
enumerator :: CUSPARSE_INDEX_32I = 2
enumerator :: CUSPARSE_INDEX_64I = 3
end enum
enum, bind(C) ! cusparseSpMatAttribute_t;
enumerator :: CUSPARSE_SPMAT_FILL_MODE = 0
enumerator :: CUSPARSE_SPMAT_DIAG_TYPE = 1
end enum
enum, bind(C) ! cusparseSparseToDenseAlg_t;
enumerator :: CUSPARSE_SPARSETODENSE_ALG_DEFAULT = 0
enumerator :: CUSPARSE_DENSETOSPARSE_ALG_DEFAULT = 0
end enum
enum, bind(C) ! cusparseSpSVAlg_t;
enumerator :: CUSPARSE_SPSV_ALG_DEFAULT = 0
end enum
enum, bind(C) ! cusparseSpSVUpdate_t;
enumerator :: CUSPARSE_SPSV_UPDATE_GENERAL = 0
enumerator :: CUSPARSE_SPSV_UPDATE_DIAGONAL = 1
end enum
enum, bind(C) ! cusparseSpSMAlg_t;
enumerator :: CUSPARSE_SPSM_ALG_DEFAULT = 0
end enum
enum, bind(C) ! cusparseSpMMOpAlg_t;
enumerator :: CUSPARSE_SPMM_OP_ALG_DEFAULT = 0
end enum
enum, bind(C) ! cusparseSpGEMMAlg_t;
enumerator :: CUSPARSE_SPGEMM_DEFAULT = 0
enumerator :: CUSPARSE_SPGEMM_CSR_ALG_DETERMINISTIC = 1
enumerator :: CUSPARSE_SPGEMM_CSR_ALG_DETERMINITIC = 1
enumerator :: CUSPARSE_SPGEMM_CSR_ALG_NONDETERMINISTIC = 2
enumerator :: CUSPARSE_SPGEMM_CSR_ALG_NONDETERMINITIC = 2
enumerator :: CUSPARSE_SPGEMM_ALG1 = 3
enumerator :: CUSPARSE_SPGEMM_ALG2 = 4
enumerator :: CUSPARSE_SPGEMM_ALG3 = 5
end enum
enum, bind(C) ! cusparseSDDMMAlg_t;
enumerator :: CUSPARSE_SDDMM_ALG_DEFAULT = 0
end enum
cusparseCreate
This function initializes the cuSPARSE library and creates a handle on the cuSPARSE context. It must be called before any other cuSPARSE API function is invoked. It allocates hardware resources necessary for accessing the GPU.
integer(4) function cusparseCreate(handle)
type(cusparseHandle) :: handle
cusparseDestroy
This function releases CPU-side resources used by the cuSPARSE library. The release of GPU-side resources may be deferred until the application shuts down.
integer(4) function cusparseDestroy(handle)
type(cusparseHandle) :: handle
cusparseGetErrorName
This function returns the error code name.
character*128 function cusparseGetErrorName(ierr)
integer(c_int) :: ierr
cusparseGetErrorString
This function returns the description string for an error code.
character*128 function cusparseGetErrorString(ierr)
integer(c_int) :: ierr
cusparseGetVersion
This function returns the version number of the cuSPARSE library.
integer(4) function cusparseGetVersion(handle, version)
type(cusparseHandle) :: handle
integer(c_int) :: version
cusparseSetStream
This function sets the stream to be used by the cuSPARSE library to execute its routines.
integer(4) function cusparseSetStream(handle, stream)
type(cusparseHandle) :: handle
integer(cuda_stream_kind) :: stream
cusparseGetStream
This function gets the stream used by the cuSPARSE library to execute its routines. If the cuSPARSE library stream is not set, all kernels use the default NULL stream.
integer(4) function cusparseGetStream(handle, stream)
type(cusparseHandle) :: handle
integer(cuda_stream_kind) :: stream
cusparseGetPointerMode
This function obtains the pointer mode used by the cuSPARSE library. Please see section 1.6 for more details on pointer modes.
integer(4) function cusparseGetPointerMode(handle, mode)
type(cusparseHandle) :: handle
integer(c_int) :: mode
cusparseSetPointerMode
This function sets the pointer mode used by the cuSPARSE library. In these Fortran interfaces, this only has an effect when using the *_v2 interfaces. The default is for the values to be passed by reference on the host. Please see section 1.6 for more details on pointer modes.
integer(4) function cusparseSetPointerMode(handle, mode)
type(cusparseHandle) :: handle
integer(4) :: mode
cusparseCreateMatDescr
This function initializes the matrix descriptor. It sets the fields MatrixType and IndexBase to the default values CUSPARSE_MATRIX_TYPE_GENERAL and CUSPARSE_INDEX_BASE_ZERO , respectively, while leaving other fields uninitialized.
integer(4) function cusparseCreateMatDescr(descrA)
type(cusparseMatDescr) :: descrA
cusparseDestroyMatDescr
This function releases the memory allocated for the matrix descriptor.
integer(4) function cusparseDestroyMatDescr(descrA)
type(cusparseMatDescr) :: descrA
cusparseSetMatType
This function sets the MatrixType of the matrix descriptor descrA.
integer(4) function cusparseSetMatType(descrA, type)
type(cusparseMatDescr) :: descrA
integer(4) :: type
cusparseGetMatType
This function returns the MatrixType of the matrix descriptor descrA.
integer(4) function cusparseGetMatType(descrA)
type(cusparseMatDescr) :: descrA
cusparseSetMatFillMode
This function sets the FillMode field of the matrix descriptor descrA.
integer(4) function cusparseSetMatFillMode(descrA, mode)
type(cusparseMatDescr) :: descrA
integer(4) :: mode
cusparseGetMatFillMode
This function returns the FillMode field of the matrix descriptor descrA.
integer(4) function cusparseGetMatFillMode(descrA)
type(cusparseMatDescr) :: descrA
cusparseSetMatDiagType
This function sets the DiagType of the matrix descriptor descrA.
integer(4) function cusparseSetMatDiagType(descrA, type)
type(cusparseMatDescr) :: descrA
integer(4) :: type
cusparseGetMatDiagType
This function returns the DiagType of the matrix descriptor descrA.
integer(4) function cusparseGetMatDiagType(descrA)
type(cusparseMatDescr) :: descrA
cusparseSetMatIndexBase
This function sets the IndexBase field of the matrix descriptor descrA.
integer(4) function cusparseSetMatIndexBase(descrA, base)
type(cusparseMatDescr) :: descrA
integer(4) :: base
cusparseGetMatIndexBase
This function returns the IndexBase field of the matrix descriptor descrA.
integer(4) function cusparseGetMatIndexBase(descrA)
type(cusparseMatDescr) :: descrA
cusparseCreateSolveAnalysisInfo
This function creates and initializes the solve and analysis structure to default values. This function, and all functions which use the cusparseSolveAnalysisInfo type, were removed in CUDA 11.0.
integer(4) function cusparseCreateSolveAnalysisInfo(info)
type(cusparseSolveAnalysisinfo) :: info
cusparseDestroySolveAnalysisInfo
This function destroys and releases any memory required by the structure. This function, and all functions which use the cusparseSolveAnalysisInfo type, were removed in CUDA 11.0.
integer(4) function cusparseDestroySolveAnalysisInfo(info)
type(cusparseSolveAnalysisinfo) :: info
cusparseGetLevelInfo
This function returns the number of levels and the assignment of rows into the levels computed by either the csrsv_analysis, csrsm_analysis or hybsv_analysis routines.
integer(4) function cusparseGetLevelInfo(handle, info, nlevels, levelPtr, levelInd)
type(cusparseHandle) :: handle
type(cusparseSolveAnalysisinfo) :: info
integer(c_int) :: nlevels
type(c_ptr) :: levelPtr
type(c_ptr) :: levelInd
cusparseCreateHybMat
This function creates and initializes the hybA opaque data structure. This function, and all functions which use the cusparseHybMat type, were removed in CUDA 11.0.
integer(4) function cusparseCreateHybMat(hybA)
type(cusparseHybMat) :: hybA
cusparseDestroyHybMat
This function destroys and releases any memory required by the hybA structure. This function, and all functions which use the cusparseHybMat type, were removed in CUDA 11.0.
integer(4) function cusparseDestroyHybMat(hybA)
type(cusparseHybMat) :: hybA
cusparseCreateCsrsv2Info
This function creates and initializes the solve and analysis structure of csrsv2 to default values.
integer(4) function cusparseCreateCsrsv2Info(info)
type(cusparseCsrsv2Info) :: info
cusparseDestroyCsrsv2Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyCsrsv2Info(info)
type(cusparseCsrsv2Info) :: info
cusparseCreateCsric02Info
This function creates and initializes the solve and analysis structure of incomplete Cholesky to default values.
integer(4) function cusparseCreateCsric02Info(info)
type(cusparseCsric02Info) :: info
cusparseDestroyCsric02Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyCsric02Info(info)
type(cusparseCsric02Info) :: info
cusparseCreateCsrilu02Info
This function creates and initializes the solve and analysis structure of incomplete LU to default values.
integer(4) function cusparseCreateCsrilu02Info(info)
type(cusparseCsrilu02Info) :: info
cusparseDestroyCsrilu02Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyCsrilu02Info(info)
type(cusparseCsrilu02Info) :: info
cusparseCreateBsrsv2Info
This function creates and initializes the solve and analysis structure of bsrsv2 to default values.
integer(4) function cusparseCreateBsrsv2Info(info)
type(cusparseBsrsv2Info) :: info
cusparseDestroyBsrsv2Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyBsrsv2Info(info)
type(cusparseBsrsv2Info) :: info
cusparseCreateBsric02Info
This function creates and initializes the solve and analysis structure of block incomplete Cholesky to default values.
integer(4) function cusparseCreateBsric02Info(info)
type(cusparseBsric02Info) :: info
cusparseDestroyBsric02Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyBsric02Info(info)
type(cusparseBsric02Info) :: info
cusparseCreateBsrilu02Info
This function creates and initializes the solve and analysis structure of block incomplete LU to default values.
integer(4) function cusparseCreateBsrilu02Info(info)
type(cusparseBsrilu02Info) :: info
cusparseDestroyBsrilu02Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyBsrilu02Info(info)
type(cusparseBsrilu02Info) :: info
cusparseCreateBsrsm2Info
This function creates and initializes the solve and analysis structure of bsrsm2 to default values.
integer(4) function cusparseCreateBsrsm2Info(info)
type(cusparseBsrsm2Info) :: info
cusparseDestroyBsrsm2Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyBsrsm2Info(info)
type(cusparseBsrsm2Info) :: info
cusparseCreateCsrgemm2Info
This function creates and initializes the analysis structure of general sparse matrix-matrix multiplication.
integer(4) function cusparseCreateCsrgemm2Info(info)
type(cusparseCsrgemm2Info) :: info
cusparseDestroyCsrgemm2Info
This function destroys and releases any memory required by the structure.
integer(4) function cusparseDestroyCsrgemm2Info(info)
type(cusparseCsrgemm2Info) :: info
cusparseCreateColorInfo
This function creates coloring information used in calls like CSRCOLOR.
integer(4) function cusparseCreateColorInfo(info)
type(cusparseColorInfo) :: info
cusparseDestroyColorInfo
This function destroys coloring information used in calls like CSRCOLOR.
integer(4) function cusparseDestroyColorInfo(info)
type(cusparseColorInfo) :: info
cusparseCreateCsru2csrInfo
This function creates sorting information used in calls like CSRU2CSR.
integer(4) function cusparseCreateCsru2csrInfo(info)
type(cusparseCsru2csrInfo) :: info
cusparseDestroyCsru2csrInfo
This function creates sorting information used in calls like CSRU2CSR.
integer(4) function cusparseDestroyCsru2csrInfo(info)
type(cusparseCsru2csrInfo) :: info
CUSPARSE Level 1 Functions
This section contains interfaces for the level 1 sparse linear algebra functions that perform operations between dense and sparse vectors.
cusparseSaxpyi
SAXPY performs constant times a vector plus a vector. This function multiplies the vector x in sparse format by the constant alpha and adds the result to the vector y in dense format, i.e. y = y + alpha * xVal(xInd)
integer(4) function cusparseSaxpyi(handle, nnz, alpha, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
real(4), device :: alpha ! device or host variable
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
real(4), device :: y(*)
integer :: idxBase
cusparseDaxpyi
DAXPY performs constant times a vector plus a vector. This function multiplies the vector x in sparse format by the constant alpha and adds the result to the vector y in dense format, i.e. y = y + alpha * xVal(xInd)
integer(4) function cusparseDaxpyi(handle, nnz, alpha, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
real(8), device :: alpha ! device or host variable
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
real(8), device :: y(*)
integer :: idxBase
cusparseCaxpyi
CAXPY performs constant times a vector plus a vector. This function multiplies the vector x in sparse format by the constant alpha and adds the result to the vector y in dense format, i.e. y = y + alpha * xVal(xInd)
integer(4) function cusparseCaxpyi(handle, nnz, alpha, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
complex(4), device :: alpha ! device or host variable
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
complex(4), device :: y(*)
integer :: idxBase
cusparseZaxpyi
ZAXPY performs constant times a vector plus a vector. This function multiplies the vector x in sparse format by the constant alpha and adds the result to the vector y in dense format, i.e. y = y + alpha * xVal(xInd)
integer(4) function cusparseZaxpyi(handle, nnz, alpha, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
complex(8), device :: alpha ! device or host variable
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
complex(8), device :: y(*)
integer :: idxBase
cusparseSdoti
SDOT forms the dot product of two vectors. This function returns the dot product of a vector x in sparse format and vector y in dense format, i.e. res = sum(y * xVal(xInd))
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpVV
integer(4) function cusparseSdoti(handle, nnz, xVal, xInd, y, res, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
real(4), device :: y(*)
real(4), device :: res ! device or host variable
integer :: idxBase
cusparseDdoti
DDOT forms the dot product of two vectors. This function returns the dot product of a vector x in sparse format and vector y in dense format, i.e. res = sum(y * xVal(xInd))
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpVV
integer(4) function cusparseDdoti(handle, nnz, xVal, xInd, y, res, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
real(8), device :: y(*)
real(8), device :: res ! device or host variable
integer :: idxBase
cusparseCdoti
CDOT forms the dot product of two vectors. This function returns the dot product of a vector x in sparse format and vector y in dense format, i.e. res = sum(y * xVal(xInd))
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpVV
integer(4) function cusparseCdoti(handle, nnz, xVal, xInd, y, res, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
complex(4), device :: y(*)
complex(4), device :: res ! device or host variable
integer :: idxBase
cusparseZdoti
ZDOT forms the dot product of two vectors. This function returns the dot product of a vector x in sparse format and vector y in dense format, i.e. res = sum(y * xVal(xInd))
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpVV
integer(4) function cusparseZdoti(handle, nnz, xVal, xInd, y, res, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
complex(8), device :: y(*)
complex(8), device :: res ! device or host variable
integer :: idxBase
cusparseCdotci
CDOTC forms the dot product of two vectors, conjugating the first vector. This function returns the dot product of a vector x in sparse format and vector y in dense format, i.e. res = sum(y * conjg(xVal(xInd))
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpVV
integer(4) function cusparseCdotci(handle, nnz, xVal, xInd, y, res, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
complex(4), device :: y(*)
complex(4), device :: res ! device or host variable
integer :: idxBase
cusparseZdotci
ZDOTC forms the dot product of two vectors, conjugating the first vector. This function returns the dot product of a vector x in sparse format and vector y in dense format, i.e. res = sum(y * conjg(xVal(xInd))
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpVV
integer(4) function cusparseZdotci(handle, nnz, xVal, xInd, y, res, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
complex(8), device :: y(*)
complex(8), device :: res ! device or host variable
integer :: idxBase
cusparseSgthr
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd) Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseSgthr(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
real(4), device :: y(*)
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseDgthr
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd) Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseDgthr(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
real(8), device :: y(*)
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseCgthr
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd) Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseCgthr(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
complex(4), device :: y(*)
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseZgthr
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd) Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseZgthr(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
complex(8), device :: y(*)
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseSgthrz
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd); y(xInd) = 0.0 Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseSgthrz(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
real(4), device :: y(*)
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseDgthrz
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd); y(xInd) = 0.0 Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseDgthrz(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
real(8), device :: y(*)
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseCgthrz
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd); y(xInd) = 0.0 Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseCgthrz(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
complex(4), device :: y(*)
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseZgthrz
This function gathers the elements of the vector y listed in the index array xInd into data array xVal, i.e. xVal = y(xInd); y(xInd) = 0.0 Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseZgthrz(handle, nnz, y, xVal, xInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
complex(8), device :: y(*)
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
integer(4) :: idxBase
cusparseSsctr
This function scatters the elements of the dense format vector x into the vector y in sparse format, i.e. y(xInd) = x Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseSsctr(handle, nnz, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
real(4), device :: y(*)
integer(4) :: idxBase
cusparseDsctr
This function scatters the elements of the dense format vector x into the vector y in sparse format, i.e. y(xInd) = x Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseDsctr(handle, nnz, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
real(8), device :: y(*)
integer(4) :: idxBase
cusparseCsctr
This function scatters the elements of the dense format vector x into the vector y in sparse format, i.e. y(xInd) = x Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseCsctr(handle, nnz, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
complex(4), device :: y(*)
integer(4) :: idxBase
cusparseZsctr
This function scatters the elements of the dense format vector x into the vector y in sparse format, i.e. y(xInd) = x Fortran programmers should normally use idxBase == 1.
integer(4) function cusparseZsctr(handle, nnz, xVal, xInd, y, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
complex(8), device :: y(*)
integer(4) :: idxBase
cusparseSroti
SROT applies a plane rotation. X is a sparse vector and Y is dense.
integer(4) function cusparseSroti(handle, nnz, xVal, xInd, y, c, s, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
real(4), device :: y(*)
real(4), device :: c, s ! device or host variable
integer :: idxBase
cusparseDroti
DROT applies a plane rotation. X is a sparse vector and Y is dense.
integer(4) function cusparseDroti(handle, nnz, xVal, xInd, y, c, s, idxBase)
type(cusparseHandle) :: handle
integer :: nnz
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
real(8), device :: y(*)
real(8), device :: c, s ! device or host variable
integer :: idxBase
CUSPARSE Level 2 Functions
This section contains interfaces for the level 2 sparse linear algebra functions that perform operations between sparse matrices and dense vectors.
cusparseSbsrmv
BSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an (mb*blockDim) x (nb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrVal, bsrRowPtr, and bsrColInd
integer(4) function cusparseSbsrmv(handle, dir, trans, mb, nb, nnzb, alpha, descr, bsrVal, bsrRowPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: mb, nb, nnzb
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
real(4), device :: x(*)
real(4), device :: beta ! device or host variable
real(4), device :: y(*)
cusparseDbsrmv
BSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an (mb*blockDim) x (nb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrVal, bsrRowPtr, and bsrColInd
integer(4) function cusparseDbsrmv(handle, dir, trans, mb, nb, nnzb, alpha, descr, bsrVal, bsrRowPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: mb, nb, nnzb
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
real(8), device :: x(*)
real(8), device :: beta ! device or host variable
real(8), device :: y(*)
cusparseCbsrmv
BSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an (mb*blockDim) x (nb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrVal, bsrRowPtr, and bsrColInd
integer(4) function cusparseCbsrmv(handle, dir, trans, mb, nb, nnzb, alpha, descr, bsrVal, bsrRowPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: mb, nb, nnzb
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
complex(4), device :: x(*)
complex(4), device :: beta ! device or host variable
complex(4), device :: y(*)
cusparseZbsrmv
BSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an (mb*blockDim) x (nb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrVal, bsrRowPtr, and bsrColInd
integer(4) function cusparseZbsrmv(handle, dir, trans, mb, nb, nnzb, alpha, &
descr, bsrVal, bsrRowPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: mb, nb, nnzb
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
complex(8), device :: x(*)
complex(8), device :: beta ! device or host variable
complex(8), device :: y(*)
cusparseSbsrxmv
BSRXMV performs a BSRMV and a mask operation.
integer(4) function cusparseSbsrxmv(handle, dir, trans, sizeOfMask, mb, nb, nnzb, alpha, &
descr, bsrVal, bsrMaskPtr, bsrRowPtr, bsrEndPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: sizeOfMask
integer :: mb, nb, nnzb
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(4), device :: bsrVal(*)
integer(4), device :: bsrMaskPtr(*), bsrRowPtr(*), bsrEndPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
real(4), device :: x(*)
real(4), device :: beta ! device or host variable
real(4), device :: y(*)
cusparseDbsrxmv
BSRXMV performs a BSRMV and a mask operation.
integer(4) function cusparseDbsrxmv(handle, dir, trans, sizeOfMask, mb, nb, nnzb, alpha, &
descr, bsrVal, bsrMaskPtr, bsrRowPtr, bsrEndPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: sizeOfMask
integer :: mb, nb, nnzb
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(8), device :: bsrVal(*)
integer(4), device :: bsrMaskPtr(*), bsrRowPtr(*), bsrEndPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
real(8), device :: x(*)
real(8), device :: beta ! device or host variable
real(8), device :: y(*)
cusparseCbsrxmv
BSRXMV performs a BSRMV and a mask operation.
integer(4) function cusparseCbsrxmv(handle, dir, trans, sizeOfMask, mb, nb, nnzb, alpha, &
descr, bsrVal, bsrMaskPtr, bsrRowPtr, bsrEndPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: sizeOfMask
integer :: mb, nb, nnzb
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(4), device :: bsrVal(*)
integer(4), device :: bsrMaskPtr(*), bsrRowPtr(*), bsrEndPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
complex(4), device :: x(*)
complex(4), device :: beta ! device or host variable
complex(4), device :: y(*)
cusparseZbsrxmv
BSRXMV performs a BSRMV and a mask operation.
integer(4) function cusparseZbsrxmv(handle, dir, trans, sizeOfMask, mb, nb, nnzb, alpha, &
descr, bsrVal, bsrMaskPtr, bsrRowPtr, bsrEndPtr, bsrColInd, blockDim, x, beta, y)
type(cusparseHandle) :: handle
integer :: dir
integer :: trans
integer :: sizeOfMask
integer :: mb, nb, nnzb
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(8), device :: bsrVal(*)
integer(4), device :: bsrMaskPtr(*), bsrRowPtr(*), bsrEndPtr(*)
integer(4), device :: bsrColInd(*)
integer :: blockDim
complex(8), device :: x(*)
complex(8), device :: beta ! device or host variable
complex(8), device :: y(*)
cusparseScsrmv
CSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMV
integer(4) function cusparseScsrmv(handle, trans, m, n, nnz, alpha, descr, csrVal, csrRowPtr, csrColInd, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m, n, nnz
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
real(4), device :: x(*)
real(4), device :: beta ! device or host variable
real(4), device :: y(*)
cusparseDcsrmv
CSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMV
integer(4) function cusparseDcsrmv(handle, trans, m, n, nnz, alpha, descr, csrVal, csrRowPtr, csrColInd, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m, n, nnz
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
real(8), device :: x(*)
real(8), device :: beta ! device or host variable
real(8), device :: y(*)
cusparseCcsrmv
CSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMV
integer(4) function cusparseCcsrmv(handle, trans, m, n, nnz, alpha, descr, csrVal, csrRowPtr, csrColInd, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m, n, nnz
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
complex(4), device :: x(*)
complex(4), device :: beta ! device or host variable
complex(4), device :: y(*)
cusparseZcsrmv
CSRMV performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*A**T*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMV
integer(4) function cusparseZcsrmv(handle, trans, m, n, nnz, alpha, descr, csrVal, csrRowPtr, csrColInd, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m, n, nnz
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
complex(8), device :: x(*)
complex(8), device :: beta ! device or host variable
complex(8), device :: y(*)
cusparseScsrsv_analysis
This function performs the analysis phase of csrsv.
integer(4) function cusparseScsrsv_analysis(handle, trans, m, nnz, descr, csrVal, csrRowPtr, csrColInd, info)
type(cusparseHandle) :: handle
integer(4) :: trans
integer(4) :: m, nnz
type(cusparseMatDescr) :: descr
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseDcsrsv_analysis
This function performs the analysis phase of csrsv.
integer(4) function cusparseDcsrsv_analysis(handle, trans, m, nnz, descr, csrVal, csrRowPtr, csrColInd, info)
type(cusparseHandle) :: handle
integer(4) :: trans
integer(4) :: m, nnz
type(cusparseMatDescr) :: descr
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseCcsrsv_analysis
This function performs the analysis phase of csrsv.
integer(4) function cusparseCcsrsv_analysis(handle, trans, m, nnz, descr, csrVal, csrRowPtr, csrColInd, info)
type(cusparseHandle) :: handle
integer(4) :: trans
integer(4) :: m, nnz
type(cusparseMatDescr) :: descr
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseZcsrsv_analysis
This function performs the analysis phase of csrsv.
integer(4) function cusparseZcsrsv_analysis(handle, trans, m, nnz, descr, csrVal, csrRowPtr, csrColInd, info)
type(cusparseHandle) :: handle
integer(4) :: trans
integer(4) :: m, nnz
type(cusparseMatDescr) :: descr
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseScsrsv_solve
This function performs the solve phase of csrsv.
integer(4) function cusparseScsrsv_solve(handle, trans, m, alpha, descr, csrVal, csrRowPtr, csrColInd, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
real(4), device :: x(*)
real(4), device :: y(*)
cusparseDcsrsv_solve
This function performs the solve phase of csrsv.
integer(4) function cusparseDcsrsv_solve(handle, trans, m, alpha, descr, csrVal, csrRowPtr, csrColInd, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
real(8), device :: x(*)
real(8), device :: y(*)
cusparseCcsrsv_solve
This function performs the solve phase of csrsv.
integer(4) function cusparseCcsrsv_solve(handle, trans, m, alpha, descr, csrVal, csrRowPtr, csrColInd, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
complex(4), device :: x(*)
complex(4), device :: y(*)
cusparseZcsrsv_solve
This function performs the solve phase of csrsv.
integer(4) function cusparseZcsrsv_solve(handle, trans, m, alpha, descr, csrVal, csrRowPtr, csrColInd, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
integer :: m
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*)
integer(4), device :: csrColInd(*)
type(cusparseSolveAnalysisInfo) :: info
complex(8), device :: x(*)
complex(8), device :: y(*)
cusparseSgemvi_bufferSize
This function returns the buffer size, in bytes, needed by cusparseSgemvi.
integer(4) function cusparseSgemvi_bufferSize(handle, transA, m, n, nnz, pBufferSize)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, nnz
integer(4) :: pBufferSize
cusparseDgemvi_bufferSize
This function returns the buffer size, in bytes, needed by cusparseDgemvi.
integer(4) function cusparseDgemvi_bufferSize(handle, transA, m, n, nnz, pBufferSize)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, nnz
integer(4) :: pBufferSize
cusparseCgemvi_bufferSize
This function returns the buffer size, in bytes, needed by cusparseCgemvi.
integer(4) function cusparseCgemvi_bufferSize(handle, transA, m, n, nnz, pBufferSize)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, nnz
integer(4) :: pBufferSize
cusparseZgemvi_bufferSize
This function returns the buffer size, in bytes, needed by cusparseZgemvi.
integer(4) function cusparseZgemvi_bufferSize(handle, transA, m, n, nnz, pBufferSize)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, nnz
integer(4) :: pBufferSize
cusparseSgemvi
GEMVI performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, A is an m x n dense matrix, x is a sparse vector, and y is a dense vector.
integer(4) function cusparseSgemvi(handle, transA, m, n, alpha, A, lda, nnz, xVal, xInd, beta, y, idxBase, pBuffer)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, lda, nnz, idxBase
real(4), device :: alpha, beta ! device or host variable
real(4), device :: A(lda,*)
real(4), device :: xVal(*)
integer(4), device :: xInd(*)
real(4), device :: y(*)
integer(1), device :: pBuffer(*) ! Any data type is allowed
cusparseDgemvi
GEMVI performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, A is an m x n dense matrix, x is a sparse vector, and y is a dense vector.
integer(4) function cusparseDgemvi(handle, transA, m, n, alpha, A, lda, nnz, xVal, xInd, beta, y, idxBase, pBuffer)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, lda, nnz, idxBase
real(8), device :: alpha, beta ! device or host variable
real(8), device :: A(lda,*)
real(8), device :: xVal(*)
integer(4), device :: xInd(*)
real(8), device :: y(*)
integer(1), device :: pBuffer(*) ! Any data type is allowed
cusparseCgemvi
GEMVI performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, A is an m x n dense matrix, x is a sparse vector, and y is a dense vector.
integer(4) function cusparseCgemvi(handle, transA, m, n, alpha, A, lda, nnz, xVal, xInd, beta, y, idxBase, pBuffer)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, lda, nnz, idxBase
complex(4), device :: alpha, beta ! device or host variable
complex(4), device :: A(lda,*)
complex(4), device :: xVal(*)
integer(4), device :: xInd(*)
complex(4), device :: y(*)
integer(1), device :: pBuffer(*) ! Any data type is allowed
cusparseZgemvi
GEMVI performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, A is an m x n dense matrix, x is a sparse vector, and y is a dense vector.
integer(4) function cusparseZgemvi(handle, transA, m, n, alpha, A, lda, nnz, xVal, xInd, beta, y, idxBase, pBuffer)
type(cusparseHandle) :: handle
integer :: transA
integer :: m, n, lda, nnz, idxBase
complex(8), device :: alpha, beta ! device or host variable
complex(8), device :: A(lda,*)
complex(8), device :: xVal(*)
integer(4), device :: xInd(*)
complex(8), device :: y(*)
integer(1), device :: pBuffer(*) ! Any data type is allowed
cusparseShybmv
HYBMV performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in the HYB storage format.
This function was removed in CUDA 11.0.
integer(4) function cusparseShybmv(handle, trans, alpha, descr, hyb, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
real(4), device :: x(*)
real(4), device :: beta ! device or host variable
real(4), device :: y(*)
cusparseDhybmv
HYBMV performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in the HYB storage format.
This function was removed in CUDA 11.0.
integer(4) function cusparseDhybmv(handle, trans, alpha, descr, hyb, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
real(8), device :: x(*)
real(8), device :: beta ! device or host variable
real(8), device :: y(*)
cusparseChybmv
HYBMV performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in the HYB storage format.
This function was removed in CUDA 11.0.
integer(4) function cusparseChybmv(handle, trans, alpha, descr, hyb, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
complex(4), device :: x(*)
complex(4), device :: beta ! device or host variable
complex(4), device :: y(*)
cusparseZhybmv
HYBMV performs the matrix-vector operations y := alpha*A*x + beta*y where alpha and beta are scalars, x and y are vectors and A is an m x n sparse matrix that is defined in the HYB storage format.
This function was removed in CUDA 11.0.
integer(4) function cusparseZhybmv(handle, trans, alpha, descr, hyb, x, beta, y)
type(cusparseHandle) :: handle
integer :: trans
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
complex(8), device :: x(*)
complex(8), device :: beta ! device or host variable
complex(8), device :: y(*)
cusparseShybsv_analysis
This function performs the analysis phase of hybsv.
integer(4) function cusparseShybsv_analysis(handle, trans, descr, hyb, info)
type(cusparseHandle) :: handle
integer(4) :: trans
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
cusparseDhybsv_analysis
This function performs the analysis phase of hybsv.
integer(4) function cusparseDhybsv_analysis(handle, trans, descr, hyb, info)
type(cusparseHandle) :: handle
integer(4) :: trans
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
cusparseChybsv_analysis
This function performs the analysis phase of hybsv.
integer(4) function cusparseChybsv_analysis(handle, trans, descr, hyb, info)
type(cusparseHandle) :: handle
integer(4) :: trans
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
cusparseZhybsv_analysis
This function performs the analysis phase of hybsv.
integer(4) function cusparseZhybsv_analysis(handle, trans, descr, hyb, info)
type(cusparseHandle) :: handle
integer(4) :: trans
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
cusparseShybsv_solve
This function performs the solve phase of hybsv.
integer(4) function cusparseShybsv_solve(handle, trans, alpha, descr, hyb, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
real(4), device :: x(*)
real(4), device :: y(*)
cusparseDhybsv_solve
This function performs the solve phase of hybsv.
integer(4) function cusparseDhybsv_solve(handle, trans, alpha, descr, hyb, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
real(8), device :: x(*)
real(8), device :: y(*)
cusparseChybsv_solve
This function performs the solve phase of hybsv.
integer(4) function cusparseChybsv_solve(handle, trans, alpha, descr, hyb, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
complex(4), device :: x(*)
complex(4), device :: y(*)
cusparseZhybsv_solve
This function performs the solve phase of hybsv.
integer(4) function cusparseZhybsv_solve(handle, trans, alpha, descr, hyb, info, x, y)
type(cusparseHandle) :: handle
integer :: trans
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descr
type(cusparseHybMat) :: hyb
type(cusparseSolveAnalysisInfo) :: info
complex(8), device :: x(*)
complex(8), device :: y(*)
cusparseSbsrsv2_bufferSize
This function returns the size of the buffer used in bsrsv2.
integer(4) function cusparseSbsrsv2_bufferSize(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDbsrsv2_bufferSize
This function returns the size of the buffer used in bsrsv2.
integer(4) function cusparseDbsrsv2_bufferSize(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCbsrsv2_bufferSize
This function returns the size of the buffer used in bsrsv2.
integer(4) function cusparseCbsrsv2_bufferSize(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZbsrsv2_bufferSize
This function returns the size of the buffer used in bsrsv2.
integer(4) function cusparseZbsrsv2_bufferSize(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseSbsrsv2_analysis
This function performs the analysis phase of bsrsv2.
integer(4) function cusparseSbsrsv2_analysis(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDbsrsv2_analysis
This function performs the analysis phase of bsrsv2.
integer(4) function cusparseDbsrsv2_analysis(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCbsrsv2_analysis
This function performs the analysis phase of bsrsv2.
integer(4) function cusparseCbsrsv2_analysis(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZbsrsv2_analysis
This function performs the analysis phase of bsrsv2.
integer(4) function cusparseZbsrsv2_analysis(handle, dirA, transA, mb, nnzb, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseSbsrsv2_solve
This function performs the solve phase of bsrsv2.
integer(4) function cusparseSbsrsv2_solve(handle, dirA, transA, mb, nnzb, &
alpha, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, mb, nnzb
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim
type(cusparseBsrsv2Info) :: info
real(4), device :: x(*), y(*)
integer :: policy
character, device :: pBuffer(*)
cusparseDbsrsv2_solve
This function performs the solve phase of bsrsv2.
integer(4) function cusparseDbsrsv2_solve(handle, dirA, transA, mb, nnzb, &
alpha, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, mb, nnzb
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim
type(cusparseBsrsv2Info) :: info
real(8), device :: x(*), y(*)
integer :: policy
character, device :: pBuffer(*)
cusparseCbsrsv2_solve
This function performs the solve phase of bsrsv2.
integer(4) function cusparseCbsrsv2_solve(handle, dirA, transA, mb, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, mb, nnzb
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim
type(cusparseBsrsv2Info) :: info
complex(4), device :: x(*), y(*)
integer :: policy
character, device :: pBuffer(*)
cusparseZbsrsv2_solve
This function performs the solve phase of bsrsv2.
integer(4) function cusparseZbsrsv2_solve(handle, dirA, transA, mb, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, mb, nnzb
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim
type(cusparseBsrsv2Info) :: info
complex(8), device :: x(*), y(*)
integer :: policy
character, device :: pBuffer(*)
cusparseXbsrsv2_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXbsrsv2_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseBsrsv2Info) :: info
integer(4), device :: position ! device or host variable
cusparseScsrsv2_bufferSize
This function returns the size of the buffer used in csrsv2.
integer(4) function cusparseScsrsv2_bufferSize(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDcsrsv2_bufferSize
This function returns the size of the buffer used in csrsv2.
integer(4) function cusparseDcsrsv2_bufferSize(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCcsrsv2_bufferSize
This function returns the size of the buffer used in csrsv2.
integer(4) function cusparseCcsrsv2_bufferSize(handle, transA, m, nnz, descrA, csrValA, &
csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZcsrsv2_bufferSize
This function returns the size of the buffer used in csrsv2.
integer(4) function cusparseZcsrsv2_bufferSize(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseScsrsv2_analysis
This function performs the analysis phase of csrsv2.
integer(4) function cusparseScsrsv2_analysis(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDcsrsv2_analysis
This function performs the analysis phase of csrsv2.
integer(4) function cusparseDcsrsv2_analysis(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCcsrsv2_analysis
This function performs the analysis phase of csrsv2.
integer(4) function cusparseCcsrsv2_analysis(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZcsrsv2_analysis
This function performs the analysis phase of csrsv2.
integer(4) function cusparseZcsrsv2_analysis(handle, transA, m, nnz, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseScsrsv2_solve
This function performs the solve phase of csrsv2.
integer(4) function cusparseScsrsv2_solve(handle, transA, m, nnz, alpha, descrA, &
csrValA, csrRowPtrA, csrColIndA, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*), x(*), y(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer :: policy
character, device :: pBuffer(*)
cusparseDcsrsv2_solve
This function performs the solve phase of csrsv2.
integer(4) function cusparseDcsrsv2_solve(handle, transA, m, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*), x(*), y(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer :: policy
character, device :: pBuffer(*)
cusparseCcsrsv2_solve
This function performs the solve phase of csrsv2.
integer(4) function cusparseCcsrsv2_solve(handle, transA, m, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*), x(*), y(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer :: policy
character, device :: pBuffer(*)
cusparseZcsrsv2_solve
This function performs the solve phase of csrsv2.
integer(4) function cusparseZcsrsv2_solve(handle, transA, m, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, x, y, policy, pBuffer)
type(cusparseHandle) :: handle
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*), x(*), y(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrsv2Info) :: info
integer :: policy
character, device :: pBuffer(*)
cusparseXcsrsv2_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXcsrsv2_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseCsrsv2Info) :: info
integer(4), device :: position ! device or host variable
CUSPARSE Level 3 Functions
This section contains interfaces for the level 3 sparse linear algebra functions that perform operations between sparse and dense matrices.
cusparseScsrmm
CSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * B + beta*C, where op( A ) is one of op( A ) = A or op( A ) = A**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseScsrmm(handle, transA, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, m, n, k, nnz
real(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseDcsrmm
CSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * B + beta*C, where op( A ) is one of op( A ) = A or op( A ) = A**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseDcsrmm(handle, transA, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, m, n, k, nnz
real(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseCcsrmm
CSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * B + beta*C, where op( A ) is one of op( A ) = A or op( A ) = A**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseCcsrmm(handle, transA, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, m, n, k, nnz
complex(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseZcsrmm
CSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * B + beta*C, where op( A ) is one of op( A ) = A or op( A ) = A**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseZcsrmm(handle, transA, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, m, n, k, nnz
complex(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseScsrmm2
CSRMM2 performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( A ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseScsrmm2(handle, transA, transB, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, transB, m, n, k, nnz
real(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseDcsrmm2
CSRMM2 performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( A ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseDcsrmm2(handle, transA, transB, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, transB, m, n, k, nnz
real(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseCcsrmm2
CSRMM2 performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( A ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseCcsrmm2(handle, transA, transB, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, transB, m, n, k, nnz
complex(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseZcsrmm2
CSRMM2 performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( A ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an m x k sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA. B and C are dense matrices.
This function was removed in CUDA 11.0. It should be replaced with a call to cusparseSpMM
integer(4) function cusparseZcsrmm2(handle, transA, transB, m, n, k, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: transA, transB, m, n, k, nnz
complex(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*), B(*), C(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
integer :: ldb, ldc
cusparseScsrsm_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseScsrsm_analysis(handle, transA, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseDcsrsm_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseDcsrsm_analysis(handle, transA, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseCcsrsm_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseCcsrsm_analysis(handle, transA, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseZcsrsm_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseZcsrsm_analysis(handle, transA, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: transA, m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseScsrsm_solve
This function performs the solve phase of csrsm.
integer(4) function cusparseScsrsm_solve(handle, transA, m, n, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, X, ldx, Y, ldy)
type(cusparseHandle) :: handle
integer :: transA, m, n
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
real(4), device :: X(*), Y(*)
integer :: ldx, ldy
cusparseDcsrsm_solve
This function performs the solve phase of csrsm.
integer(4) function cusparseDcsrsm_solve(handle, transA, m, n, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, X, ldx, Y, ldy)
type(cusparseHandle) :: handle
integer :: transA, m, n
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
real(8), device :: X(*), Y(*)
integer :: ldx, ldy
cusparseCcsrsm_solve
This function performs the solve phase of csrsm.
integer(4) function cusparseCcsrsm_solve(handle, transA, m, n, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, X, ldx, Y, ldy)
type(cusparseHandle) :: handle
integer :: transA, m, n
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
complex(4), device :: X(*), Y(*)
integer :: ldx, ldy
cusparseZcsrsm_solve
This function performs the solve phase of csrsm.
integer(4) function cusparseZcsrsm_solve(handle, transA, m, n, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, info, X, ldx, Y, ldy)
type(cusparseHandle) :: handle
integer :: transA, m, n
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
complex(8), device :: X(*), Y(*)
integer :: ldx, ldy
cusparseScsrsm2_bufferSizeExt
This function computes the work buffer size needed for the cusparseScsrsm2 routines.
integer(4) function cusparseScsrsm2_bufferSizeExt(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
real(4) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
real(4), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(8) :: pBufferSize
cusparseDcsrsm2_bufferSizeExt
This function computes the work buffer size needed for the cusparseDcsrsm2 routines.
integer(4) function cusparseDcsrsm2_bufferSizeExt(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
real(8) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
real(8), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(8) :: pBufferSize
cusparseCcsrsm2_bufferSizeExt
This function computes the work buffer size needed for the cusparseCcsrsm2 routines.
integer(4) function cusparseCcsrsm2_bufferSizeExt(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
complex(4) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
complex(4), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(8) :: pBufferSize
cusparseZcsrsm2_bufferSizeExt
This function computes the work buffer size needed for the cusparseZcsrsm2 routines.
integer(4) function cusparseZcsrsm2_bufferSizeExt(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
complex(8) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
complex(8), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(8) :: pBufferSize
cusparseScsrsm2_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseScsrsm2_analysis(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
real(4) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
real(4), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseDcsrsm2_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseDcsrsm2_analysis(handle, algo, transA, transB, m, nrhs, nnz, alpha, descrA, &
csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
real(8) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
real(8), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseCcsrsm2_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseCcsrsm2_analysis(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
complex(4) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
complex(4), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseZcsrsm2_analysis
This function performs the analysis phase of csrsm.
integer(4) function cusparseZcsrsm2_analysis(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
complex(8) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
complex(8), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseScsrsm2_solve
This function performs the solve phase of csrsm2, solving the sparse triangular linear system op(A) * op(X) = alpha * op(B). A is an m x m sparse matrix in CSR storage format; B and X are the right-hand side matrix and the solution matrix, and B is overwritten with X.
integer(4) function cusparseScsrsm2_solve(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
real(4) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
real(4), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseDcsrsm2_solve
This function performs the solve phase of csrsm2, solving the sparse triangular linear system op(A) * op(X) = alpha * op(B). A is an m x m sparse matrix in CSR storage format; B and X are the right-hand side matrix and the solution matrix, and B is overwritten with X.
integer(4) function cusparseDcsrsm2_solve(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
real(8) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
real(8), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseCcsrsm2_solve
This function performs the solve phase of csrsm2, solving the sparse triangular linear system op(A) * op(X) = alpha * op(B). A is an m x m sparse matrix in CSR storage format; B and X are the right-hand side matrix and the solution matrix, and B is overwritten with X.
integer(4) function cusparseCcsrsm2_solve(handle, algo, transA, transB, m, nrhs, nnz, alpha, descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
complex(4) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
complex(4), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseZcsrsm2_solve
This function performs the solve phase of csrsm2, solving the sparse triangular linear system op(A) * op(X) = alpha * op(B). A is an m x m sparse matrix in CSR storage format; B and X are the right-hand side matrix and the solution matrix, and B is overwritten with X.
integer(4) function cusparseZcsrsm2_solve(handle, algo, transA, transB, m, nrhs, nnz, alpha, &
descrA, csrValA, csrRowPtrA, csrColIndA, B, ldb, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, transA, transB, m, nrhs, nnz, ldb, policy
complex(8) :: alpha ! host or device variable
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
complex(8), device :: B(ldb,*)
type(cusparseCsrsm2Info) :: info
integer(1), device :: pBuffer ! Any data type
cusparseXcsrsm2_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXcsrsm2_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseCsrsm2Info) :: info
integer(4), device :: position ! device or host variable
cusparseSbsrmm
BSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( X ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an mb x kb sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA. B and C are dense matrices.
integer(4) function cusparseSbsrmm(handle, dirA, transA, transB, mb, n, kb, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: dirA, transA, transB, mb, n, kb, nnzb, blockDim
real(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*), B(*), C(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: ldb, ldc
cusparseDbsrmm
BSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( X ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an mb x kb sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA. B and C are dense matrices.
integer(4) function cusparseDbsrmm(handle, dirA, transA, transB, mb, n, kb, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: dirA, transA, transB, mb, n, kb, nnzb, blockDim
real(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*), B(*), C(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: ldb, ldc
cusparseCbsrmm
BSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( X ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an mb x kb sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA. B and C are dense matrices.
integer(4) function cusparseCbsrmm(handle, dirA, transA, transB, mb, n, kb, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: dirA, transA, transB, mb, n, kb, nnzb, blockDim
complex(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*), B(*), C(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: ldb, ldc
cusparseZbsrmm
BSRMM performs one of the matrix-matrix operations C := alpha*op( A ) * op( B ) + beta*C, where op( X ) is one of op( X ) = X or op( X ) = X**T, alpha and beta are scalars. A is an mb x kb sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA. B and C are dense matrices.
integer(4) function cusparseZbsrmm(handle, dirA, transA, transB, mb, n, kb, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, B, ldb, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: dirA, transA, transB, mb, n, kb, nnzb, blockDim
complex(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*), B(*), C(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: ldb, ldc
cusparseSbsrsm2_bufferSize
This function returns the size of the buffer used in bsrsm2.
integer(4) function cusparseSbsrsm2_bufferSize(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDbsrsm2_bufferSize
This function returns the size of the buffer used in bsrsm2.
integer(4) function cusparseDbsrsm2_bufferSize(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCbsrsm2_bufferSize
This function returns the size of the buffer used in bsrsm2.
integer(4) function cusparseCbsrsm2_bufferSize(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZbsrsm2_bufferSize
This function returns the size of the buffer used in bsrsm2.
integer(4) function cusparseZbsrsm2_bufferSize(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseSbsrsm2_analysis
This function performs the analysis phase of bsrsm2.
integer(4) function cusparseSbsrsm2_analysis(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDbsrsm2_analysis
This function performs the analysis phase of bsrsm2.
integer(4) function cusparseDbsrsm2_analysis(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCbsrsm2_analysis
This function performs the analysis phase of bsrsm2.
integer(4) function cusparseCbsrsm2_analysis(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZbsrsm2_analysis
This function performs the analysis phase of bsrsm2.
integer(4) function cusparseZbsrsm2_analysis(handle, dirA, transA, transX, mb, n, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA, transA, transX, mb, n, nnzb, blockDim
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
type(cusparseBsrsm2Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseSbsrsm2_solve
This function performs the solve phase of bsrsm2.
integer(4) function cusparseSbsrsm2_solve(handle, dirA, transA, transX, mb, n, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, ldx, y, ldy, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, transX, mb, n, nnzb
real(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*), x(*), y(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim, policy, ldx, ldy
type(cusparseBsrsm2Info) :: info
character, device :: pBuffer(*)
cusparseDbsrsm2_solve
This function performs the solve phase of bsrsm2.
integer(4) function cusparseDbsrsm2_solve(handle, dirA, transA, transX, mb, n, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, ldx, y, ldy, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, transX, mb, n, nnzb
real(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*), x(*), y(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim, policy, ldx, ldy
type(cusparseBsrsm2Info) :: info
character, device :: pBuffer(*)
cusparseCbsrsm2_solve
This function performs the solve phase of bsrsm2.
integer(4) function cusparseCbsrsm2_solve(handle, dirA, transA, transX, mb, n, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, ldx, y, ldy, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, transX, mb, n, nnzb
complex(4), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*), x(*), y(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim, policy, ldx, ldy
type(cusparseBsrsm2Info) :: info
character, device :: pBuffer(*)
cusparseZbsrsm2_solve
This function performs the solve phase of bsrsm2.
integer(4) function cusparseZbsrsm2_solve(handle, dirA, transA, transX, mb, n, nnzb, alpha, &
descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, x, ldx, y, ldy, policy, pBuffer)
type(cusparseHandle) :: handle
integer :: dirA, transA, transX, mb, n, nnzb
complex(8), device :: alpha ! device or host variable
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*), x(*), y(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: blockDim, policy, ldx, ldy
type(cusparseBsrsm2Info) :: info
character, device :: pBuffer(*)
cusparseXbsrsm2_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXbsrsm2_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseBsrsm2Info) :: info
integer(4), device :: position ! device or host variable
cusparseSgemmi
GEMMI performs the matrix-matrix operations C := alpha*A*B + beta*C where alpha and beta are scalars, A is an m x k dense matrix, B is a k x n sparse matrix, and C is a m x n dense matrix. Fortran programmers should be aware that this function only uses zero-based indexing for B.
This function is deprecated, and will be removed in a future release. It is recommended to use cusparseSpMM instead.
integer(4) function cusparseSgemmi(handle, m, n, k, nnz, alpha, &
A, lda, cscValB, cscColPtrB, cscRowIndB, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: m, n, k, nnz, lda, ldc
real(4), device :: alpha, beta ! device or host variable
real(4), device :: A(lda,*)
real(4), device :: cscValB(*)
real(4), device :: C(ldc,*)
integer(4), device :: cscColPtrB(*), cscRowIndB(*)
cusparseDgemmi
GEMMI performs the matrix-matrix operations C := alpha*A*B + beta*C where alpha and beta are scalars, A is an m x k dense matrix, B is a k x n sparse matrix, and C is a m x n dense matrix. Fortran programmers should be aware that this function only uses zero-based indexing for B.
This function is deprecated, and will be removed in a future release. It is recommended to use cusparseSpMM instead.
integer(4) function cusparseDgemmi(handle, m, n, k, nnz, alpha, &
A, lda, cscValB, cscColPtrB, cscRowIndB, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: m, n, k, nnz, lda, ldc
real(8), device :: alpha, beta ! device or host variable
real(8), device :: A(lda,*)
real(8), device :: cscValB(*)
real(8), device :: C(ldc,*)
integer(4), device :: cscColPtrB(*), cscRowIndB(*)
cusparseCgemmi
GEMMI performs the matrix-matrix operations C := alpha*A*B + beta*C where alpha and beta are scalars, A is an m x k dense matrix, B is a k x n sparse matrix, and C is a m x n dense matrix. Fortran programmers should be aware that this function only uses zero-based indexing for B.
This function is deprecated, and will be removed in a future release. It is recommended to use cusparseSpMM instead.
integer(4) function cusparseCgemmi(handle, m, n, k, nnz, alpha, &
A, lda, cscValB, cscColPtrB, cscRowIndB, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: m, n, k, nnz, lda, ldc
complex(4), device :: alpha, beta ! device or host variable
complex(4), device :: A(lda,*)
complex(4), device :: cscValB(*)
complex(4), device :: C(ldc,*)
integer(4), device :: cscColPtrB(*), cscRowIndB(*)
cusparseZgemmi
GEMMI performs the matrix-matrix operations C := alpha*A*B + beta*C where alpha and beta are scalars, A is an m x k dense matrix, B is a k x n sparse matrix, and C is a m x n dense matrix. Fortran programmers should be aware that this function only uses zero-based indexing for B.
This function is deprecated, and will be removed in a future release. It is recommended to use cusparseSpMM instead.
integer(4) function cusparseZgemmi(handle, m, n, k, nnz, alpha, &
A, lda, cscValB, cscColPtrB, cscRowIndB, beta, C, ldc)
type(cusparseHandle) :: handle
integer :: m, n, k, nnz, lda, ldc
complex(8), device :: alpha, beta ! device or host variable
complex(8), device :: A(lda,*)
complex(8), device :: cscValB(*)
complex(8), device :: C(ldc,*)
integer(4), device :: cscColPtrB(*), cscRowIndB(*)
CUSPARSE Extra Functions
This section contains interfaces for the extra functions that are used to manipulate sparse matrices.
cusparseXcsrgeamNnz
cusparseXcsrgeamNnz computes the number of nonzero elements which will be produced by CSRGEAM.
This function was removed in CUDA 11.0. It should be replaced with cusparseXcsrgeam2Nnz
integer(4) function cusparseXcsrgeamNnz(handle, m, n, descrA, nnzA, csrRowPtrA, csrColIndA, descrB, nnzB, csrRowPtrB, csrColIndB, descrC, csrRowPtrC, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
type(cusparseMatDescr) :: descrA, descrB, descrC
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseScsrgeam
CSRGEAM performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeamNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseScsrgeam2 routines
integer(4) function cusparseScsrgeam(handle, m, n, &
alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
real(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
real(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseDcsrgeam
CSRGEAM performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeamNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseDcsrgeam2 routines
integer(4) function cusparseDcsrgeam(handle, m, n, &
alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
real(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
real(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseCcsrgeam
CSRGEAM performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeamNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseCcsrgeam2 routines
integer(4) function cusparseCcsrgeam(handle, m, n, &
alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
complex(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
complex(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseZcsrgeam
CSRGEAM performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeamNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseZcsrgeam2 routines
integer(4) function cusparseZcsrgeam(handle, m, n, alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
complex(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
complex(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseScsrgeam2_bufferSizeExt
This function determines the work buffer size for cusparseScsrgeam2. CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseScsrgeam2_bufferSizeExt(handle, m, n, alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
real(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
real(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(8) :: pBufferSizeInBytes
cusparseDcsrgeam2_bufferSizeExt
This function determines the work buffer size for cusparseDcsrgeam2. CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseDcsrgeam2_bufferSizeExt(handle, m, n, alpha, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, beta, descrB, nnzB, &
csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
real(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
real(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(8) :: pBufferSizeInBytes
cusparseCcsrgeam2_bufferSizeExt
This function determines the work buffer size for cusparseCcsrgeam2. CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseCcsrgeam2_bufferSizeExt(handle, m, n, alpha, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, beta, descrB, nnzB, &
csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
complex(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
complex(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(8) :: pBufferSizeInBytes
cusparseZcsrgeam2_bufferSizeExt
This function determines the work buffer size for cusparseZcsrgeam2. CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseZcsrgeam2_bufferSizeExt(handle, m, n, alpha, descrA, &
nnzA, csrValA, csrRowPtrA, csrColIndA, beta, descrB, nnzB, csrValB, &
csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
complex(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
complex(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(8) :: pBufferSizeInBytes
cusparseXcsrgeam2Nnz
cusparseXcsrgeam2Nnz computes the number of nonzero elements which will be produced by CSRGEAM2.
integer(4) function cusparseXcsrgeam2Nnz(handle, m, n, descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, descrC, csrRowPtrC, nnzTotalDevHostPtr, pBuffer)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA, descrB, descrC
integer(4) :: m, n, nnzA, nnzB
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*)
integer(c_int) :: nnzTotalDevHostPtr
character(c_char), device :: pBuffer(*)
cusparseScsrgeam2
CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseCcsrgeam2(handle, m, n, alpha, descrA, nnzA, csrValA, csrRowPtrA, &
csrColIndA, beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBuffer)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
real(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
real(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(1), device :: pBuffer ! can be of any type
cusparseDcsrgeam2
CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseCcsrgeam2(handle, m, n, alpha, descrA, nnzA, csrValA, csrRowPtrA, &
csrColIndA, beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBuffer)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
real(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
real(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(1), device :: pBuffer ! can be of any type
cusparseCcsrgeam2
CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseCcsrgeam2(handle, m, n, alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBuffer)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
complex(4), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
complex(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(1), device :: pBuffer ! can be of any type
cusparseZcsrgeam2
CSRGEAM2 performs the matrix-matrix operation C := alpha * A + beta * B, alpha and beta are scalars. A, B, and C are m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgeam2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseCcsrgeam2(handle, m, n, alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
beta, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, descrC, csrValC, csrRowPtrC, csrColIndC, pBuffer)
type(cusparseHandle) :: handle
integer :: m, n, nnzA, nnzB
complex(8), device :: alpha, beta ! device or host variable
type(cusparseMatDescr):: descrA, descrB, descrC
complex(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
integer(1), device :: pBuffer ! can be of any type
cusparseXcsrgemmNnz
cusparseXcsrgemmNnz computes the number of nonzero elements which will be produced by CSRGEMM.
This function was removed in CUDA 11.0. It should be replaced with the cusparseXcsrgemm2Nnz routines
integer(4) function cusparseXcsrgemmNnz(handle, transA, transB, m, n, k, &
descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, descrC, csrRowPtrC, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: transA, transB, m, n, k, nnzA, nnzB
type(cusparseMatDescr) :: descrA, descrB, descrC
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseScsrgemm
CSRGEMM performs the matrix-matrix operation C := op( A ) * op( B ), where op( X ) is one of op( X ) = X or op( X ) = X**T, A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgemmNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseScsrgemm2 routines
integer(4) function cusparseScsrgemm(handle, transA, transB, m, n, k, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, &
descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: transA, transB, m, n, k, nnzA, nnzB
type(cusparseMatDescr) :: descrA, descrB, descrC
real(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseDcsrgemm
CSRGEMM performs the matrix-matrix operation C := op( A ) * op( B ), where op( X ) is one of op( X ) = X or op( X ) = X**T, A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgemmNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseDcsrgemm2 routines
integer(4) function cusparseDcsrgemm(handle, transA, transB, m, n, k, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, &
descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: transA, transB, m, n, k, nnzA, nnzB
type(cusparseMatDescr) :: descrA, descrB, descrC
real(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseCcsrgemm
CSRGEMM performs the matrix-matrix operation C := op( A ) * op( B ), where op( X ) is one of op( X ) = X or op( X ) = X**T, A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgemmNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseCcsrgemm2 routines
integer(4) function cusparseCcsrgemm(handle, transA, transB, m, n, k, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, &
descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: transA, transB, m, n, k, nnzA, nnzB
type(cusparseMatDescr) :: descrA, descrB, descrC
complex(4), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseZcsrgemm
CSRGEMM performs the matrix-matrix operation C := op( A ) * op( B ), where op( X ) is one of op( X ) = X or op( X ) = X**T, A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C}, csrRowPtr{A|B|C}, and csrColInd{A|B|C}. cusparseXcsrgemmNnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
This function was removed in CUDA 11.0. It should be replaced with the cusparseZcsrgemm2 routines
integer(4) function cusparseZcsrgemm(handle, transA, transB, m, n, k, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, &
descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: transA, transB, m, n, k, nnzA, nnzB
type(cusparseMatDescr) :: descrA, descrB, descrC
complex(8), device :: csrValA(*), csrValB(*), csrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrC(*), csrColIndC(*)
cusparseScsrgemm2_bufferSizeExt
This function returns the size of the buffer used in csrgemm2.
integer(4) function cusparseScsrgemm2_bufferSizeExt(handle, m, n, k, alpha, &
descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrRowPtrD, csrColIndD, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
real(4), device :: alpha, beta ! device or host variable
integer :: m, n, k, nnzA, nnzB, nnzD
type(cusparseMatDescr) :: descrA, descrB, descrD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*)
type(cusparseCsrgemm2Info) :: info
integer(8) :: pBufferSizeInBytes
cusparseDcsrgemm2_bufferSizeExt
This function returns the size of the buffer used in csrgemm2.
integer(4) function cusparseDcsrgemm2_bufferSizeExt(handle, m, n, k, alpha, &
descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrRowPtrD, csrColIndD, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
real(8), device :: alpha, beta ! device or host variable
integer :: m, n, k, nnzA, nnzB, nnzD
type(cusparseMatDescr) :: descrA, descrB, descrD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*)
type(cusparseCsrgemm2Info) :: info
integer(8) :: pBufferSizeInBytes
cusparseCcsrgemm2_bufferSizeExt
This function returns the size of the buffer used in csrgemm2.
integer(4) function cusparseCcsrgemm2_bufferSizeExt(handle, m, n, k, alpha, &
descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrRowPtrD, csrColIndD, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
complex(4), device :: alpha, beta ! device or host variable
integer :: m, n, k, nnzA, nnzB, nnzD
type(cusparseMatDescr) :: descrA, descrB, descrD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*)
type(cusparseCsrgemm2Info) :: info
integer(8) :: pBufferSizeInBytes
cusparseZcsrgemm2_bufferSizeExt
This function returns the size of the buffer used in csrgemm2.
integer(4) function cusparseZcsrgemm2_bufferSizeExt(handle, m, n, k, alpha, &
descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrRowPtrD, csrColIndD, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
complex(8), device :: alpha, beta ! device or host variable
integer :: m, n, k, nnzA, nnzB, nnzD
type(cusparseMatDescr) :: descrA, descrB, descrD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*)
type(cusparseCsrgemm2Info) :: info
integer(8) :: pBufferSizeInBytes
cusparseXcsrgemm2Nnz
cusparseXcsrgemm2Nnz computes the number of nonzero elements which will be produced by CSRGEMM2.
integer(4) function cusparseXcsrgemm2Nnz(handle, m, n, k, &
descrA, nnzA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrRowPtrB, csrColIndB, &
descrD, nnzD, csrRowPtrD, csrColIndD, &
descrC, csrRowPtrC, nnzTotalDevHostPtr, info, pBuffer)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA, descrB, descrD, descrC
type(cusparseCsrgemm2Info) :: info
integer(4) :: m, n, k, nnzA, nnzB, nnzD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*), csrRowPtrC(*)
integer(c_int) :: nnzTotalDevHostPtr
character(c_char), device :: pBuffer(*)
cusparseScsrgemm2
CSRGEMM2 performs the matrix-matrix operation C := alpha * A * B + beta * D alpha and beta are scalars. A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C|D}, csrRowPtr{A|B|C|D}, and csrColInd{A|B|C|D}. cusparseXcsrgemm2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseScsrgemm2(handle, m, n, k, alpha, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrValD, csrRowPtrD, csrColIndD, &
descrC, csrValC, csrRowPtrC, csrColIndC, info, pBuffer)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA, descrB, descrD, descrC
type(cusparseCsrgemm2Info) :: info
integer :: m, n, k, nnzA, nnzB, nnzD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*), csrRowPtrC(*), csrColIndC(*)
real(4), device :: csrValA(*), csrValB(*), csrValD(*), csrValC(*)
real(4), device :: alpha, beta ! device or host variable
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
character, device :: pBuffer(*)
cusparseDcsrgemm2
CSRGEMM2 performs the matrix-matrix operation C := alpha * A * B + beta * D alpha and beta are scalars. A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C|D}, csrRowPtr{A|B|C|D}, and csrColInd{A|B|C|D}. cusparseXcsrgemm2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseDcsrgemm2(handle, m, n, k, alpha, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrValD, csrRowPtrD, csrColIndD, &
descrC, csrValC, csrRowPtrC, csrColIndC, info, pBuffer)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA, descrB, descrD, descrC
type(cusparseCsrgemm2Info) :: info
integer :: m, n, k, nnzA, nnzB, nnzD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*), csrRowPtrC(*), csrColIndC(*)
real(8), device :: csrValA(*), csrValB(*), csrValD(*), csrValC(*)
real(8), device :: alpha, beta ! device or host variable
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
character, device :: pBuffer(*)
cusparseCcsrgemm2
CSRGEMM2 performs the matrix-matrix operation C := alpha * A * B + beta * D alpha and beta are scalars. A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C|D}, csrRowPtr{A|B|C|D}, and csrColInd{A|B|C|D}. cusparseXcsrgemm2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseCcsrgemm2(handle, m, n, k, alpha, &
descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, &
descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, beta, &
descrD, nnzD, csrValD, csrRowPtrD, csrColIndD, &
descrC, csrValC, csrRowPtrC, csrColIndC, info, pBuffer)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA, descrB, descrD, descrC
type(cusparseCsrgemm2Info) :: info
integer :: m, n, k, nnzA, nnzB, nnzD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*), csrRowPtrC(*), csrColIndC(*)
complex(4), device :: csrValA(*), csrValB(*), csrValD(*), csrValC(*)
complex(4), device :: alpha, beta ! device or host variable
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
character, device :: pBuffer(*)
cusparseZcsrgemm2
CSRGEMM2 performs the matrix-matrix operation C := alpha * A * B + beta * D alpha and beta are scalars. A, B, and C are m x k, k x n, and m x n sparse matrices that are defined in CSR storage format by the three arrays csrVal{A|B|C|D}, csrRowPtr{A|B|C|D}, and csrColInd{A|B|C|D}. cusparseXcsrgemm2Nnz should be used to determine csrRowPtrC and the number of nonzero elements in the result.
integer(4) function cusparseZcsrgemm2(handle, m, n, k, alpha, descrA, nnzA, csrValA, csrRowPtrA, csrColIndA, descrB, nnzB, csrValB, csrRowPtrB, csrColIndB, beta, descrD, nnzD, csrValD, csrRowPtrD, csrColIndD, descrC, csrValC, csrRowPtrC, csrColIndC, info, pBuffer)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA, descrB, descrD, descrC
type(cusparseCsrgemm2Info) :: info
integer :: m, n, k, nnzA, nnzB, nnzD
integer(4), device :: csrRowPtrA(*), csrColIndA(*), csrRowPtrB(*), csrColIndB(*), csrRowPtrD(*), csrColIndD(*), csrRowPtrC(*), csrColIndC(*)
complex(8), device :: csrValA(*), csrValB(*), csrValD(*), csrValC(*)
complex(8), device :: alpha, beta ! device or host variable
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
character, device :: pBuffer(*)
CUSPARSE Preconditioning Functions
This section contains interfaces for the preconditioning functions that are used in processing sparse matrices.
cusparseScsric0
CSRIC0 computes the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an m x n Hermitian/symmetric positive definite sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseScsric0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
real(4), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseDcsric0
CSRIC0 computes the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an m x n Hermitian/symmetric positive definite sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseDcsric0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
real(8), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseCcsric0
CSRIC0 computes the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an m x n Hermitian/symmetric positive definite sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseCcsric0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseZcsric0
CSRIC0 computes the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an m x n Hermitian/symmetric positive definite sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseZcsric0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseScsrilu0
CSRILU0 computes the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseScsrilu0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
real(4), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseDcsrilu0
CSRILU0 computes the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseDcsrilu0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
real(8), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseCcsrilu0
CSRILU0 computes the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseCcsrilu0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseZcsrilu0
CSRILU0 computes the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x n sparse matrix that is defined in CSR storage format by the three arrays csrValA, csrRowPtrA, and csrColIndA.
integer(4) function cusparseZcsrilu0(handle, trans, m, descrA, csrValM, csrRowPtrA, csrColIndA, info)
type(cusparseHandle) :: handle
integer(4) :: trans, m
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValM(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseSolveAnalysisInfo) :: info
cusparseSgtsv
GTSV computes the solution of a tridiagonal linear system with multiple right hand sides: A * Y = a * x The coefficient matrix A of this tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix X. The solution Y overwrites the righthand-side matrix X on exit.
This function was removed in CUDA 11.0. It and routines like it should be replaced with the cusparseSgtsv2 variants.
integer(4) function cusparseSgtsv(handle, m, n, dl, d, du, B, ldb)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(4), device :: dl(*), d(*), du(*), B(*)
cusparseDgtsv
GTSV computes the solution of a tridiagonal linear system with multiple right hand sides: A * Y = a * x The coefficient matrix A of this tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix X. The solution Y overwrites the righthand-side matrix X on exit.
This function was removed in CUDA 11.0. It and routines like it should be replaced with the cusparseDgtsv2 variants.
integer(4) function cusparseDgtsv(handle, m, n, dl, d, du, B, ldb)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(8), device :: dl(*), d(*), du(*), B(*)
cusparseCgtsv
GTSV computes the solution of a tridiagonal linear system with multiple right hand sides: A * Y = a * x The coefficient matrix A of this tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix X. The solution Y overwrites the righthand-side matrix X on exit.
This function was removed in CUDA 11.0. It and routines like it should be replaced with the cusparseCgtsv2 variants.
integer(4) function cusparseCgtsv(handle, m, n, dl, d, du, B, ldb)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(4), device :: dl(*), d(*), du(*), B(*)
cusparseZgtsv
GTSV computes the solution of a tridiagonal linear system with multiple right hand sides: A * Y = a * x The coefficient matrix A of this tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix X. The solution Y overwrites the righthand-side matrix X on exit.
This function was removed in CUDA 11.0. It and routines like it should be replaced with the cusparseZgtsv2 variants.
integer(4) function cusparseZgtsv(handle, m, n, dl, d, du, B, ldb)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(8), device :: dl(*), d(*), du(*), B(*)
cusparseSgtsv2_buffersize
Sgtsv2_buffersize returns the size of the buffer, in bytes, required in Sgtsv2().
integer(4) function cusparseSgtsv2_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(4), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseDgtsv2_buffersize
Dgtsv2_buffersize returns the size of the buffer, in bytes, required in Dgtsv2().
integer(4) function cusparseDgtsv2_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(8), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseCgtsv2_buffersize
Cgtsv2_buffersize returns the size of the buffer, in bytes, required in Cgtsv2().
integer(4) function cusparseCgtsv2_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(4), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseZgtsv2_buffersize
Zgtsv2_buffersize returns the size of the buffer, in bytes, required in Zgtsv2().
integer(4) function cusparseZgtsv2_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(8), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseSgtsv2
Sgtsv2 computes the solution of a tridiagonal linear system with multiple right hand sides: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseSgtsv2(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(4), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseDgtsv2
Dgtsv2 computes the solution of a tridiagonal linear system with multiple right hand sides: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseDgtsv2(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(8), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseCgtsv2
Cgtsv2 computes the solution of a tridiagonal linear system with multiple right hand sides: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseCgtsv2(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(4), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseZgtsv2
Zgtsv2 computes the solution of a tridiagonal linear system with multiple right hand sides: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseZgtsv2(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(8), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseSgtsv2_nopivot_buffersize
Sgtsv2_nopivot_buffersize returns the size of the buffer, in bytes, required in Sgtsv2_nopivot().
integer(4) function cusparseSgtsv2_nopivot_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(4), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseDgtsv2_nopivot_buffersize
Dgtsv2_nopivot_buffersize returns the size of the buffer, in bytes, required in Dgtsv2_nopivot().
integer(4) function cusparseDgtsv2_nopivot_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(8), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseCgtsv2_nopivot_buffersize
Cgtsv2_nopivot_buffersize returns the size of the buffer, in bytes, required in Cgtsv2_nopivot().
integer(4) function cusparseCgtsv2_nopivot_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(4), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseZgtsv2_nopivot_buffersize
Zgtsv2_nopivot_buffersize returns the size of the buffer, in bytes, required in Zgtsv2_nopivot().
integer(4) function cusparseZgtsv2_nopivot_bufferSize(handle, m, n, dl, d, du, B, ldb, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(8), device :: dl(m), d(m), du(m), B(ldb,n)
integer(8) :: pBufferSizeInBytes
cusparseSgtsv2_nopivot
Sgtsv2_nopivot computes the solution of a tridiagonal linear system with multiple right hand sides, without pivoting: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseSgtsv2_nopivot(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(4), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseDgtsv2_nopivot
Dgtsv2_nopivot computes the solution of a tridiagonal linear system with multiple right hand sides, without pivoting: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseDgtsv2_nopivot(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
real(8), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseCgtsv2_nopivot
Cgtsv2_nopivot computes the solution of a tridiagonal linear system with multiple right hand sides, without pivoting: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseCgtsv2_nopivot(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(4), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseZgtsv2_nopivot
Zgtsv2_nopivot computes the solution of a tridiagonal linear system with multiple right hand sides, without pivoting: A * X = B The coefficient matrix A of the tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. The input m is the size of the linear system. The input n is the number or right-hand sides in B.
integer(4) function cusparseZgtsv2_nopivot(handle, m, n, dl, d, du, B, ldb, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, ldb
complex(8), device :: dl(m), d(m), du(m), B(ldb,n)
character(1), device :: pBuffer(*)
cusparseSgtsv2StridedBatch_buffersize
Sgtsv2StridedBatch_buffersize returns the size of the buffer, in bytes, required in Sgtsv2StridedBatch().
integer(4) function cusparseSgtsv2StridedBatch_bufferSize(handle, m, dl, d, du, x, batchCount, batchStride, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
real(4), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseDgtsv2StridedBatch_buffersize
Dgtsv2StridedBatch_buffersize returns the size of the buffer, in bytes, required in Dgtsv2StridedBatch().
integer(4) function cusparseDgtsv2StridedBatch_bufferSize(handle, m, dl, d, du, x, batchCount, batchStride, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
real(8), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseCgtsv2StridedBatch_buffersize
Cgtsv2StridedBatch_buffersize returns the size of the buffer, in bytes, required in Cgtsv2StridedBatch().
integer(4) function cusparseCgtsv2StridedBatch_bufferSize(handle, m, dl, d, du, x, batchCount, batchStride, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
complex(4), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseZgtsv2StridedBatch_buffersize
Zgtsv2StridedBatch_buffersize returns the size of the buffer, in bytes, required in Zgtsv2StridedBatch().
integer(4) function cusparseZgtsv2StridedBatch_bufferSize(handle, m, dl, d, du, x, batchCount, batchStride, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
complex(8), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseSgtsv2StridedBatch
Sgtsv2StridedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit.
integer(4) function cusparseSgtsv2StridedBatch(handle, m, dl, d, du, x, batchCount, batchStride, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
real(4), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseDgtsv2StridedBatch
Dgtsv2StridedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit.
integer(4) function cusparseDgtsv2StridedBatch(handle, m, dl, d, du, x, batchCount, batchStride, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
real(8), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseCgtsv2StridedBatch
Cgtsv2StridedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit.
integer(4) function cusparseCgtsv2StridedBatch(handle, m, dl, d, du, x, batchCount, batchStride, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
complex(4), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseZgtsv2StridedBatch
Zgtsv2StridedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit.
integer(4) function cusparseZgtsv2StridedBatch(handle, m, dl, d, du, x, batchCount, batchStride, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, batchCount, batchStride
complex(8), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseSgtsvInterleavedBatch_buffersize
SgtsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in SgtsvInterleavedBatch().
integer(4) function cusparseSgtsvInterleavedBatch_bufferSize(handle, algo, m, dl, d, du, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(4), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseDgtsvInterleavedBatch_buffersize
DgtsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in DgtsvInterleavedBatch().
integer(4) function cusparseDgtsvInterleavedBatch_bufferSize(handle, algo, m, dl, d, du, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(8), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseCgtsvInterleavedBatch_buffersize
CgtsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in CgtsvInterleavedBatch().
integer(4) function cusparseCgtsvInterleavedBatch_bufferSize(handle, algo, m, dl, d, du, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(4), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseZgtsvInterleavedBatch_buffersize
ZgtsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in ZgtsvInterleavedBatch().
integer(4) function cusparseZgtsvInterleavedBatch_bufferSize(handle, algo, m, dl, d, du, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(8), device :: dl(*), d(*), du(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseSgtsvInterleavedBatch
SgtsvInterleavedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from the SgtsvStridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseSgtsvInterleavedBatch(handle, algo, m, dl, d, du, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(4), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseDgtsvInterleavedBatch
DgtsvInterleavedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from the DgtsvStridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseDgtsvInterleavedBatch(handle, algo, m, dl, d, du, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(8), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseCgtsvInterleavedBatch
CgtsvInterleavedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from the CgtsvStridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseCgtsvInterleavedBatch(handle, algo, m, dl, d, du, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(4), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseZgtsvInterleavedBatch
ZgtsvInterleavedBatch computes the solution of multiple tridiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each tri-diagonal linear system is defined with three vectors corresponding to its lower (dl), main (d), and upper (du) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from the ZgtsvStridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseZgtsvInterleavedBatch(handle, algo, m, dl, d, du, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(8), device :: dl(*), d(*), du(*), x(*)
character(1), device :: pBuffer(*)
cusparseSgpsvInterleavedBatch_buffersize
SgpsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in SgpsvInterleavedBatch().
integer(4) function cusparseSgpsvInterleavedBatch_bufferSize(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(4), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseDgpsvInterleavedBatch_buffersize
DgpsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in DgpsvInterleavedBatch().
integer(4) function cusparseDgpsvInterleavedBatch_bufferSize(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(8), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseCgpsvInterleavedBatch_buffersize
CgpsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in CgpsvInterleavedBatch().
integer(4) function cusparseCgpsvInterleavedBatch_bufferSize(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(4), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseZgpsvInterleavedBatch_buffersize
ZgpsvInterleavedBatch_buffersize returns the size of the buffer, in bytes, required in ZgpsvInterleavedBatch().
integer(4) function cusparseZgpsvInterleavedBatch_bufferSize(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(8), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
integer(8) :: pBufferSizeInBytes
cusparseSgpsvInterleavedBatch
SgpsvInterleavedBatch computes the solution of multiple pentadiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each penta-diagonal linear system is defined with five vectors corresponding to its lower (ds, dl), main (d), and upper (du, dw) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from StridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseSgpsvInterleavedBatch(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(4), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
character(1), device :: pBuffer(*)
cusparseDgpsvInterleavedBatch
DgpsvInterleavedBatch computes the solution of multiple pentadiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each penta-diagonal linear system is defined with five vectors corresponding to its lower (ds, dl), main (d), and upper (du, dw) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from StridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseDgpsvInterleavedBatch(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
real(8), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
character(1), device :: pBuffer(*)
cusparseCgpsvInterleavedBatch
CgpsvInterleavedBatch computes the solution of multiple pentadiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each penta-diagonal linear system is defined with five vectors corresponding to its lower (ds, dl), main (d), and upper (du, dw) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from StridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseCgpsvInterleavedBatch(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(4), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
character(1), device :: pBuffer(*)
cusparseZgpsvInterleavedBatch
ZgpsvInterleavedBatch computes the solution of multiple pentadiagonal linear systems with multiple right hand sides: A * X = B The coefficient matrix A of each penta-diagonal linear system is defined with five vectors corresponding to its lower (ds, dl), main (d), and upper (du, dw) matrix diagonals; the right-hand sides are stored in the dense matrix B. The solution X overwrites the righthand-side matrix B on exit. This routine differs from StridedBatch routines in that the data for the diagonals, RHS, and solution vectors are interleaved, from one to batchCount, rather than stored one after another. See the cuSPARSE Library document for currently supported algo values.
integer(4) function cusparseZgpsvInterleavedBatch(handle, algo, m, ds, dl, d, du, dw, x, batchCount, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: algo, m, batchCount
complex(8), device :: ds(*), dl(*), d(*), du(*), dw(*), x(*)
character(1), device :: pBuffer(*)
cusparseScsric02_bufferSize
This function returns the size of the buffer used in csric02.
integer(4) function cusparseScsric02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDcsric02_bufferSize
This function returns the size of the buffer used in csric02.
integer(4) function cusparseDcsric02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCcsric02_bufferSize
This function returns the size of the buffer used in csric02.
integer(4) function cusparseCcsric02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZcsric02_bufferSize
This function returns the size of the buffer used in csric02.
integer(4) function cusparseZcsric02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseScsric02_analysis
This function performs the analysis phase of csric02.
integer(4) function cusparseScsric02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDcsric02_analysis
This function performs the analysis phase of csric02.
integer(4) function cusparseDcsric02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCcsric02_analysis
This function performs the analysis phase of csric02.
integer(4) function cusparseCcsric02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZcsric02_analysis
This function performs the analysis phase of csric02.
integer(4) function cusparseZcsric02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseScsric02
CSRIC02 performs the solve phase of computing the incomplete-Cholesky factorization with zero fill-in and no pivoting.
integer(4) function cusparseScsric02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDcsric02
CSRIC02 performs the solve phase of computing the incomplete-Cholesky factorization with zero fill-in and no pivoting.
integer(4) function cusparseDcsric02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCcsric02
CSRIC02 performs the solve phase of computing the incomplete-Cholesky factorization with zero fill-in and no pivoting.
integer(4) function cusparseCcsric02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZcsric02
CSRIC02 performs the solve phase of computing the incomplete-Cholesky factorization with zero fill-in and no pivoting.
integer(4) function cusparseZcsric02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseXcsric02_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXcsric02_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseCsric02Info) :: info
integer(4), device :: position ! device or host variable
cusparseScsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseScsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseCsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
real(4), device :: boost_val ! device or host variable
cusparseDcsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseDcsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseCsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
real(8), device :: boost_val ! device or host variable
cusparseCcsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseCcsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseCsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
complex(4), device :: boost_val ! device or host variable
cusparseZcsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseZcsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseCsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
complex(8), device :: boost_val ! device or host variable
cusparseScsrilu02_bufferSize
This function returns the size of the buffer used in csrilu02.
integer(4) function cusparseScsrilu02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDcsrilu02_bufferSize
This function returns the size of the buffer used in csrilu02.
integer(4) function cusparseDcsrilu02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCcsrilu02_bufferSize
This function returns the size of the buffer used in csrilu02.
integer(4) function cusparseCcsrilu02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZcsrilu02_bufferSize
This function returns the size of the buffer used in csrilu02.
integer(4) function cusparseZcsrilu02_bufferSize(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseScsrilu02_analysis
This function performs the analysis phase of csrilu02.
integer(4) function cusparseScsrilu02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDcsrilu02_analysis
This function performs the analysis phase of csrilu02.
integer(4) function cusparseDcsrilu02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCcsrilu02_analysis
This function performs the analysis phase of csrilu02.
integer(4) function cusparseCcsrilu02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZcsrilu02_analysis
This function performs the analysis phase of csrilu02.
integer(4) function cusparseZcsrilu02_analysis(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseScsrilu02
CSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x m sparse matrix that is defined in CSR storage format by the three arrays csrValA_valM, csrRowPtrA, and csrColIndA.
integer(4) function cusparseScsrilu02(handle, m, nnz, descrA,
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDcsrilu02
CSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x m sparse matrix that is defined in CSR storage format by the three arrays csrValA_valM, csrRowPtrA, and csrColIndA.
integer(4) function cusparseDcsrilu02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCcsrilu02
CSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x m sparse matrix that is defined in CSR storage format by the three arrays csrValA_valM, csrRowPtrA, and csrColIndA.
integer(4) function cusparseCcsrilu02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZcsrilu02
CSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an m x m sparse matrix that is defined in CSR storage format by the three arrays csrValA_valM, csrRowPtrA, and csrColIndA.
integer(4) function cusparseZcsrilu02(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseCsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseXcsrilu02_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXcsrilu02_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseCsrilu02Info) :: info
integer(4), device :: position ! device or host variable
cusparseSbsric02_bufferSize
This function returns the size of the buffer used in bsric02.
integer(4) function cusparseSbsric02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDbsric02_bufferSize
This function returns the size of the buffer used in bsric02.
integer(4) function cusparseDbsric02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCbsric02_bufferSize
This function returns the size of the buffer used in bsric02.
integer(4) function cusparseCbsric02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZbsric02_bufferSize
This function returns the size of the buffer used in bsric02.
integer(4) function cusparseZbsric02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseSbsric02_analysis
This function performs the analysis phase of bsric02.
integer(4) function cusparseSbsric02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDbsric02_analysis
This function performs the analysis phase of bsric02.
integer(4) function cusparseDbsric02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCbsric02_analysis
This function performs the analysis phase of bsric02.
integer(4) function cusparseCbsric02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZbsric02_analysis
This function performs the analysis phase of bsric02.
integer(4) function cusparseZbsric02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseSbsric02
BSRIC02 performs the solve phase of the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseSbsric02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDbsric02
BSRIC02 performs the solve phase of the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseDbsric02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCbsric02
BSRIC02 performs the solve phase of the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseCbsric02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZbsric02
BSRIC02 performs the solve phase of the incomplete-Cholesky factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseZbsric02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsric02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseXbsric02_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXbsric02_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseBsric02Info) :: info
integer(4), device :: position ! device or host variable
cusparseSbsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseSbsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseBsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
real(4), device :: boost_val ! device or host variable
cusparseDbsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseDbsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseBsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
real(8), device :: boost_val ! device or host variable
cusparseCbsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseCbsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseBsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
complex(4), device :: boost_val ! device or host variable
cusparseZbsrilu02_numericBoost
This function boosts the value to replace a numerical value in incomplete LU factorization, based on the tol input argument.
integer(4) function cusparseZbsrilu02_numericBoost(handle, info, enable_boost, tol, boost_val)
type(cusparseHandle) :: handle
type(cusparseBsrilu02Info) :: info
integer :: enable_boost
real(8), device :: tol ! device or host variable
complex(8), device :: boost_val ! device or host variable
cusparseSbsrilu02_bufferSize
This function returns the size of the buffer used in bsrilu02.
integer(4) function cusparseSbsrilu02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDbsrilu02_bufferSize
This function returns the size of the buffer used in bsrilu02.
integer(4) function cusparseDbsrilu02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCbsrilu02_bufferSize
This function returns the size of the buffer used in bsrilu02.
integer(4) function cusparseCbsrilu02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZbsrilu02_bufferSize
This function returns the size of the buffer used in bsrilu02.
integer(4) function cusparseZbsrilu02_bufferSize(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseSbsrilu02_analysis
This function performs the analysis phase of bsrilu02.
integer(4) function cusparseSbsrilu02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDbsrilu02_analysis
This function performs the analysis phase of bsrilu02.
integer(4) function cusparseDbsrilu02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCbsrilu02_analysis
This function performs the analysis phase of bsrilu02.
integer(4) function cusparseCbsrilu02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZbsrilu02_analysis
This function performs the analysis phase of bsrilu02.
integer(4) function cusparseZbsrilu02_analysis(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseSbsrilu02
BSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseSbsrilu02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseDbsrilu02
BSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseDbsrilu02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseCbsrilu02
BSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseCbsrilu02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseZbsrilu02
BSRILU02 performs the solve phase of the incomplete-LU factorization with zero fill-in and no pivoting. A is an (mb*blockDim) x (mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA.
integer(4) function cusparseZbsrilu02(handle, dirA, mb, nnzb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, info, policy, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dirA
integer(4) :: mb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: blockDim
type(cusparseBsrilu02Info) :: info
integer(4) :: policy
character(c_char), device :: pBuffer(*)
cusparseXbsrilu02_zeroPivot
This function returns an error code equal to CUSPARSE_STATUS_ZERO_PIVOT and sets position to j when A(j,j) is either structural zero or numerical zero. Otherwise, position is set to -1.
integer(4) function cusparseXbsrilu02_zeroPivot(handle, info, position)
type(cusparseHandle) :: handle
type(cusparseBsrilu02Info) :: info
integer(4), device :: position ! device or host variable
CUSPARSE Reordering Functions
This section contains interfaces for the reordering functions that are used to manipulate sparse matrices.
cusparseScsrColor
This function performs the coloring of the adjacency graph associated with the matrix A stored in CSR format.
integer(4) function cusparseScsrColor(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, fractionToColor, ncolors, coloring, reordering, info)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseColorInfo) :: info
integer :: m, nnz
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), coloring(*), reordering(*)
real(4), device :: fractionToColor ! device or host variable
integer(4), device :: ncolors ! device or host variable
cusparseDcsrColor
This function performs the coloring of the adjacency graph associated with the matrix A stored in CSR format.
integer(4) function cusparseDcsrColor(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, fractionToColor, ncolors, coloring, reordering, info)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseColorInfo) :: info
integer :: m, nnz
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), coloring(*), reordering(*)
real(8), device :: fractionToColor ! device or host variable
integer(4), device :: ncolors ! device or host variable
cusparseCcsrColor
This function performs the coloring of the adjacency graph associated with the matrix A stored in CSR format.
integer(4) function cusparseCcsrColor(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, fractionToColor, ncolors, coloring, reordering, info)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseColorInfo) :: info
integer :: m, nnz
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), coloring(*), reordering(*)
real(4), device :: fractionToColor ! device or host variable
integer(4), device :: ncolors ! device or host variable
cusparseZcsrColor
This function performs the coloring of the adjacency graph associated with the matrix A stored in CSR format.
integer(4) function cusparseZcsrColor(handle, m, nnz, descrA, csrValA, csrRowPtrA, csrColIndA, fractionToColor, ncolors, coloring, reordering, info)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseColorInfo) :: info
integer :: m, nnz
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), coloring(*), reordering(*)
real(8), device :: fractionToColor ! device or host variable
integer(4), device :: ncolors ! device or host variable
CUSPARSE Format Conversion Functions
This section contains interfaces for the conversion functions that are used to switch between different sparse and dense matrix storage formats.
cusparseSbsr2csr
This function converts a sparse matrix in BSR format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by the arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseSbsr2csr(handle, dirA, nm, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, mb, nb, blockDim
type(cusparseMatDescr) :: descrA, descrC
real(4), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*), csrRowPtrC(*), csrColIndC(*)
cusparseDbsr2csr
This function converts a sparse matrix in BSR format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by the arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseDbsr2csr(handle, dirA, nm, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, mb, nb, blockDim
type(cusparseMatDescr) :: descrA, descrC
real(8), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*), csrRowPtrC(*), csrColIndC(*)
cusparseCbsr2csr
This function converts a sparse matrix in BSR format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by the arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseCbsr2csr(handle, dirA, nm, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, mb, nb, blockDim
type(cusparseMatDescr) :: descrA, descrC
complex(4), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*), csrRowPtrC(*), csrColIndC(*)
cusparseZbsr2csr
This function converts a sparse matrix in BSR format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by the arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseZbsr2csr(handle, dirA, nm, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, blockDim, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, mb, nb, blockDim
type(cusparseMatDescr) :: descrA, descrC
complex(8), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*), csrRowPtrC(*), csrColIndC(*)
cusparseXcoo2csr
This function converts the array containing the uncompressed row indices (corresponding to COO format) into an array of compressed row pointers (corresponding to CSR format).
integer(4) function cusparseXcoo2csr(handle, cooRowInd, nnz, m, csrRowPtr, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz, m, idxBase
integer(4), device :: cooRowInd(*), csrRowPtr(*)
cusparseScsc2dense
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseScsc2dense(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(4), device :: cscValA(*), A(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseDcsc2dense
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseDcsc2dense(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(8), device :: cscValA(*), A(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseCcsc2dense
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseCcsc2dense(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(4), device :: cscValA(*), A(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseZcsc2dense
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseZcsc2dense(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(8), device :: cscValA(*), A(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseScsc2hyb
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the sparse matrix A in HYB format.
integer(4) function cusparseScsc2hyb(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
real(4), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
type(cusparseHybMat) :: hybA
cusparseDcsc2hyb
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the sparse matrix A in HYB format.
integer(4) function cusparseDcsc2hyb(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
real(8), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
type(cusparseHybMat) :: hybA
cusparseCcsc2hyb
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the sparse matrix A in HYB format.
integer(4) function cusparseCcsc2hyb(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
complex(4), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
type(cusparseHybMat) :: hybA
cusparseZcsc2hyb
This function converts the sparse matrix in CSC format that is defined by the three arrays cscValA, cscColPtrA, and cscRowIndA into the sparse matrix A in HYB format.
integer(4) function cusparseZcsc2hyb(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
complex(8), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
type(cusparseHybMat) :: hybA
cusparseXcsr2bsrNnz
cusparseXcsrgeamNnz computes the number of nonzero elements which will be produced by CSRGEAM.
integer(4) function cusparseXcsr2bsrNnz(handle, dirA, m, n, descrA, csrRowPtrA, csrColIndA, blockDim, descrC, bsrRowPtrC, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: dirA, m, n, blockdim
type(cusparseMatDescr) :: descrA, descrC
integer(4), device :: csrRowPtrA(*), csrColIndA(*), bsrRowPtrC(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseScsr2bsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseScsr2bsr(handle, dirA, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, blockDim, descrC, bsrValC, bsrRowPtrC, bsrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, m, n, blockdim
type(cusparseMatDescr) :: descrA, descrC
real(4), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), bsrRowPtrC(*), bsrColIndC(*)
cusparseDcsr2bsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseDcsr2bsr(handle, dirA, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, blockDim, descrC, bsrValC, bsrRowPtrC, bsrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, m, n, blockdim
type(cusparseMatDescr) :: descrA, descrC
real(8), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), bsrRowPtrC(*), bsrColIndC(*)
cusparseCcsr2bsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseCcsr2bsr(handle, dirA, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, blockDim, descrC, bsrValC, bsrRowPtrC, bsrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, m, n, blockdim
type(cusparseMatDescr) :: descrA, descrC
complex(4), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), bsrRowPtrC(*), bsrColIndC(*)
cusparseZcsr2bsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseZcsr2bsr(handle, dirA, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, blockDim, descrC, bsrValC, bsrRowPtrC, bsrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dirA, m, n, blockdim
type(cusparseMatDescr) :: descrA, descrC
complex(8), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*), bsrRowPtrC(*), bsrColIndC(*)
cusparseXcsr2coo
This function converts the array containing the compressed row pointers (corresponding to CSR format) into an array of uncompressed row indices (corresponding to COO format).
integer(4) function cusparseXcsr2coo(handle, csrRowPtr, nnz, m, cooRowInd, idxBase)
type(cusparseHandle) :: handle
integer(4) :: nnz, m, idxBase
integer(4), device :: csrRowPtr(*), cooRowInd(*)
cusparseScsr2csc
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrVal, csrRowPtr, and csrColInd into a sparse matrix in CSC format that is defined by arrays cscVal, cscRowInd, and cscColPtr.
This function was removed in CUDA 11.0. Use the cusparseCsr2cscEx2 routines instead.
integer(4) function cusparseScsr2csc(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, cscRowInd, cscColPtr, copyValues, idxBase)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz, copyValues, idxBase
real(4), device :: csrVal(*), cscVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*), cscRowInd(*), cscColPtr(*)
cusparseDcsr2csc
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrVal, csrRowPtr, and csrColInd into a sparse matrix in CSC format that is defined by arrays cscVal, cscRowInd, and cscColPtr.
This function was removed in CUDA 11.0. Use the cusparseCsr2cscEx2 routines instead.
integer(4) function cusparseDcsr2csc(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, cscRowInd, cscColPtr, copyValues, idxBase)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz, copyValues, idxBase
real(8), device :: csrVal(*), cscVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*), cscRowInd(*), cscColPtr(*)
cusparseCcsr2csc
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrVal, csrRowPtr, and csrColInd into a sparse matrix in CSC format that is defined by arrays cscVal, cscRowInd, and cscColPtr.
This function was removed in CUDA 11.0. Use the cusparseCsr2cscEx2 routines instead.
integer(4) function cusparseCcsr2csc(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, cscRowInd, cscColPtr, copyValues, idxBase)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz, copyValues, idxBase
complex(4), device :: csrVal(*), cscVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*), cscRowInd(*), cscColPtr(*)
cusparseZcsr2csc
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrVal, csrRowPtr, and csrColInd into a sparse matrix in CSC format that is defined by arrays cscVal, cscRowInd, and cscColPtr.
This function was removed in CUDA 11.0. Use the cusparseCsr2cscEx2 routines instead.
integer(4) function cusparseZcsr2csc(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, cscRowInd, cscColPtr, copyValues, idxBase)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz, copyValues, idxBase
complex(8), device :: csrVal(*), cscVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*), cscRowInd(*), cscColPtr(*)
cusparseCsr2cscEx2_bufferSize
This function determines the size of the work buffer needed by cusparseCsr2cscEx2.
integer(4) function cusparseScsr2cscEx2_bufferSize(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, &
cscColPtr, cscRowInd, valType, copyValues, idxBase, alg, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz, valType, copyValues, idxBase, alg
real(4), device :: csrVal(*), cscVal(*) ! Can be any supported type
integer(4), device :: csrRowPtr(*), csrColInd(*), cscRowInd(*), cscColPtr(*)
integer(8) :: bufferSize
cusparseCsr2cscEx2
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrVal, csrRowPtr, and csrColInd into a sparse matrix in CSC format that is defined by arrays cscVal, cscRowInd, and cscColPtr. The type of the arrays is set by the valType argument.
integer(4) function cusparseScsr2cscEx2(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, &
cscColPtr, cscRowInd, valType, copyValues, idxBase, alg, buffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz, valType, copyValues, idxBase, alg
real(4), device :: csrVal(*), cscVal(*) ! Can be any supported type
integer(4), device :: csrRowPtr(*), csrColInd(*), cscRowInd(*), cscColPtr(*)
integer(1), device :: buffer ! Can be any type
cusparseScsr2dense
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseScsr2dense(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*), A(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseDcsr2dense
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseDcsr2dense(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*), A(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseCcsr2dense
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseCcsr2dense(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*), A(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseZcsr2dense
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseZcsr2dense(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, A, lda)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*), A(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseScsr2hyb
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into a sparse matrix in HYB format.
integer(4) function cusparseScsr2hyb(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseDcsr2hyb
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into a sparse matrix in HYB format.
integer(4) function cusparseDcsr2hyb(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseCcsr2hyb
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into a sparse matrix in HYB format.
integer(4) function cusparseCcsr2hyb(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseZcsr2hyb
This function converts the sparse matrix in CSR format that is defined by the three arrays cscValA, cscRowPtrA, and cscColIndA into a sparse matrix in HYB format.
integer(4) function cusparseZcsr2hyb(handle, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseSdense2csc
This function converts the matrix A in dense format into a sparse matrix in CSC format.
integer(4) function cusparseSdense2csc(handle, m, n, descrA, A, lda, nnzPerCol, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(4), device :: A(*), cscValA(*)
integer(4), device :: nnzPerCol(*), cscRowIndA(*), cscColPtrA(*)
cusparseDdense2csc
This function converts the matrix A in dense format into a sparse matrix in CSC format.
integer(4) function cusparseDdense2csc(handle, m, n, descrA, A, lda, nnzPerCol, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(8), device :: A(*), cscValA(*)
integer(4), device :: nnzPerCol(*), cscRowIndA(*), cscColPtrA(*)
cusparseCdense2csc
This function converts the matrix A in dense format into a sparse matrix in CSC format.
integer(4) function cusparseCdense2csc(handle, m, n, descrA, A, lda, nnzPerCol, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(4), device :: A(*), cscValA(*)
integer(4), device :: nnzPerCol(*), cscRowIndA(*), cscColPtrA(*)
cusparseZdense2csc
This function converts the matrix A in dense format into a sparse matrix in CSC format.
integer(4) function cusparseZdense2csc(handle, m, n, descrA, A, lda, nnzPerCol, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(8), device :: A(*), cscValA(*)
integer(4), device :: nnzPerCol(*), cscRowIndA(*), cscColPtrA(*)
cusparseSdense2csr
This function converts the matrix A in dense format into a sparse matrix in CSR format.
integer(4) function cusparseSdense2csr(handle, m, n, descrA, A, lda, nnzPerRow, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(4), device :: A(*), csrValA(*)
integer(4), device :: nnzPerRow(*), csrRowPtrA(*), csrColIndA(*)
cusparseDdense2csr
This function converts the matrix A in dense format into a sparse matrix in CSR format.
integer(4) function cusparseDdense2csr(handle, m, n, descrA, A, lda, nnzPerRow, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
real(8), device :: A(*), csrValA(*)
integer(4), device :: nnzPerRow(*), csrRowPtrA(*), csrColIndA(*)
cusparseCdense2csr
This function converts the matrix A in dense format into a sparse matrix in CSR format.
integer(4) function cusparseCdense2csr(handle, m, n, descrA, A, lda, nnzPerRow, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(4), device :: A(*), csrValA(*)
integer(4), device :: nnzPerRow(*), csrRowPtrA(*), csrColIndA(*)
cusparseZdense2csr
This function converts the matrix A in dense format into a sparse matrix in CSR format.
integer(4) function cusparseZdense2csr(handle, m, n, descrA, A, lda, nnzPerRow, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda
type(cusparseMatDescr) :: descrA
complex(8), device :: A(*), csrValA(*)
integer(4), device :: nnzPerRow(*), csrRowPtrA(*), csrColIndA(*)
cusparseSdense2hyb
This function converts the matrix A in dense format into a sparse matrix in HYB format.
integer(4) function cusparseSdense2hyb(handle, m, n, descrA, A, lda, nnzPerRow, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(4), device :: A(*)
integer(4), device :: nnzPerRow(*)
cusparseDdense2hyb
This function converts the matrix A in dense format into a sparse matrix in HYB format.
integer(4) function cusparseDdense2hyb(handle, m, n, descrA, A, lda, nnzPerRow, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(8), device :: A(*)
integer(4), device :: nnzPerRow(*)
cusparseCdense2hyb
This function converts the matrix A in dense format into a sparse matrix in HYB format.
integer(4) function cusparseCdense2hyb(handle, m, n, descrA, A, lda, nnzPerRow, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(4), device :: A(*)
integer(4), device :: nnzPerRow(*)
cusparseZdense2hyb
This function converts the matrix A in dense format into a sparse matrix in HYB format.
integer(4) function cusparseZdense2hyb(handle, m, n, descrA, A, lda, nnzPerRow, hybA, userEllWidth, partitionType)
type(cusparseHandle) :: handle
integer(4) :: m, n, lda, userEllWidth, partitionType
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(8), device :: A(*)
integer(4), device :: nnzPerRow(*)
cusparseShyb2csc
This function converts the sparse matrix A in HYB format into a sparse matrix in CSC format.
integer(4) function cusparseShyb2csc(handle, descrA, hybA, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(4), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseDhyb2csc
This function converts the sparse matrix A in HYB format into a sparse matrix in CSC format.
integer(4) function cusparseDhyb2csc(handle, descrA, hybA, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(8), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseChyb2csc
This function converts the sparse matrix A in HYB format into a sparse matrix in CSC format.
integer(4) function cusparseChyb2csc(handle, descrA, hybA, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(4), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseZhyb2csc
This function converts the sparse matrix A in HYB format into a sparse matrix in CSC format.
integer(4) function cusparseZhyb2csc(handle, descrA, hybA, cscValA, cscRowIndA, cscColPtrA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(8), device :: cscValA(*)
integer(4), device :: cscRowIndA(*), cscColPtrA(*)
cusparseShyb2csr
This function converts the sparse matrix A in HYB format into a sparse matrix in CSR format.
integer(4) function cusparseShyb2csr(handle, descrA, hybA, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseDhyb2csr
This function converts the sparse matrix A in HYB format into a sparse matrix in CSR format.
integer(4) function cusparseDhyb2csr(handle, descrA, hybA, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseChyb2csr
This function converts the sparse matrix A in HYB format into a sparse matrix in CSR format.
integer(4) function cusparseChyb2csr(handle, descrA, hybA, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(4), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseZhyb2csr
This function converts the sparse matrix A in HYB format into a sparse matrix in CSR format.
integer(4) function cusparseZhyb2csr(handle, descrA, hybA, csrValA, csrRowPtrA, csrColIndA)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(8), device :: csrValA(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
cusparseShyb2dense
This function converts the sparse matrix in HYB format into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseShyb2dense(handle, descrA, hybA, A, lda)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(4), device :: A(*)
integer(4) :: lda
cusparseDhyb2dense
This function converts the sparse matrix in HYB format into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseDhyb2dense(handle, descrA, hybA, A, lda)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
real(8), device :: A(*)
integer(4) :: lda
cusparseChyb2dense
This function converts the sparse matrix in HYB format into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseChyb2dense(handle, descrA, hybA, A, lda)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(4), device :: A(*)
integer(4) :: lda
cusparseZhyb2dense
This function converts the sparse matrix in HYB format into the matrix A in dense format. The dense matrix A is filled in with the values of the sparse matrix and with zeros elsewhere.
integer(4) function cusparseZhyb2dense(handle, descrA, hybA, A, lda)
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: descrA
type(cusparseHybMat) :: hybA
complex(8), device :: A(*)
integer(4) :: lda
cusparseSnnz
This function computes the number of nonzero elements per row or column and the total number of nonzero elements in a dense matrix.
integer(4) function cusparseSnnz(handle, dirA, m, n, descrA, A, lda, nnzPerRowColumn, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: dirA, m, n, lda
type(cusparseMatDescr) :: descrA
real(4), device :: A(*)
integer(4), device :: nnzPerRowColumn(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseDnnz
This function computes the number of nonzero elements per row or column and the total number of nonzero elements in a dense matrix.
integer(4) function cusparseDnnz(handle, dirA, m, n, descrA, A, lda, nnzPerRowColumn, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: dirA, m, n, lda
type(cusparseMatDescr) :: descrA
real(8), device :: A(*)
integer(4), device :: nnzPerRowColumn(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseCnnz
This function computes the number of nonzero elements per row or column and the total number of nonzero elements in a dense matrix.
integer(4) function cusparseCnnz(handle, dirA, m, n, descrA, A, lda, nnzPerRowColumn, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: dirA, m, n, lda
type(cusparseMatDescr) :: descrA
complex(4), device :: A(*)
integer(4), device :: nnzPerRowColumn(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseZnnz
This function computes the number of nonzero elements per row or column and the total number of nonzero elements in a dense matrix.
integer(4) function cusparseZnnz(handle, dirA, m, n, descrA, A, lda, nnzPerRowColumn, nnzTotalDevHostPtr)
type(cusparseHandle) :: handle
integer :: dirA, m, n, lda
type(cusparseMatDescr) :: descrA
complex(8), device :: A(*)
integer(4), device :: nnzPerRowColumn(*)
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
cusparseSgebsr2gebsc_bufferSize
This function returns the size of the buffer used in gebsr2gebsc.
integer(4) function cusparseSgebsr2gebsc_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, bsrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
real(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDgebsr2gebsc_bufferSize
This function returns the size of the buffer used in gebsr2gebsc.
integer(4) function cusparseDgebsr2gebsc_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, bsrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
real(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCgebsr2gebsc_bufferSize
This function returns the size of the buffer used in gebsr2gebsc.
integer(4) function cusparseCgebsr2gebsc_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, bsrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
complex(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZgebsr2gebsc_bufferSize
This function returns the size of the buffer used in gebsr2gebsc.
integer(4) function cusparseZgebsr2gebsc_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, bsrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
complex(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseSgebsr2gebsc
This function converts a sparse matrix in general block-CSR storage format to a sparse matrix in general block-CSC storage format.
integer(4) function cusparseSgebsr2gebsc(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDim, colBlockDim, bscVal, bscRowInd, bscColPtr, copyValues, baseIdx, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
real(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
real(4), device :: bscVal(*)
integer(4), device :: bscRowInd(*), bscColPtr(*)
integer(4) :: copyValues, baseIdx
character(c_char), device :: pBuffer(*)
cusparseDgebsr2gebsc
This function converts a sparse matrix in general block-CSR storage format to a sparse matrix in general block-CSC storage format.
integer(4) function cusparseDgebsr2gebsc(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDim, colBlockDim, bscVal, bscRowInd, bscColPtr, copyValues, baseIdx, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
real(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
real(8), device :: bscVal(*)
integer(4), device :: bscRowInd(*), bscColPtr(*)
integer(4) :: copyValues, baseIdx
character(c_char), device :: pBuffer(*)
cusparseCgebsr2gebsc
This function converts a sparse matrix in general block-CSR storage format to a sparse matrix in general block-CSC storage format.
integer(4) function cusparseCgebsr2gebsc(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDim, colBlockDim, bscVal, bscRowInd, bscColPtr, copyValues, baseIdx, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
complex(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
complex(4), device :: bscVal(*)
integer(4), device :: bscRowInd(*), bscColPtr(*)
integer(4) :: copyValues, baseIdx
character(c_char), device :: pBuffer(*)
cusparseZgebsr2gebsc
This function converts a sparse matrix in general block-CSR storage format to a sparse matrix in general block-CSC storage format.
integer(4) function cusparseZgebsr2gebsc(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDim, colBlockDim, bscVal, bscRowInd, bscColPtr, copyValues, baseIdx, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
complex(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
complex(8), device :: bscVal(*)
integer(4), device :: bscRowInd(*), bscColPtr(*)
integer(4) :: copyValues, baseIdx
character(c_char), device :: pBuffer(*)
cusparseSgebsr2gebsr_bufferSize
This function returns the size of the buffer used in gebsr2gebsrnnz and gebsr2gebsr.
integer(4) function cusparseSgebsr2gebsr_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
real(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDgebsr2gebsr_bufferSize
This function returns the size of the buffer used in gebsr2gebsrnnz and gebsr2gebsr.
integer(4) function cusparseDgebsr2gebsr_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
real(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCgebsr2gebsr_bufferSize
This function returns the size of the buffer used in gebsr2gebsrnnz and gebsr2gebsr.
integer(4) function cusparseCgebsr2gebsr_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
complex(4), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZgebsr2gebsr_bufferSize
This function returns the size of the buffer used in gebsr2gebsrnnz and gebsr2gebsr.
integer(4) function cusparseZgebsr2gebsr_bufferSize(handle, mb, nb, nnzb, bsrVal, bsrRowPtr, &
bsrColInd, rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: mb, nb, nnzb
complex(8), device :: bsrVal(*)
integer(4), device :: bsrRowPtr(*), bsrColInd(*)
integer(4) :: rowBlockDimA, colBlockDimA, rowBlockDimC, colBlockDimC
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseXgebsr2gebsrNnz
cusparseXcsrgeamNnz computes the number of nonzero elements which will be produced by CSRGEAM.
integer(4) function cusparseXgebsr2gebsrNnz(handle, dir, mb, nb, nnzb, descrA, bsrRowPtrA, &
bsrColIndA, rowBlockDimA, colBlockDimA, descrC, bsrRowPtrC, rowBlockDimC, colBlockDimC, nnzTotalDevHostPtr, pBuffer)
type(cusparseHandle) :: handle
integer :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*)
integer :: rowBlockDimC, colBlockDimC
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
character, device :: pBuffer(*)
cusparseSgebsr2gebsr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in another general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseSgebsr2gebsr(handle, dir, mb, nb, nnzb, descrA, bsrValA, bsrRowPtrA, &
bsrColIndA, rowBlockDimA, colBlockDimA, descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*), bsrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseDgebsr2gebsr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in another general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseDgebsr2gebsr(handle, dir, mb, nb, nnzb, descrA, bsrValA, bsrRowPtrA, &
bsrColIndA, rowBlockDimA, colBlockDimA, descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*), bsrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseCgebsr2gebsr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in another general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseCgebsr2gebsr(handle, dir, mb, nb, nnzb, descrA, bsrValA, bsrRowPtrA, &
bsrColIndA, rowBlockDimA, colBlockDimA, descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*), bsrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseZgebsr2gebsr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in another general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseZgebsr2gebsr(handle, dir, mb, nb, nnzb, descrA, bsrValA, bsrRowPtrA, &
bsrColIndA, rowBlockDimA, colBlockDimA, descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*), bsrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseSgebsr2csr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseSgebsr2csr(handle, dir, mb, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, &
rowBlockDimA, colBlockDimA, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: csrRowPtrC(*), csrColIndC(*)
cusparseDgebsr2csr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseDgebsr2csr(handle, dir, mb, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, &
rowBlockDimA, colBlockDimA, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: csrRowPtrC(*), csrColIndC(*)
cusparseCgebsr2csr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseCgebsr2csr(handle, dir, mb, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, &
rowBlockDimA, colBlockDimA, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: csrRowPtrC(*), csrColIndC(*)
cusparseZgebsr2csr
This function converts a sparse matrix in general BSR storage format that is defined by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA into a sparse matrix in CSR format that is defined by arrays csrValC, csrRowPtrC, and csrColIndC.
integer(4) function cusparseZgebsr2csr(handle, dir, mb, nb, descrA, bsrValA, bsrRowPtrA, bsrColIndA, &
rowBlockDimA, colBlockDimA, descrC, csrValC, csrRowPtrC, csrColIndC)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: bsrValA(*), csrValC(*)
integer(4), device :: bsrRowPtrA(*), bsrColIndA(*)
integer(4) :: rowBlockDimA, colBlockDimA
type(cusparseMatDescr) :: descrC
integer(4), device :: csrRowPtrC(*), csrColIndC(*)
cusparseScsr2gebsr_bufferSize
This function returns the size of the buffer used in csr2gebsrnnz and csr2gebsr.
integer(4) function cusparseScsr2gebsr_bufferSize(handle, dir, m, n, descrA, csrVal, csrRowPtr, csrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dir, m, n
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseDcsr2gebsr_bufferSize
This function returns the size of the buffer used in csr2gebsrnnz and csr2gebsr.
integer(4) function cusparseDcsr2gebsr_bufferSize(handle, dir, m, n, descrA, csrVal, csrRowPtr, csrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dir, m, n
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseCcsr2gebsr_bufferSize
This function returns the size of the buffer used in csr2gebsrnnz and csr2gebsr.
integer(4) function cusparseCcsr2gebsr_bufferSize(handle, dir, m, n, descrA, csrVal, csrRowPtr, csrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dir, m, n
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseZcsr2gebsr_bufferSize
This function returns the size of the buffer used in csr2gebsrnnz and csr2gebsr.
integer(4) function cusparseZcsr2gebsr_bufferSize(handle, dir, m, n, descrA, csrVal, csrRowPtr, csrColInd, rowBlockDim, colBlockDim, pBufferSize)
type(cusparseHandle) :: handle
integer(4) :: dir, m, n
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
integer(4) :: rowBlockDim, colBlockDim
integer(4) :: pBufferSize ! integer(8) also accepted
cusparseXcsr2gebsrNnz
cusparseXcsrgeamNnz computes the number of nonzero elements which will be produced by CSRGEAM.
integer(4) function cusparseXcsr2gebsrNnz(handle, dir, m, n, descrA, csrRowPtrA, csrColIndA, &
descrC, bsrRowPtrC, rowBlockDimC, colBlockDimC, nnzTotalDevHostPtr, pBuffer)
type(cusparseHandle) :: handle
integer :: dir, m, n
type(cusparseMatDescr) :: descrA
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*)
integer :: rowBlockDimC, colBlockDimC
integer(4), device :: nnzTotalDevHostPtr ! device or host variable
character, device :: pBuffer(*)
cusparseScsr2gebsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseScsr2gebsr(handle, dir, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, &
descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
real(4), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseDcsr2gebsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseDcsr2gebsr(handle, dir, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, &
descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
real(8), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseCcsr2gebsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseCcsr2gebsr(handle, dir, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, &
descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
complex(4), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseZcsr2gebsr
This function converts a sparse matrix in CSR storage format that is defined by the three arrays csrValA, csrRowPtrA, and csrColIndA into a sparse matrix in general BSR format that is defined by arrays bsrValC, bsrRowPtrC, and bsrColIndC.
integer(4) function cusparseZcsr2gebsr(handle, dir, m, n, descrA, csrValA, csrRowPtrA, csrColIndA, &
descrC, bsrValC, bsrRowPtrC, bsrColIndC, rowBlockDimC, colBlockDimC, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: dir, mb, nb, nnzb
type(cusparseMatDescr) :: descrA
complex(8), device :: csrValA(*), bsrValC(*)
integer(4), device :: csrRowPtrA(*), csrColIndA(*)
type(cusparseMatDescr) :: descrC
integer(4), device :: bsrRowPtrC(*), bsrColIndC(*)
integer(4) :: rowBlockDimC, colBlockDimC
character(c_char), device :: pBuffer(*)
cusparseCreateIdentityPermutation
This function creates an identity map. The output parameter p represents such map by p = 0:1:(n-1). This function is typically used with coosort, csrsort, cscsort, and csr2csc_indexOnly.
integer(4) function cusparseCreateIdentityPermutation(handle, n, p)
type(cusparseHandle) :: handle
integer(4) :: n
integer(4), device :: p(*)
cusparseXcoosort_bufferSize
This function returns the size of the buffer used in coosort.
integer(4) function cusparseXcoosort_bufferSize(handle, m, n, nnz, cooRows, cooCols, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: cooRows(*), cooCols(*)
integer(8) :: pBufferSizeInBytes
cusparseXcoosortByRow
This function sorts the sparse matrix stored in COO format.
integer(4) function cusparseXcoosortByRow(handle, m, n, nnz, cooRows, cooCols, P, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: cooRows(*), cooCols(*), P(*)
character(c_char), device :: pBuffer(*)
cusparseXcoosortByColumn
This function sorts the sparse matrix stored in COO format.
integer(4) function cusparseXcoosortByColumn(handle, m, n, nnz, cooRows, cooCols, P, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: cooRows(*), cooCols(*), P(*)
character(c_char), device :: pBuffer(*)
cusparseXcsrsort_bufferSize
This function returns the size of the buffer used in csrsort.
integer(4) function cusparseXcsrsort_bufferSize(handle, m, n, nnz, csrRowInd, csrColInd, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: csrRowInd(*), csrColInd(*)
integer(8) :: pBufferSizeInBytes
cusparseXcsrsort
This function sorts the sparse matrix stored in CSR format.
integer(4) function cusparseXcsrsort(handle, m, n, nnz, csrRowInd, csrColInd, P, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: csrRowInd(*), csrColInd(*), P(*)
character(c_char), device :: pBuffer(*)
cusparseXcscsort_bufferSize
This function returns the size of the buffer used in cscsort.
integer(4) function cusparseXcscsort_bufferSize(handle, m, n, nnz, cscColPtr, cscRowInd, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: cscColPtr(*), cscRowInd(*)
integer(8) :: pBufferSizeInBytes
cusparseXcscsort
This function sorts the sparse matrix stored in CSC format.
integer(4) function cusparseXcscsort(handle, m, n, nnz, cscColPtr, cscRowInd, P, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
integer(4), device :: cscColPtr(*), cscRowInd(*), P(*)
character(c_char), device :: pBuffer(*)
cusparseScsru2csr_bufferSize
This function returns the size of the buffer used in csru2csr.
integer(4) function cusparseScsru2csr_bufferSize(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
integer(8) :: pBufferSizeInBytes
cusparseDcsru2csr_bufferSize
This function returns the size of the buffer used in csru2csr.
integer(4) function cusparseDcsru2csr_bufferSize(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
integer(8) :: pBufferSizeInBytes
cusparseCcsru2csr_bufferSize
This function returns the size of the buffer used in csru2csr.
integer(4) function cusparseCcsru2csr_bufferSize(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
integer(8) :: pBufferSizeInBytes
cusparseZcsru2csr_bufferSize
This function returns the size of the buffer used in csru2csr.
integer(4) function cusparseZcsru2csr_bufferSize(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, info, pBufferSizeInBytes)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
integer(8) :: pBufferSizeInBytes
cusparseScsru2csr
This function transfers unsorted CSR format to CSR format.
integer(4) function cusparseScsru2csr(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseDcsru2csr
This function transfers unsorted CSR format to CSR format.
integer(4) function cusparseDcsru2csr(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseCcsru2csr
This function transfers unsorted CSR format to CSR format.
integer(4) function cusparseCcsru2csr(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseZcsru2csr
This function transfers unsorted CSR format to CSR format.
integer(4) function cusparseZcsru2csr(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseScsr2csru
This function performs the backwards transformation from sorted CSR format to unsorted CSR format.
integer(4) function cusparseScsr2csru(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
real(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseDcsr2csru
This function performs the backwards transformation from sorted CSR format to unsorted CSR format.
integer(4) function cusparseDcsr2csru(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
real(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseCcsr2csru
This function performs the backwards transformation from sorted CSR format to unsorted CSR format.
integer(4) function cusparseCcsr2csru(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
complex(4), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
cusparseZcsr2csru
This function performs the backwards transformation from sorted CSR format to unsorted CSR format.
integer(4) function cusparseZcsr2csru(handle, m, n, nnz, descrA, csrVal, csrRowPtr, csrColInd, info, pBuffer)
type(cusparseHandle) :: handle
integer(4) :: m, n, nnz
type(cusparseMatDescr) :: descrA
complex(8), device :: csrVal(*)
integer(4), device :: csrRowPtr(*), csrColInd(*)
type(cusparseCsru2csrInfo) :: info
character(c_char), device :: pBuffer(*)
CUSPARSE Generic API Functions
This section contains interfaces for the generic API functions that perform vector-vector (SpVV), matrix-vector (SpMV), and matrix-matrix (SpMM) operations.
cusparseDenseToSparse_bufferSize
This function returns the size of the workspace needed by cusparseDenseToSparse_analysis(). The value returned is in bytes.
integer(4) function cusparseDenseToSparse_bufferSize(handle, matA, matB, alg, bufferSize)
type(cusparseHandle) :: handle
type(cusparseDnMatDescr) :: MatA
type(cusparseSpMatDescr) :: matB
integer(4) :: alg
integer(8), intent(out) :: bufferSize
cusparseDenseToSparse_analysis
This function updates the number of non-zero elements required in the sparse matrix descriptor matB.
integer(4) function cusparseDenseToSparse_analysis(handle, matA, matB, alg, buffer)
type(cusparseHandle) :: handle
type(cusparseDnMatDescr) :: matA
type(cusparseSpMatDescr) :: matB
integer(4) :: alg
integer(4), device :: buffer(*)
cusparseDenseToSparse_convert
This function fills the sparse matrix values in the area provided in descriptor matB.
integer(4) function cusparseDenseToSparse_convert(handle, matA, matB, alg, buffer)
type(cusparseHandle) :: handle
type(cusparseDnMatDescr) :: matA
type(cusparseSpMatDescr) :: matB
integer(4) :: alg
integer(4), device :: buffer(*)
cusparseSparseToDense_bufferSize
This function returns the size of the workspace needed by cusparseSparseToDense_analysis(). The value returned is in bytes.
integer(4) function cusparseSparseToDense_bufferSize(handle, matA, matB, alg, bufferSize)
type(cusparseHandle) :: handle
type(cusparseSpMatDescr) :: MatA
type(cusparseDnMatDescr) :: matB
integer(4) :: alg
integer(8), intent(out) :: bufferSize
cusparseSparseToDense
This function fills the dense values in the area provided in descriptor matB.
integer(4) function cusparseSparseToDense(handle, matA, matB, alg, buffer)
type(cusparseHandle) :: handle
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: matB
integer(4) :: alg
integer(4), device :: buffer(*)
cusparseCreateSpVec
This function initializes the sparse vector descriptor used in the generic API. The type, kind, and rank of the input arguments indices
and values
are actually ignored, and taken from the input arguments idxType
and valueType
. The vectors are assumed to be contiguous. The idxBase
argument is typically CUSPARSE_INDEX_BASE_ONE in Fortran.
integer(4) function cusparseCreateSpVec(descr, size, nnz, indices, values, idxType, idxBase, valueType)
type(cusparseSpVecDescr) :: descr
integer(8) :: size, nnz
integer(4), device :: indices(*)
real(4), device :: values(*)
integer(4) :: idxType, idxBase, valueType
cusparseDestroySpVec
This function releases the host memory associated with the sparse vector descriptor used in the generic API.
integer(4) function cusparseDestroySpVec(descr)
type(cusparseSpVecDescr) :: descr
cusparseSpVecGet
This function returns the fields within the sparse vector descriptor used in the generic API.
integer(4) function cusparseSpVecGet(descr, size, nnz, indices, values, idxType, idxBase, valueType)
type(cusparseSpVecDescr) :: descr
integer(8) :: size, nnz
type(c_devptr) :: indices
type(c_devptr) :: values
integer(4) :: idxType, idxBase, valueType
cusparseSpVecGetIndexBase
This function returns idxBase
field within the sparse vector descriptor used in the generic API.
integer(4) function cusparseSpVecGetIndexBase(descr, idxBase)
type(cusparseSpVecDescr) :: descr
integer(4) :: idxBase
cusparseSpVecGetValues
This function returns the values
field within the sparse vector descriptor used in the generic API.
integer(4) function cusparseSpVecGetValues(descr, values)
type(cusparseSpVecDescr) :: descr
type(c_devptr) :: values
cusparseSpVecSetValues
This function sets the values
field within the sparse vector descriptor used in the generic API. The type, kind and rank of the values
argument is ignored; the type is determined by the valueType field in the descriptor.
integer(4) function cusparseSpVecSetValues(descr, values)
type(cusparseSpVecDescr) :: descr
real(4), device :: values(*)
cusparseCreateDnVec
This function initializes the dense vector descriptor used in the generic API. The type, kind, and rank of the values
input argument is ignored, and taken from the input argument valueType
. The vector is assumed to be contiguous.
integer(4) function cusparseCreateDnVec(descr, size, values, valueType)
type(cusparseDnVecDescr) :: descr
integer(8) :: size
real(4), device :: values(*)
integer(4) :: valueType
cusparseDestroyDnVec
This function releases the host memory associated with the dense vector descriptor used in the generic API.
integer(4) function cusparseDestroyDnVec(descr)
type(cusparseDnVecDescr) :: descr
cusparseDnVecGet
This function returns the fields within the dense vector descriptor used in the generic API.
integer(4) function cusparseDnVecGet(descr, size, values, valueType)
type(cusparseDnVecDescr) :: descr
integer(8) :: size
type(c_devptr) :: values
integer(4) :: valueType
cusparseDnVecGetValues
This function returns the values
field within the dense vector descriptor used in the generic API.
integer(4) function cusparseDnVecGetValues(descr, values)
type(cusparseDnVecDescr) :: descr
type(c_devptr) :: values
cusparseDnVecSetValues
This function sets the values
field within the dense vector descriptor used in the generic API. The type, kind and rank of the values
argument is ignored; the type is determined by the valueType field in the descriptor.
integer(4) function cusparseDnVecSetValues(descr, values)
type(cusparseDnVecDescr) :: descr
real(4), device :: values(*)
cusparseCreateCoo
This function initializes the sparse matrix descriptor in COO format used in the generic API. The type, kind, and rank of the input arguments cooRowInd
, cooColInd
, and cooValues
are actually ignored, and taken from the input arguments idxType
and valueType
. The idxBase
argument is typically CUSPARSE_INDEX_BASE_ONE in Fortran.
integer(4) function cusparseCreateCoo(descr, rows, cols, nnz, cooRowInd, cooColInd, cooValues, idxType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
integer(4), device :: cooRowInd(*), cooColInd(*)
real(4), device :: cooValues(*)
integer(4) :: idxType, idxBase, valueType
cusparseCreateCooAoS
This function initializes the sparse matrix descriptor in COO format, with Array of Structures layout, used in the generic API. The type, kind, and rank of the input arguments cooInd
and cooValues
are actually ignored, and taken from the input arguments idxType
and valueType
. The idxBase
argument is typically CUSPARSE_INDEX_BASE_ONE in Fortran.
integer(4) function cusparseCreateCooAoS(descr, rows, cols, nnz, cooInd, cooValues, idxType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
integer(4), device :: cooInd(*)
real(4), device :: cooValues(*)
integer(4) :: idxType, idxBase, valueType
cusparseCreateCsr
This function initializes the sparse matrix descriptor in CSR format used in the generic API. The type, kind, and rank of the input arguments csrRowOffsets
, csrColInd
, and csrValues
are actually ignored, and taken from the input arguments csrRowOffsetsType
, csrColIndType
, and valueType
. The idxBase
argument is typically CUSPARSE_INDEX_BASE_ONE in Fortran.
integer(4) function cusparseCreateCsr(descr, rows, cols, nnz, csrRowOffsets, csrColInd, csrValues, &
csrRowOffsetsType, csrColIndType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
integer(4), device :: csrRowOffsets(*), csrColInd(*)
real(4), device :: csrValues(*)
integer(4) :: csrRowOffsetsType, csrColIndType, idxBase, valueType
cusparseCreateBlockedEll
This function initializes the sparse matrix descriptor in Blocked-Ellpack (ELL) format used in the generic API. The type, kind, and rank of the input arguments ellColInd
, and ellValues
are actually ignored, and taken from the input arguments ellIdxType
, and valueType
. The idxBase
argument is typically CUSPARSE_INDEX_BASE_ONE in Fortran.
integer(4) function cusparseCreateBlockedEll(descr, rows, cols, &
ellBlockSize, ellCols, ellColInd, ellValues, ellIdxType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, ellBlockSize, ellCols
integer(4), device :: ellColInd(*)
real(4), device :: ellValues(*)
integer(4) :: ellIdxType, idxBase, valueType
cusparseDestroySpMat
This function releases the host memory associated with the sparse matrix descriptor used in the generic API.
integer(4) function cusparseDestroySpMat(descr)
type(cusparseSpMatDescr) :: descr
cusparseCooGet
This function returns the fields from the sparse matrix descriptor in COO format used in the generic API.
integer(4) function cusparseCooGet(descr, rows, cols, nnz, cooRowInd, cooColInd, cooValues, idxType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
type(c_devptr) :: cooRowInd, cooColInd, cooValues
integer(4) :: idxType, idxBase, valueType
cusparseCooAoSGet
This function returns the fields from the sparse matrix descriptor in COO format, Array of Structures layout, used in the generic API.
integer(4) function cusparseCooAoSGet(descr, rows, cols, nnz, cooInd, cooValues, idxType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
type(c_devptr) :: cooInd, cooValues
integer(4) :: idxType, idxBase, valueType
cusparseCsrGet
This function returns the fields from the sparse matrix descriptor in CSR format used in the generic API.
integer(4) function cusparseCsrGet(descr, rows, cols, nnz, csrRowOffsets, csrColInd, csrValues, &
csrRowOffsetsType, crsColIndType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
type(c_devptr) :: csrRowOffsets, csrColInd, csrValues
integer(4) :: csrRowOffsetsType, csrColIndType, idxBase, valueType
cusparseBlockedEllGet
This function returns the fields from the sparse matrix descriptor stored in Blocked-Ellpack (ELL) format.
integer(4) function cusparseBlockedEllGet(descr, rows, cols, &
ellBlockSize, ellCols, ellColInd, ellValues, ellIdxType, idxBase, valueType)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, ellBlockSize, ellCols
type(c_devptr) :: ellColInd, ellValues
integer(4) :: ellIdxType, idxBase, valueType
cusparseCsrSetPointers
This function sets the pointers in the sparse matrix descriptor in CSR format used in the generic API. Any type for the row offsets, column indices, and values are accepted.
integer(4) function cusparseCsrSetPointers(descr, csrRowOffsets, csrColInd, csrValues)
type(cusparseSpMatDescr) :: descr
integer(4), device :: csrRowOffsets(*), csrColInd(*)
real(4), device :: csrValues(*)
cusparseCscSetPointers
This function sets the pointers in the sparse matrix descriptor in CSC format used in the generic API. Any type for the column offsets, row indices, and values are accepted.
integer(4) function cusparseCscSetPointers(descr, cscColOffsets, cscRowInd, cscValues)
type(cusparseSpMatDescr) :: descr
integer(4), device :: cscColOffsets(*), cscRowInd(*)
real(4), device :: cscValues(*)
cusparseSpMatGetFormat
This function returns the format
field within the sparse matrix descriptor used in the generic API. Valid formats for the generic API are CUSPARSE_FORMAT_CSR, CUSPARSE_FORMAT_COO, and CUSPARSE_FORMAT_COO_AOS.
integer(4) function cusparseSpMatGetFormat(descr, format)
type(cusparseSpMatDescr) :: descr
integer(4) :: format
cusparseSpMatGetIndexBase
This function returns idxBase
field within the sparse matrix descriptor used in the generic API.
integer(4) function cusparseSpMatGetIndexBase(descr, idxBase)
type(cusparseSpMatDescr) :: descr
integer(4) :: idxBase
cusparseSpMatGetSize
This function returns the sparse matrix size within the sparse matrix descriptor used in the generic API.
integer(4) function cusparseSpMatGetSize(descr, rows, cols, nnz)
type(cusparseSpMatDescr) :: descr
integer(8) :: rows, cols, nnz
cusparseSpMatGetValues
This function returns the values
field within the sparse matrix descriptor used in the generic API.
integer(4) function cusparseSpMatGetValues(descr, values)
type(cusparseSpMatDescr) :: descr
type(c_devptr) :: values
cusparseSpMatSetValues
This function sets the values
field within the sparse matrix descriptor used in the generic API. The type, kind and rank of the values
argument is ignored; the type is determined by the valueType field in the descriptor.
integer(4) function cusparseSpMatSetValues(descr, values)
type(cusparseSpMatDescr) :: descr
real(4), device :: values(*)
cusparseSpMatGetStridedBatch
This function returns the batchCount
field within the sparse matrix descriptor used in the generic API.
integer(4) function cusparseSpMatGetStridedBatch(descr, batchCount)
type(cusparseSpMatDescr) :: descr
integer(4) :: batchCount
cusparseSpMatSetStridedBatch
This function sets the batchCount
field within the sparse matrix descriptor used in the generic API. It is removed in versions >= CUDA 12.0.
integer(4) function cusparseSpMatSetStridedBatch(descr, batchCount)
type(cusparseSpMatDescr) :: descr
integer(4) :: batchCount
cusparseCooSetStridedBatch
This function sets the batchCount
and batchStride
field within the COO sparse matrix descriptor.
integer(4) function cusparseCooSetStridedBatch(descr, batchCount, &
batchStride)
type(cusparseSpMatDescr) :: descr
integer(4) :: batchCount
integer(8) :: batchStride
cusparseCsrSetStridedBatch
This function sets the batchCount
and batchStride
fields within the CSR sparse matrix descriptor.
integer(4) function cusparseCsrSetStridedBatch(descr, batchCount, &
offsetsBatchStride, columnsValuesBatchStride)
type(cusparseSpMatDescr) :: descr
integer(4) :: batchCount
integer(8) :: offsetsBatchStride, columnsValuesBatchStride
cusparseBsrSetStridedBatch
This function sets the batchCount
and batchStride
fields within the BSR sparse matrix descriptor.
integer(4) function cusparseBsrSetStridedBatch(descr, batchCount, &
offsetsBatchStride, columnsBatchStride, valuesBatchStride)
type(cusparseSpMatDescr) :: descr
integer(4) :: batchCount
integer(8) :: offsetsBatchStride, columnsBatchStride
integer(8) :: valuesBatchStride
cusparseSpMatGetAttribute
This function returns the sparse matrix attribute from the sparse matrix descriptor used in the generic API. Attribute can currently be CUSPARSE_SPMAT_FILL_MODE or CUSPARSE_SPMAT_DIAG_TYPE.
integer(4) function cusparseSpMatGetAttribute(descr, attribute, data, dataSize)
type(cusparseSpMatDescr), intent(in) :: descr
integer(4), intent(in) :: attribute
integer(4), intent(out) :: data
integer(8), intent(in) :: dataSize
cusparseSpMatSetAttribute
This function sets the sparse matrix attribute for the sparse matrix descriptor used in the generic API. Attribute can currently be CUSPARSE_SPMAT_FILL_MODE or CUSPARSE_SPMAT_DIAG_TYPE.
integer(4) function cusparseSpMatSetAttribute(descr, attribute, data, dataSize)
type(cusparseSpMatDescr), intent(out) :: descr
integer(4), intent(in) :: attribute
integer(4), intent(in) :: data
integer(8), intent(in) :: dataSize
cusparseCreateDnMat
This function initializes the dense matrix descriptor used in the generic API. The type, kind, and rank of the values
input argument is ignored, and taken from the input argument valueType
. The order
argument in Fortran should normally be CUSPARSE_ORDER_COL.
integer(4) function cusparseCreateDnMat(descr, rows, cols, ld, values, valueType, order)
type(cusparseDnMatDescr) :: descr
integer(8) :: rows, cols, ld
real(4), device :: values(*)
integer(4), value :: valueType, order
cusparseDestroyDnMat
This function releases the host memory associated with the dense matrix descriptor used in the generic API.
integer(4) function cusparseDestroyDnMat(descr)
type(cusparseDnMatDescr) :: descr
cusparseDnMatGet
This function returns the fields from the dense matrix descriptor used in the generic API.
integer(4) function cusparseDnMatGet(descr, rows, cols, ld, values, valueType, order)
type(cusparseDnMatDescr) :: descr
integer(8) :: rows, cols, ld
type(c_devptr) :: values
integer(4) :: valueType, order
cusparseDnMatGetValues
This function returns the values
field within the dense matrix descriptor used in the generic API.
integer(4) function cusparseDnMatGetValues(descr, values)
type(cusparseDnMatDescr) :: descr
type(c_devptr) :: values
cusparseDnMatSetValues
This function sets the values
field within the dense matrix descriptor used in the generic API. The type, kind and rank of the values
argument is ignored; the type is determined by the valueType field in the descriptor.
integer(4) function cusparseDnMatSetValues(descr, values)
type(cusparseDnMatDescr) :: descr
real(4), device :: values(*)
cusparseDnMatGetStridedBatch
This function returns the batchCount
field within the dense matrix descriptor used in the generic API.
integer(4) function cusparseDnMatGetStridedBatch(descr, batchCount)
type(cusparseDnMatDescr) :: descr
integer(4) :: batchCount
cusparseDnMatSetStridedBatch
This function sets the batchCount
field within the dense matrix descriptor used in the generic API.
integer(4) function cusparseDnMatSetStridedBatch(descr, batchCount)
type(cusparseDnMatDescr) :: descr
integer(4) :: batchCount
cusparseSpVV_bufferSize
This function returns the size of the workspace needed by cusparseSpVV(). The value returned is in bytes.
integer(4) function cusparseSpVV_bufferSize(handle, opX, vecX, vecY, result, computeType, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: opX
type(cusparseSpVecDescr) :: vecX
type(cusparseDnVecDescr) :: vecY
real(4), device :: result ! device or host variable
integer(4) :: computeType
integer(8), intent(out) :: bufferSize
cusparseSpVV
This function forms the dot product of a sparse vector vecX
and a dense vector vecY
. The buffer
argument can be any type, but the size should be greater than or equal to the size returned from cusparseSpVV_buffersize(). See the cuSPARSE Library documentation for datatype and computetype
combinations supported in each release.
integer(4) function cusparseSpVV(handle, opX, vecX, vecY, result, computeType, buffer)
type(cusparseHandle) :: handle
integer(4) :: opX
type(cusparseSpVecDescr) :: vecX
type(cusparseDnVecDescr) :: vecY
real(4), device :: result ! device or host variable
integer(4) :: computeType
integer(4), device :: buffer(*)
cusparseSpMV_bufferSize
This function returns the size of the workspace needed by cusparseSpMV(). The value returned is in bytes.
integer(4) function cusparseSpMV_bufferSize(handle, opA, alpha, matA, vecX, beta, vecY, computeType, alg, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: opA
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnVecDescr) :: vecX, vecY
integer(4) :: computeType, alg
integer(8), intent(out) :: bufferSize
cusparseSpMV
This function forms the multiplication of a sparse matrix matA
and a dense vector vecX
to produce dense vector vecY
. The buffer
argument can be any type, but the size should be greater than or equal to the size returned from cusparseSpMV_buffersize(). The type of arguments alpha
and beta
should match the computeType
argument. See the cuSPARSE Library documentation for the datatype, computeType
, sparse format, and alg
combinations supported in each release.
integer(4) function cusparseSpMV(handle, opA, alpha, matA, vecX, beta, vecY, computeType, alg, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA
real(4), device :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnVecDescr) :: vecX, vecY
integer(4) :: computeType, alg
integer(4), device :: buffer(*)
cusparseSpSV_CreateDescr
This function initializes the sparse matrix descriptor used in solving a sparse triangular system.
integer(4) function cusparseSpSV_CreateDescr(descr)
type(cusparseSpSVDescr) :: descr
cusparseSpSV_DestroyDescr
This function frees and destroys the sparse matrix descriptor used in solving a sparse triangular system.
integer(4) function cusparseSpSV_DestroyDescr(descr)
type(cusparseSpSVDescr) :: descr
cusparseSpSV_bufferSize
This function returns the size of the workspace needed by cusparseSpSV(). The value returned is in bytes.
integer(4) function cusparseSpSV_bufferSize(handle, opA, alpha, matA, vecX, vecY, &
computeType, alg, spsvDescr, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: opA
real(4) :: alpha ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnVecDescr) :: vecX, vecY
integer(4) :: computeType, alg
type(cusparseSpSVDescr) :: spsvDescr
integer(8), intent(out) :: bufferSize
cusparseSpSV_analysis
This function performs the analysis phase needed by cusparseSpSV().
integer(4) function cusparseSpSV_analysis(handle, opA, alpha, matA, vecX, vecY, &
computeType, alg, spsvDescr, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA
real(4) :: alpha ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnVecDescr) :: vecX, vecY
integer(4) :: computeType, alg
type(cusparseSpSVDescr) :: spsvDescr
integer(4), device :: buffer(*)
cusparseSpSV_solve
This function executes the solve phase for the sparse triangular linear system.
integer(4) function cusparseSpSV_analysis(handle, opA, alpha, matA, vecX, vecY, &
computeType, alg, spsvDescr)
type(cusparseHandle) :: handle
integer(4) :: opA
real(4) :: alpha ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnVecDescr) :: vecX, vecY
integer(4) :: computeType, alg
type(cusparseSpSVDescr) :: spsvDescr
cusparseSpSV_updateMatrix
This function updates the values in the sparse matrix used by cusparseSpSV(). The value type should match the sparse matrix type. The updates can be to the entire matrix, CUSPARSE_SPSV_UPDATE_GENERAL, or to the diagonal, CUSPARSE_SPSV_UPDATE_DIAGONAL.
integer(4) function cusparseSpSV_updateMatrix(handle, spsvDescr, &
newValues, updatePart)
type(cusparseHandle) :: handle
type(cusparseSpSVDescr) :: spsvDescr
real(4), device :: newValues(*) ! Any type, same as the Matrix
integer(4) :: updatePart ! General or Diagonal
cusparseSpMM_bufferSize
This function returns the size of the workspace needed by cusparseSpMM(). The value returned is in bytes.
integer(4) function cusparseSpMM_bufferSize(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4), device :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: matB, matC
integer(4) :: computeType, alg
integer(8), intent(out) :: bufferSize
cusparseSpMM_preprocess
This function can be used to speedup the cusparseSpMM computation. See the cuSPARSE Library documentation for the capabilities supported in each release.
integer(4) function cusparseSpMM_preprocess(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4), device :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: matB, matC
integer(4) :: computeType, alg
integer(4), device :: buffer(*)
cusparseSpMM
This function forms the multiplication of a sparse matrix matA
and a dense matrix matB
to produce dense matrix matC
. The buffer
argument can be any type, but the size should be greater than or equal to the size returned from cusparseSpMM_buffersize(). The type of arguments alpha
and beta
should match the computeType
argument. See the cuSPARSE Library documentation for the datatype, computeType
, sparse format, and alg
combinations supported in each release.
integer(4) function cusparseSpMM(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4), device :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: matB, matC
integer(4) :: computeType, alg
integer(4), device :: buffer(*)
cusparseSpSM_CreateDescr
This function initializes the sparse matrix descriptor used in solving a sparse triangular system, when there are multiple RHS vectors.
integer(4) function cusparseSpSM_CreateDescr(descr)
type(cusparseSpSMDescr) :: descr
cusparseSpSM_DestroyDescr
This function frees and destroys the sparse matrix descriptor used in solving a sparse triangular system.
integer(4) function cusparseSpSM_DestroyDescr(descr)
type(cusparseSpSMDescr) :: descr
cusparseSpSM_bufferSize
This function returns the size of the workspace needed by cusparseSpSM(). The value returned is in bytes.
integer(4) function cusparseSpSM_bufferSize(handle, opA, opB, alpha, matA, matB, matC, &
computeType, alg, spsmDescr, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpSMDescr) :: spsmDescr
integer(8), intent(out) :: bufferSize
cusparseSpSM_analysis
This function performs the analysis phase needed by cusparseSpSM().
integer(4) function cusparseSpSM_analysis(handle, opA, opB, alpha, &
matA, matB, matC, computeType, alg, spsmDescr, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: matB, matC
integer(4) :: computeType, alg
type(cusparseSpMVDescr) :: spsmDescr
integer(4), device :: buffer(*)
cusparseSpSM_solve
This function executes the solve phase for the sparse triangular linear system.
integer(4) function cusparseSpSM_analysis(handle, opA, opB, &
alpha, matA, matB, matC, computeType, alg, spsmDescr)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha ! device or host variable
type(cusparseSpMatDescr) :: matA
type(cusparseDnMatDescr) :: matB, matC
integer(4) :: computeType, alg
type(cusparseSpSMDescr) :: spsmDescr
cusparseSDDMM_bufferSize
This function returns the size of the workspace needed by cusparseSDDMM(). The value returned is in bytes.
integer(4) function cusparseSDDMM_bufferSize(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, bufferSize)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4), device :: alpha, beta ! device or host variable
type(cusparseDnMatDescr) :: matA, matB
type(cusparseSpMatDescr) :: matC
integer(4) :: computeType, alg
integer(8), intent(out) :: bufferSize
cusparseSDDMM_preprocess
This function can be used to speedup the cusparseSDDMM computation. See the cuSPARSE Library documentation for the capabilities supported in each release.
integer(4) function cusparseSDDMM_preprocess(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4), device :: alpha, beta ! device or host variable
type(cusparseDnMatDescr) :: matA, matB
type(cusparseSpMatDescr) :: matC
integer(4) :: computeType, alg
integer(4), device :: buffer(*)
cusparseSDDMM
This function forms the multiplication of a dense matrix matA
and a dense matrix matB
, followed by an element-wise multiplication with the sparsity pattern of matrix matC
. The buffer
argument can be any type, but the size should be greater than or equal to the size returned from cusparseSDDMM_buffersize(). The type of arguments alpha
and beta
should match the computeType
argument. See the cuSPARSE Library documentation for the datatype, computeType
, sparse format, and alg
combinations supported in each release.
integer(4) function cusparseSDDMM(handle, opA, opB, alpha, matA, matB, beta, matC, computeType, alg, buffer)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4), device :: alpha, beta ! device or host variable
type(cusparseDnMatDescr) :: matA, matB
type(cusparseSpMatDescr) :: matC
integer(4) :: computeType, alg
integer(4), device :: buffer(*)
cusparseSpGEMM_CreateDescr
This function initializes the sparse matrix descriptor used in multiplying two sparse matrices together.
integer(4) function cusparseSpGEMM_CreateDescr(descr)
type(cusparseSpGEMMDescr) :: descr
cusparseSpGEMM_DestroyDescr
This function frees and destroys the sparse matrix descriptor used in multiplying to sparse matrices together.
integer(4) function cusparseSpGEMM_DestroyDescr(descr)
type(cusparseSpGEMMDescr) :: descr
cusparseSpGEMM_workEstimation
This function, along with cusparseSpGEMM_compute()
, are both used for determining the buffer requirements and for performing the actual computation. In the typical usage, the first call to cusparseSgGEMM_workEstimation()
should pass a null pointer for buffer1. The function will return the size requirements needed. Once that space is allocated, another call to cusparseSpGEMM_workEstimation()
should be made with the actual allocated buffer1 argument.
integer(4) function cusparseSpGEMM_workEstimation(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr, bufferSize1, buffer1)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
integer(8) :: bufferSize1
integer(4), device :: buffer1
cusparseSpGEMM_getNumProducts
This function queries the sparse matrix descriptor for the number of intermediate products.
integer(4) function cusparseSpGEMM_getNumProducts(descr, num_prods)
type(cusparseSpGEMMDescr) :: descr
integer(8) :: num_prods
cusparseSpGEMM_estimateMemory
This function, along with cusparseSpGEMM_compute()
and cusparseSpGEMM_workEstimation()
, is used in determining the memory requirements for performing SpGEMM Algorithms 2 and 3.
integer(4) function cusparseSpGEMM_estimateMemory(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr, &
chunk_fraction, bufferSize3, buffer3, bufferSize2)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
real(4) :: chunk_fraction
integer(8) :: bufferSize3
integer(4), device :: buffer3 ! Any type is okay
integer(8) :: bufferSize2
cusparseSpGEMM_compute
This function, along with cusparseSpGEMM_workEstimation()
, are both used for determining the buffer requirements and for performing the actual computation. In the typical usage, the first call to cusparseSgGEMM_compute()
should pass a null pointer for buffer2. The function will return the size requirements needed. Once that space is allocated, another call to cusparseSpGEMM_compute()
should be made with the actual allocated buffer2 argument.
integer(4) function cusparseSpGEMM_compute(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr, bufferSize2, buffer2)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
integer(8) :: bufferSize2
integer(4), device :: buffer2
cusparseSpGEMM_copy
This function, along with cusparseSpGEMM_workEstimation()
and cusparseSgGEMM_compute()
are used in performing a sparse matrix multiply. Pointers to the work buffers are kept in the spgemmDescr
argument.
integer(4) function cusparseSpGEMM_copy(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
An example of the set of calls needed to perform a sparse matrix multiply follows:
! Create a csr descriptor for sparse C. Sizes unknown
status = cusparseCreateCsr(matC, nd, nd, 0, nullp, nullp, &
nullp, CUSPARSE_INDEX_32I, CUSPARSE_INDEX_32I, &
CUSPARSE_INDEX_BASE_ONE, CUDA_R_64F)
call printStatus('cusparseCreateCsr', status, CUSPARSE_STATUS_SUCCESS)
status = cusparseSpGEMM_workEstimation(h, CUSPARSE_OPERATION_NON_TRANSPOSE, &
CUSPARSE_OPERATION_NON_TRANSPOSE, Dalpha, matA, matB, Dbeta, &
matC, CUDA_R_64F, CUSPARSE_SPGEMM_DEFAULT, spgemmd, bsize, nullp)
call printStatus('cusparseSpGEMM_workEstimation', status, CUSPARSE_STATUS_SUCCESS)
print *,"SpGEMM buffersize1 required: ",bsize
if (bsize.gt.0) allocate(buffer_d(bsize))
status = cusparseSpGEMM_workEstimation(h, CUSPARSE_OPERATION_NON_TRANSPOSE, &
CUSPARSE_OPERATION_NON_TRANSPOSE, Dalpha, matA, matB, Dbeta, &
matC, CUDA_R_64F, CUSPARSE_SPGEMM_DEFAULT, spgemmd, bsize, buffer_d)
call printStatus('cusparseSpGEMM_workEstimation', status, CUSPARSE_STATUS_SUCCESS)
status = cusparseSpGEMM_compute(h, CUSPARSE_OPERATION_NON_TRANSPOSE, &
CUSPARSE_OPERATION_NON_TRANSPOSE, Dalpha, matA, matB, Dbeta, &
matC, CUDA_R_64F, CUSPARSE_SPGEMM_DEFAULT, spgemmd, bsize2, nullp)
call printStatus('cusparseSpGEMM_compute', status, CUSPARSE_STATUS_SUCCESS)
print *,"SpGEMM buffersize2 required: ",bsize2
if (bsize2.gt.0) allocate(buffer2_d(bsize2))
status = cusparseSpGEMM_compute(h, CUSPARSE_OPERATION_NON_TRANSPOSE, &
CUSPARSE_OPERATION_NON_TRANSPOSE, Dalpha, matA, matB, Dbeta, &
matC, CUDA_R_64F, CUSPARSE_SPGEMM_DEFAULT, spgemmd, bsize2, buffer2_d)
call printStatus('cusparseSpGEMM_compute', status, CUSPARSE_STATUS_SUCCESS)
status = cusparseSpMatGetSize(matC, nrows, ncols, nnz)
print *,"SpGEMM C matrix sizes: ",nrows, ncols, nnz
if (nrows.gt.0) allocate(csrRowPtrC_d(nrows+1))
if (nnz.gt.0) allocate(csrColIndC_d(nnz))
if (nnz.gt.0) allocate(csrValDC_d(nnz))
status = cusparseCsrSetPointers(matC, csrRowPtrC_d, csrColIndC_d, csrValDC_d)
call printStatus('cusparseCsrSetPointers', status, CUSPARSE_STATUS_SUCCESS)
status = cusparseSpGEMM_copy(h, CUSPARSE_OPERATION_NON_TRANSPOSE, &
CUSPARSE_OPERATION_NON_TRANSPOSE, Dalpha, matA, matB, Dbeta, &
matC, CUDA_R_64F, CUSPARSE_SPGEMM_DEFAULT, spgemmd)
call printStatus('cusparseSpGEMM_copy', status, CUSPARSE_STATUS_SUCCESS)
if (bsize.gt.0) deallocate(buffer_d)
if (bsize2.gt.0) deallocate(buffer2_d)
cusparseSpGEMMreuse_workEstimation
This function, along with cusparseSpGEMM_compute()
, are both used for determining the buffer requirements and for performing the actual computation. In the typical usage, the first call to cusparseSgGEMM_workEstimation()
should pass a null pointer for buffer1. The function will return the size requirements needed. Once that space is allocated, another call to cusparseSpGEMM_workEstimation()
should be made with the actual allocated buffer1 argument.
integer(4) function cusparseSpGEMMreuse_workEstimation(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr, bufferSize1, buffer1)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
integer(8) :: bufferSize1
integer(4), device :: buffer1
cusparseSpGEMMreuse_nnz
This function, along with cusparseSpGEMM_compute()
, are both used for determining the buffer requirements and for performing the actual computation. In the typical usage, the first call to cusparseSgGEMM_workEstimation()
should pass a null pointer for buffer1. The function will return the size requirements needed. Once that space is allocated, another call to cusparseSpGEMM_workEstimation()
should be made with the actual allocated buffer1 argument.
integer(4) function cusparseSpGEMMreuse_nnz(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr, bufferSize2, buffer2, &
bufferSize3, buffer3, bufferSize4, buffer4)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
integer(8) :: bufferSize2, bufferSize3, bufferSize4
integer(4), device :: buffer2, buffer3, buffer4
cusparseSpGEMMreuse_copy
This function, along with cusparseSpGEMM_compute()
, are both used for determining the buffer requirements and for performing the actual computation. In the typical usage, the first call to cusparseSgGEMM_workEstimation()
should pass a null pointer for buffer1. The function will return the size requirements needed. Once that space is allocated, another call to cusparseSpGEMM_workEstimation()
should be made with the actual allocated buffer1 argument.
integer(4) function cusparseSpGEMMreuse_copy(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr, bufferSize5, buffer5)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr
integer(8) :: bufferSize5
integer(4), device :: buffer5
cusparseSpGEMMreuse_compute
This function, along with cusparseSpGEMM_compute()
, are both used for determining the buffer requirements and for performing the actual computation. In the typical usage, the first call to cusparseSgGEMM_workEstimation()
should pass a null pointer for buffer1. The function will return the size requirements needed. Once that space is allocated, another call to cusparseSpGEMM_workEstimation()
should be made with the actual allocated buffer1 argument.
integer(4) function cusparseSpGEMMreuse_compute(handle, opA, opB, &
alpha, matA, matB, beta, matC, computeType, alg, spgemmDescr)
type(cusparseHandle) :: handle
integer(4) :: opA, opB
real(4) :: alpha, beta ! device or host variable
type(cusparseSpMatDescr) :: matA, MatB, MatC
integer(4) :: computeType, alg
type(cusparseSpGEMMDescr) :: spgemmDescr