-
aoclsparse_status aoclsparse_ssyprd(const aoclsparse_operation op, const aoclsparse_matrix A, const float *B, const aoclsparse_order orderB, const aoclsparse_int ldb, const float alpha, const float beta, float *C, const aoclsparse_order orderC, const aoclsparse_int ldc)#
-
aoclsparse_status aoclsparse_dsyprd(const aoclsparse_operation op, const aoclsparse_matrix A, const double *B, const aoclsparse_order orderB, const aoclsparse_int ldb, const double alpha, const double beta, double *C, const aoclsparse_order orderC, const aoclsparse_int ldc)#
-
aoclsparse_status aoclsparse_csyprd(const aoclsparse_operation op, const aoclsparse_matrix A, const aoclsparse_float_complex *B, const aoclsparse_order orderB, const aoclsparse_int ldb, const aoclsparse_float_complex alpha, const aoclsparse_float_complex beta, aoclsparse_float_complex *C, const aoclsparse_order orderC, const aoclsparse_int ldc)#
-
aoclsparse_status aoclsparse_zsyprd(const aoclsparse_operation op, const aoclsparse_matrix A, const aoclsparse_double_complex *B, const aoclsparse_order orderB, const aoclsparse_int ldb, const aoclsparse_double_complex alpha, const aoclsparse_double_complex beta, aoclsparse_double_complex *C, const aoclsparse_order orderC, const aoclsparse_int ldc)#
Performs symmetric triple product of a sparse matrix and a dense matrix and stores the output as a dense matrix.
aoclsparse_?syprdperforms product of a scalar \(\alpha\), with the symmetric triple product of a sparse \(m \times k\) matrix \(A\), defined in CSR format, with a \(k \times k\) symmetric dense (or Hermitian) matrix \(B\), and a \(k \times m\) \(op(A)\). Adds the resulting matrix to \(m \times m\) symmetric dense (or Hermitian) matrix \(C\) that is multiplied by a scalar \(\beta\), such that\[ C := \alpha \cdot A \cdot B \cdot op(A) + \beta \cdot C \]if \(op\) is aoclsparse_operation_none.Otherwise,
\[ C := \alpha \cdot op(A) \cdot B \cdot A + \beta \cdot C \]\[\begin{split} op(A) = \left\{ \begin{array}{ll} A^T, & \text{if } {\bf\mathsf{op}} = \text{aoclsparse}\_\text{operation}\_\text{transpose} \text{ (real matrices)}\\ A^H, & \text{if } {\bf\mathsf{op}} = \text{aoclsparse}\_\text{operation}\_\text{conjugate}\_\text{transpose} \text{ (complex matrices)} \end{array} \right. \end{split}\]Notes
1. This routine assumes the dense matrices (B and C) are stored in full although the computations happen on the upper triangular portion of the matrices.
2. aoclsparse_operation_transpose is only supported for real matrices.
3. aoclsparse_operation_conjugate_transpose is only supported for complex matrices.
4. Complex dense matrices are assumed to be Hermitian matrices.
- Parameters:
op – [in] Matrix \(A\) operation type.
A – [in] Sparse CSR matrix \(A\) structure.
B – [in] Array of dimension \(ldb \times ldb\). Only the upper triangular matrix is used for computation.
orderB – [in] aoclsparse_order_row or aoclsparse_order_column for dense matrix B.
ldb – [in] Leading dimension of \(B\), must be at least \(\max{(1, k)}\) ( \(op(A) = A\)) or \(\max{(1, m)}\) ( \(op(A) = A^T\) or \(op(A) = A^H\)).
alpha – [in] Scalar \(\alpha\).
beta – [in] Scalar \(\beta\).
C – [inout] Array of dimension \(ldc \times ldc\). Only upper triangular part of the matrix is processed.
orderC – [in] aoclsparse_order_row or aoclsparse_order_column for dense matrix C.
ldc – [in] Leading dimension of \(C\), must be at least \(\max{(1, m)}\) ( \(op(A) = A\)) or \(\max{(1, k)}\) ( \(op(A) = A^T\) or \(op(A) = A^H\)).
- Return values:
aoclsparse_status_success – The operation completed successfully.
aoclsparse_invalid_operation – The operation is invalid if the matrix B and C has a different layout ordering.
aoclsparse_status_wrong_type – The data type of the matrices are not matching or invalid.
aoclsparse_status_invalid_size – The value of
m,k,nnz,ldborldcis invalid.aoclsparse_status_invalid_pointer – The pointer
A,B, orCis invalid.aoclsparse_status_not_implemented – The values of
orderBandorderCare different.