![]() |
cuLite v0.3.1
A lite CUDA C++ Interface
|
High-performance matrix multiplications (GEMM). More...
Functions | |
| template<typename T_Scalar> | |
| void | culite::ops::mult (T_Scalar alpha, op_t opA, const dns::XxMatrix< T_Scalar > &A, op_t opB, const dns::XxMatrix< T_Scalar > &B, T_Scalar beta, dns::XxMatrix< T_Scalar > &C, CuBlasHandler &cuBlasHandler=globalCuBlasHandler()) |
| Updates a general matrix with a matrix-matrix product. | |
| template<typename T_Int, typename T_Scalar> | |
| void | culite::ops::mult (T_Scalar alpha, op_t opA, const csr::XxMatrix< T_Int, T_Scalar > &A, const dns::XxMatrix< T_Scalar > &B, T_Scalar beta, dns::XxMatrix< T_Scalar > &C, CuSparseHandler &cuSparseHandler=globalCuSparseHandler()) |
| Updates a general dense matrix with a sparse-dense matrix-matrix product. | |
| template<typename T_Int, typename T_Scalar> | |
| void | culite::ops::mult (T_Scalar alpha, op_t opA, const csc::XxMatrix< T_Int, T_Scalar > &A, const dns::XxMatrix< T_Scalar > &B, T_Scalar beta, dns::XxMatrix< T_Scalar > &C, CuSparseHandler &cuSparseHandler=globalCuSparseHandler()) |
| Updates a general dense matrix with a sparse-dense matrix-matrix product. | |
High-performance matrix multiplications (GEMM).
| void culite::ops::mult | ( | T_Scalar | alpha, |
| op_t | opA, | ||
| const dns::XxMatrix< T_Scalar > & | A, | ||
| op_t | opB, | ||
| const dns::XxMatrix< T_Scalar > & | B, | ||
| T_Scalar | beta, | ||
| dns::XxMatrix< T_Scalar > & | C, | ||
| CuBlasHandler & | cuBlasHandler = globalCuBlasHandler() ) |
Updates a general matrix with a matrix-matrix product.
Performs the operation \( C = \beta \cdot C + \alpha \cdot op_A(A) \cdot op_B(B) \). C can be General/Symmetric/Hermitian. If C is Symmetric/Hermitian, it is assumed that the outcome of the operation \( op_A(A) \cdot op_B(B) \) is also Symmetric/Hermitian and only the corresponding part (upper/lower) will be calculated. Valid combinations are the following:
| A | B | opA | opB | C |
|---|---|---|---|---|
| General | General | unconstrained | unconstrained | General |
| Symmetric | General | N | unconstrained | General |
| Hermitian | General | N | unconstrained | General |
| General | General | N or T | T or N | Symmetric |
| General | General | N or C | C or N | Hermitian |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | opA | The operation to be performed for matrix A. |
| [in] | A | The input matrix. |
| [in] | opB | The operation to be performed for matrix B. |
| [in] | B | The input matrix. |
| [in] | beta | The scaling coefficient for C. |
| [in,out] | C | The matrix to be updated. |
| [in] | cuBlasHandler | The cuBLAS handler for GPU operations (defaults to global handler). |
| void culite::ops::mult | ( | T_Scalar | alpha, |
| op_t | opA, | ||
| const csr::XxMatrix< T_Int, T_Scalar > & | A, | ||
| const dns::XxMatrix< T_Scalar > & | B, | ||
| T_Scalar | beta, | ||
| dns::XxMatrix< T_Scalar > & | C, | ||
| CuSparseHandler & | cuSparseHandler = globalCuSparseHandler() ) |
Updates a general dense matrix with a sparse-dense matrix-matrix product.
Performs the operation \( C = \beta \cdot C + \alpha \cdot op_A(A) \cdot B \). Valid combinations are the following:
| A | B | opA | opB | C |
|---|---|---|---|---|
| General | General | unconstrained | N | General |
| Symmetric | General | N | N | General |
| Hermitian | General | N | N | General |
| T_Int | The integer type for indexing. |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | opA | The operation to be performed for matrix A. |
| [in] | A | The input sparse matrix. |
| [in] | B | The input dense matrix. |
| [in] | beta | The scaling coefficient for C. |
| [in,out] | C | The dense matrix to be updated. |
| [in] | cuSparseHandler | The cuSPARSE handler for GPU operations (defaults to global handler). |
| void culite::ops::mult | ( | T_Scalar | alpha, |
| op_t | opA, | ||
| const csc::XxMatrix< T_Int, T_Scalar > & | A, | ||
| const dns::XxMatrix< T_Scalar > & | B, | ||
| T_Scalar | beta, | ||
| dns::XxMatrix< T_Scalar > & | C, | ||
| CuSparseHandler & | cuSparseHandler = globalCuSparseHandler() ) |
Updates a general dense matrix with a sparse-dense matrix-matrix product.
Performs the operation \( C = \beta \cdot C + \alpha \cdot op_A(A) \cdot B \). Valid combinations are the following:
| A | B | opA | opB | C |
|---|---|---|---|---|
| General | General | unconstrained | N | General |
| Symmetric | General | N | N | General |
| Hermitian | General | N | N | General |
| T_Int | The integer type for indexing. |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | opA | The operation to be performed for matrix A. |
| [in] | A | The input sparse matrix. |
| [in] | B | The input dense matrix. |
| [in] | beta | The scaling coefficient for C. |
| [in,out] | C | The dense matrix to be updated. |
| [in] | cuSparseHandler | The cuSPARSE handler for GPU operations (defaults to global handler). |