Visible to Intel only — GUID: GUID-E2BD8643-AD4E-45F0-958D-F0317A846120
Visible to Intel only — GUID: GUID-E2BD8643-AD4E-45F0-958D-F0317A846120
syr2k
Performs a symmetric rank-2k update.
Description
The syr2k routines perform a rank-2k update of an n x n symmetric matrix C by general matrices A and B. The operation is defined as:
If trans = transpose::nontrans,
where A and B are n x k matrices.
If trans = transpose::trans,
where A and B are k x n matrices.
In both cases:
alpha and beta are scalars
C is symmetric matrix, A and B are general matrices
The inner dimension of both matrix multiplications is k
syr2k supports the following precisions:
T |
---|
float |
double |
std::complex<float> |
std::complex<double> |
syr2k (Buffer Version)
Syntax
namespace oneapi::mkl::blas::column_major { void syr2k(sycl::queue &queue, oneapi::mkl::uplo upper_lower, oneapi::mkl::transpose trans, std::int64_t n, std::int64_t k, T alpha, sycl::buffer<T,1> &a, std::int64_t lda, sycl::buffer<T,1> &b, std::int64_t ldb, T beta, sycl::buffer<T,1> &c, std::int64_t ldc, compute_mode mode = compute_mode::unset) }
namespace oneapi::mkl::blas::row_major { void syr2k(sycl::queue &queue, oneapi::mkl::uplo upper_lower, oneapi::mkl::transpose trans, std::int64_t n, std::int64_t k, T alpha, sycl::buffer<T,1> &a, std::int64_t lda, sycl::buffer<T,1> &b, std::int64_t ldb, T beta, sycl::buffer<T,1> &c, std::int64_t ldc, compute_mode mode = compute_mode::unset) }
Input Parameters
- queue
-
The queue where the routine should be executed.
- upper_lower
-
Specifies whether matrix C is upper or lower triangular. See Data Types for more details.
- trans
-
Specifies the transposition operation applied as described above. Conjugation is never performed even if trans = transpose::conjtrans.
- n
-
Number of rows and columns of matrix C. Must be at least zero.
- k
-
Inner dimension of matrix multiplications. Must be at least zero.
- alpha
-
Complex scaling factor for the rank-2k update.
- a
-
Buffer holding input matrix A. See Matrix Storage for more details.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
A is n x k matrix. Size of array a must be at least lda * k
A is k x n matrix. Size of array a must be at least lda * n
Row major
A is n x k matrix. Size of array a must be at least lda * n
A is k x n matrix. Size of array a must be at least lda * k
- lda
-
Leading dimension of matrix A. Must be positive.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
Must be at least n
Must be at least k
Row major
Must be at least k
Must be at least n
- b
-
Buffer holding input matrix B. See Matrix Storage for more details.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
B is n x k matrix. Size of array b must be at least ldb * k
B is k x n matrix. Size of array b must be at least ldb * n
Row major
B is n x k matrix. Size of array b must be at least ldb * n
B is k x n matrix. Size of array b must be at least ldb * k
- ldb
-
Leading dimension of matrix B. Must be positive.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
Must be at least n
Must be at least k
Row major
Must be at least k
Must be at least n
- beta
-
Real scaling factor for matrix C.
- c
-
Buffer holding input/output matrix C. Size of the buffer must be at least ldc * n. See Matrix Storage for more details.
- ldc
-
Leading dimension of matrix C. Must be positive and at least n.
- mode
-
Optional. Compute mode settings. See Compute Modes for more details.
Output Parameters
- c
-
Output buffer overwritten by updated C matrix.
syr2k (USM Version)
Syntax
namespace oneapi::mkl::blas::column_major { sycl::event syr2k(sycl::queue &queue, oneapi::mkl::uplo upper_lower, oneapi::mkl::transpose trans, std::int64_t n, std::int64_t k, oneapi::mkl::value_or_pointer<T> alpha, const T *a, std::int64_t lda, const T *b, std::int64_t ldb, oneapi::mkl::value_or_pointer<T> beta, T *c, std::int64_t ldc, compute_mode mode = compute_mode::unset, const std::vector<sycl::event> &dependencies = {}) }
namespace oneapi::mkl::blas::row_major { sycl::event syr2k(sycl::queue &queue, oneapi::mkl::uplo upper_lower, oneapi::mkl::transpose trans, std::int64_t n, std::int64_t k, oneapi::mkl::value_or_pointer<T> alpha, const T *a, std::int64_t lda, const T *b, std::int64_t ldb, oneapi::mkl::value_or_pointer<T> beta, T *c, std::int64_t ldc, compute_mode mode = compute_mode::unset, const std::vector<sycl::event> &dependencies = {}) }
Input Parameters
- queue
-
The queue where the routine should be executed.
- upper_lower
-
Specifies whether matrix C is upper or lower triangular. See Data Types for more details.
- trans
-
Specifies the transposition operation applied as described above. Conjugation is never performed even if trans = transpose::conjtrans.
- n
-
Number of rows and columns of matrix C. Must be at least zero.
- k
-
Inner dimension of matrix multiplications. Must be at least zero.
- alpha
-
Complex scaling factor for the rank-2k update. See Scalar Arguments for more information on the value_or_pointer data type.
- a
-
Pointer to input matrix A. See Matrix Storage for more details.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
A is n x k matrix. Size of array a must be at least lda * k
A is k x n matrix. Size of array a must be at least lda * n
Row major
A is n x k matrix. Size of array a must be at least lda * n
A is k x n matrix. Size of array a must be at least lda * k
- lda
-
Leading dimension of matrix A. Must be positive.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
Must be at least n
Must be at least k
Row major
Must be at least k
Must be at least n
- b
-
Pointer to input matrix B. See Matrix Storage for more details.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
B is n x k matrix. Size of array b must be at least ldb * k
B is k x n matrix. Size of array b must be at least ldb * n
Row major
B is n x k matrix. Size of array b must be at least ldb * n
B is k x n matrix. Size of array b must be at least ldb * k
- ldb
-
Leading dimension of matrix B. Must be positive.
trans = transpose::nontrans
trans = transpose::trans or trans = transpose::conjtrans
Column major
Must be at least n
Must be at least k
Row major
Must be at least k
Must be at least n
- beta
-
Real scaling factor for matrix C. See Scalar Arguments for more information on the value_or_pointer data type.
- c
-
Pointer to input/output matrix C. Size of the array must be at least ldc * n. See Matrix Storage for more details.
- ldc
-
Leading dimension of matrix C. Must be positive and at least n.
- mode
-
Optional. Compute mode settings. See Compute Modes for more details.
- dependencies
-
Optional. List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
mode and dependencies may be omitted independently; it is not necessary to specify mode in order to provide dependencies.
Output Parameters
- c
-
Pointer to output matrix overwritten by updated C matrix.
Return Values
Output event to wait on to ensure computation is complete.