sytrf (USM Version)¶
Computes the Bunch-Kaufman factorization of a symmetric matrix. This
routine belongs to the oneapi::mkl::lapack
namespace.
Syntax
-
cl::sycl::event
sytrf
(queue &queue, mkl::uplo uplo, std::int64_t n, T *a, std::int64_t lda, std::int64_t *ipiv, T *scratchpad, std::int64_t scratchpad_size, const cl::sycl::vector_class<cl::sycl::event> &events = {})¶
sytrf (USM version) supports the following precisions and devices:
T |
Devices Supported |
---|---|
|
Host and CPU |
|
Host and CPU |
|
Host and CPU |
|
Host and CPU |
Description
The routine computes thefactorization of a real/complex symmetric
matrix A
usingthe Bunch-Kaufman diagonal pivoting method. The
form of thefactorization is:
if
uplo=uplo::upper
,A
=U*D*U
Tif
uplo=uplo::lower
,A
=L*D*L
T
where A
is the input matrix, U
and L
are products of
permutation and triangular matrices with unit diagonal (upper
triangular for U
and lower triangular for L
), and D
is a
symmetric block-diagonal matrix with 1-by-1 and 2-by-2 diagonal
blocks. U
and L
have 2-by-2 unit diagonal blocks
corresponding to the 2-by-2 blocks of D
.
Input Parameters
- queue
Device queue where calculations will be performed.
- uplo
Indicates whether the upper or lower triangular part of
A
is stored and howA
is factored:If
uplo = uplo::upper
, the arraya
stores the upper triangular part of the matrixA
, andA
is factored asU*D*U
T.If
uplo = uplo::lower
, the arraya
stores the lower triangular part of the matrixA
, andA
is factored asL*D*L
T.- n
The order of the matrix
A
(0≤n
).- a
Pointer to the coefficients of matrix
A
, sizemax(1,lda*n)
containing either the upper or lower triangular part of the matrixA
(see uplo). The second dimension ofa
must be at leastmax(1, n)
.- lda
The leading dimension of
a
.- scratchpad
Pointer to scratchpad memory to be used by the routine for storing intermediate results.
- scratchpad_size
Size of scratchpad memory as a number of floating point elements of type
T
. Size should not be less than the value returned by the sytrf_scratchpad_size function.- events
List of events to wait for before starting computation. Defaults to empty list.
Output Parameters
- a
The upper or lower triangular part of
a
is overwritten by details of the block-diagonal matrixD
and the multipliers used to obtain the factorU
(orL
).- ipiv
Pointer to memory array of size at least
max(1,n)
. Contains details of the interchanges and the block structure ofD
. Ifipiv(i) = k > 0
, thendii
is a 1-by-1 block, and thei
-th row and column ofA
was interchanged with thek
-th row and column.If
uplo = mkl::uplo::upper
andipiv(i) = ipiv(i-1) = -m < 0
, thenD
has a 2-by-2 block in rows/columnsi
andi
-1, and(i-1)
-th row and column ofA
was interchanged with them
-th row and column.If
uplo = mkl::uplo::lower
andipiv(i) = ipiv(i+1) = -m < 0
, thenD
has a 2-by-2 block in rows/columnsi
andi+1
, and(i+1)
-th row and column ofA
was interchanged with them
-th row and column.
Exceptions
mkl::lapack::exception |
This exception is thrown when problems occur during calculations. You can obtain the info code of the problem using the info() method of the exception object: If |
Return Values
Output event to wait on to ensure computation is complete.