![]() |
cuLite v0.3.1
A lite CUDA C++ Interface
|
Operations for summing or updating existing containers. More...
Functions | |
| template<typename T_Scalar> | |
| void | culite::ops::add (T_Scalar alpha, const dns::XxVector< T_Scalar > &x, T_Scalar beta, const dns::XxVector< T_Scalar > &y, dns::XxVector< T_Scalar > &z, CuBlasHandler &cublasHandler=globalCuBlasHandler()) |
| Adds two compatible scaled dense vectors. | |
| template<typename T_Scalar> | |
| void | culite::ops::add (op_t opA, T_Scalar alpha, const dns::XxMatrix< T_Scalar > &A, op_t opB, T_Scalar beta, const dns::XxMatrix< T_Scalar > &B, dns::XxMatrix< T_Scalar > &C, CuBlasHandler &cublasHandler=globalCuBlasHandler()) |
| Adds two compatible scaled dense matrices with optional transpose operations. | |
| template<typename T_Int, typename T_Scalar> | |
| csr::XxMatrix< T_Int, T_Scalar > | culite::ops::add (T_Scalar alpha, const csr::XxMatrix< T_Int, T_Scalar > &A, T_Scalar beta, const csr::XxMatrix< T_Int, T_Scalar > &B, CuSparseHandler &cusparseHandler=globalCuSparseHandler()) |
| Adds two compatible sparse matrices in CSR format. | |
| template<typename T_Int, typename T_Scalar> | |
| csc::XxMatrix< T_Int, T_Scalar > | culite::ops::add (T_Scalar alpha, const csc::XxMatrix< T_Int, T_Scalar > &A, T_Scalar beta, const csc::XxMatrix< T_Int, T_Scalar > &B, CuSparseHandler &cusparseHandler=globalCuSparseHandler()) |
| Adds two compatible sparse matrices in CSC format. | |
| template<typename T_Scalar> | |
| void | culite::ops::update (T_Scalar alpha, const dns::XxVector< T_Scalar > &x, dns::XxVector< T_Scalar > &y, CuBlasHandler &cublasHandler=globalCuBlasHandler()) |
| Update a dense vector with a compatible scaled dense vector. | |
| template<typename T_Scalar> | |
| void | culite::ops::update (op_t opA, T_Scalar alpha, const dns::XxMatrix< T_Scalar > &A, dns::XxMatrix< T_Scalar > &B, CuBlasHandler &cublasHandler=globalCuBlasHandler()) |
| Update a dense matrix with a compatible scaled dense matrix with optional transposition. | |
| template<typename T_Scalar> | |
| void | culite::ops::update (T_Scalar alpha, const dns::XxMatrix< T_Scalar > &A, dns::XxMatrix< T_Scalar > &B, CuBlasHandler &cublasHandler=globalCuBlasHandler()) |
| Update a dense matrix with a compatible scaled dense matrix. | |
| template<typename T_Int, typename T_Scalar> | |
| void | culite::ops::update (T_Scalar alpha, const csr::XxMatrix< T_Int, T_Scalar > &A, csr::XxMatrix< T_Int, T_Scalar > &B, CuSparseHandler &cuSparseHandler=globalCuSparseHandler()) |
| Update a sparse matrix with a compatible scaled sparse matrix. | |
| template<typename T_Int, typename T_Scalar> | |
| void | culite::ops::update (T_Scalar alpha, const csc::XxMatrix< T_Int, T_Scalar > &A, csc::XxMatrix< T_Int, T_Scalar > &B, CuSparseHandler &cuSparseHandler=globalCuSparseHandler()) |
| Update a sparse matrix with a compatible scaled sparse matrix. | |
Operations for summing or updating existing containers.
| void culite::ops::add | ( | T_Scalar | alpha, |
| const dns::XxVector< T_Scalar > & | x, | ||
| T_Scalar | beta, | ||
| const dns::XxVector< T_Scalar > & | y, | ||
| dns::XxVector< T_Scalar > & | z, | ||
| CuBlasHandler & | cublasHandler = globalCuBlasHandler() ) |
Adds two compatible scaled dense vectors.
Performs the operation \( \alpha \cdot x + \beta \cdot y \).
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient for x. |
| [in] | x | The first input dense vector. |
| [in] | beta | The scaling coefficient for y. |
| [in] | y | The second input dense vector. |
| [out] | z | The output dense vector. |
| [in] | cublasHandler | The cuBLAS handler for GPU operations (defaults to global handler). |
| void culite::ops::add | ( | op_t | opA, |
| T_Scalar | alpha, | ||
| const dns::XxMatrix< T_Scalar > & | A, | ||
| op_t | opB, | ||
| T_Scalar | beta, | ||
| const dns::XxMatrix< T_Scalar > & | B, | ||
| dns::XxMatrix< T_Scalar > & | C, | ||
| CuBlasHandler & | cublasHandler = globalCuBlasHandler() ) |
Adds two compatible scaled dense matrices with optional transpose operations.
Performs the operation \( \alpha \cdot op_A(A) + \beta \cdot op_B(B) \), where \( op_A \) and \( op_B \) can be no-transpose, transpose, or conjugate transpose.
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | opA | The operation to apply to matrix A (no-transpose, transpose, or conjugate transpose). |
| [in] | alpha | The scaling coefficient for A. |
| [in] | A | The first input dense matrix. |
| [in] | opB | The operation to apply to matrix B (no-transpose, transpose, or conjugate transpose). |
| [in] | beta | The scaling coefficient for B. |
| [in] | B | The second input dense matrix. |
| [out] | C | The output dense matrix. |
| [in] | cublasHandler | The cuBLAS handler for GPU operations (defaults to global handler). |
| csr::XxMatrix< T_Int, T_Scalar > culite::ops::add | ( | T_Scalar | alpha, |
| const csr::XxMatrix< T_Int, T_Scalar > & | A, | ||
| T_Scalar | beta, | ||
| const csr::XxMatrix< T_Int, T_Scalar > & | B, | ||
| CuSparseHandler & | cusparseHandler = globalCuSparseHandler() ) |
Adds two compatible sparse matrices in CSR format.
Performs the operation \( \alpha \cdot A + \beta \cdot B \) on GPU using cuSPARSE.
| T_Int | The integer type for indexing. |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient for A. |
| [in] | A | The first input sparse matrix in CSR format. |
| [in] | beta | The scaling coefficient for B. |
| [in] | B | The second input sparse matrix in CSR format. |
| [in] | cusparseHandler | The cuSPARSE handler for GPU operations (defaults to global handler). |
| csc::XxMatrix< T_Int, T_Scalar > culite::ops::add | ( | T_Scalar | alpha, |
| const csc::XxMatrix< T_Int, T_Scalar > & | A, | ||
| T_Scalar | beta, | ||
| const csc::XxMatrix< T_Int, T_Scalar > & | B, | ||
| CuSparseHandler & | cusparseHandler = globalCuSparseHandler() ) |
Adds two compatible sparse matrices in CSC format.
Performs the operation \( \alpha \cdot A + \beta \cdot B \) on GPU using cuSPARSE.
| T_Int | The integer type for indexing. |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient for A. |
| [in] | A | The first input sparse matrix in CSC format. |
| [in] | beta | The scaling coefficient for B. |
| [in] | B | The second input sparse matrix in CSC format. |
| [in] | cusparseHandler | The cuSPARSE handler for GPU operations (defaults to global handler). |
| void culite::ops::update | ( | T_Scalar | alpha, |
| const dns::XxVector< T_Scalar > & | x, | ||
| dns::XxVector< T_Scalar > & | y, | ||
| CuBlasHandler & | cublasHandler = globalCuBlasHandler() ) |
Update a dense vector with a compatible scaled dense vector.
Performs the operation \( y = y + \alpha \cdot x \).
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | x | The input dense vector. |
| [in,out] | y | The dense vector to be updated. |
| [in] | cublasHandler | The cuBLAS handler for GPU operations (defaults to global handler). |
| void culite::ops::update | ( | op_t | opA, |
| T_Scalar | alpha, | ||
| const dns::XxMatrix< T_Scalar > & | A, | ||
| dns::XxMatrix< T_Scalar > & | B, | ||
| CuBlasHandler & | cublasHandler = globalCuBlasHandler() ) |
Update a dense matrix with a compatible scaled dense matrix with optional transposition.
Performs the operation \( B = B + \alpha \cdot op(A) \), where \( op(A) \) can be \( A \), \( A^T \), or \( A^H \).
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | opA | The operation to apply to matrix A (N for none, T for transpose, H for conjugate transpose). |
| [in] | alpha | The scaling coefficient. |
| [in] | A | The input dense matrix. |
| [in,out] | B | The dense matrix to be updated. |
| [in] | cublasHandler | The cuBLAS handler for GPU operations (defaults to global handler). |
| void culite::ops::update | ( | T_Scalar | alpha, |
| const dns::XxMatrix< T_Scalar > & | A, | ||
| dns::XxMatrix< T_Scalar > & | B, | ||
| CuBlasHandler & | cublasHandler = globalCuBlasHandler() ) |
Update a dense matrix with a compatible scaled dense matrix.
Performs the operation \( B = B + \alpha \cdot A \).
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | A | The input dense matrix. |
| [in,out] | B | The dense matrix to be updated. |
| [in] | cublasHandler | The cuBLAS handler for GPU operations (defaults to global handler). |
| void culite::ops::update | ( | T_Scalar | alpha, |
| const csr::XxMatrix< T_Int, T_Scalar > & | A, | ||
| csr::XxMatrix< T_Int, T_Scalar > & | B, | ||
| CuSparseHandler & | cuSparseHandler = globalCuSparseHandler() ) |
Update a sparse matrix with a compatible scaled sparse matrix.
Performs the operation \( B = B + \alpha \cdot A \).
| T_Int | The integer type for indexing. |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | A | The input sparse matrix. |
| [in,out] | B | The sparse matrix to be updated. |
| [in] | cuSparseHandler | The cuSPARSE handler for GPU operations (defaults to global handler, currently unused). |
| void culite::ops::update | ( | T_Scalar | alpha, |
| const csc::XxMatrix< T_Int, T_Scalar > & | A, | ||
| csc::XxMatrix< T_Int, T_Scalar > & | B, | ||
| CuSparseHandler & | cuSparseHandler = globalCuSparseHandler() ) |
Update a sparse matrix with a compatible scaled sparse matrix.
Performs the operation \( B = B + \alpha \cdot A \).
| T_Int | The integer type for indexing. |
| T_Scalar | The scalar type (e.g., float, double, complex). |
| [in] | alpha | The scaling coefficient. |
| [in] | A | The input sparse matrix. |
| [in,out] | B | The sparse matrix to be updated. |
| [in] | cuSparseHandler | The cuSPARSE handler for GPU operations (defaults to global handler, currently unused). |