sytrf#
Computes the Bunch-Kaufman factorization of a symmetric matrix.
Description
sytrf
supports the following precisions.
T
float
double
std::complex<float>
std::complex<double>
The routine computes the factorization of a real/complex symmetric matrix \(A\) using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is:
if
upper_lower=uplo::upper
, \(A\) = \(UDU^{T}\)if
upper_lower=uplo::lower
, \(A\) = \(LDL^{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 \times 1\) and \(2 \times 2\) diagonal blocks. \(U\) and \(L\) have \(2 \times 2\) unit diagonal blocks corresponding to the \(2 \times 2\) blocks of \(D\).
sytrf (Buffer Version)#
Syntax
namespace oneapi::mkl::lapack {
void sytrf(sycl::queue &queue, oneapi::mkl::uplo upper_lower, std::int64_t n, sycl::buffer<T,1> &a, std::int64_t lda, sycl::buffer<int_64,1> &ipiv, sycl::buffer<T,1> &scratchpad, std::int64_t scratchpad_size)
}
Input Parameters
- queue
The queue where the routine should be executed.
- upper_lower
Indicates whether the upper or lower triangular part of \(A\) is stored and how \(A\) is factored:
If
upper_lower=uplo::upper
, the buffera
stores the upper triangular part of the matrix \(A\), and \(A\) is factored as \(UDU^T\).If
upper_lower=uplo::lower
, the buffera
stores the lower triangular part of the matrix \(A\), and \(A\) is factored as \(LDL^T\).- n
The order of matrix \(A\) (\(0 \le n\)).
- a
The buffer
a
, size \(\max(1,lda \cdot n)\). The buffera
contains either the upper or the lower triangular part of the matrix \(A\) (seeupper_lower
). The second dimension ofa
must be at least \(\max(1, n)\).- lda
The leading dimension of
a
.- 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 sytrf_scratchpad_size function.
Output Parameters
- a
The upper or lower triangular part of a is overwritten by details of the block-diagonal matrix \(D\) and the multipliers used to obtain the factor \(U\) (or \(L\)).
- ipiv
Buffer, size at least \(\max(1, n)\). Contains details of the interchanges and the block structure of \(D\). If \(\text{ipiv}(i)=k>0\), then \(d_{ii}\) is a \(1 \times 1\) block, and the \(i\)-th row and column of \(A\) was interchanged with the \(k\)-th row and column.
If
upper_lower=oneapi::mkl::uplo::upper
and \(\text{ipiv}(i)=\text{ipiv}(i-1)=-m<0\), then \(D\) has a \(2 \times 2\) block in rows/columns \(i\) and \(i\)-1, and (\(i-1\))-th row and column of \(A\) was interchanged with the \(m\)-th row and column.If
upper_lower=oneapi::mkl::uplo::lower
and \(\text{ipiv}(i)=\text{ipiv}(i+1)=-m<0\), then \(D\) has a \(2 \times 2\) block in rows/columns \(i\) and \(i+1\), and (\(i+1\))-th row and column of \(A\) was interchanged with the \(m\)-th row and column.- scratchpad
Buffer holding scratchpad memory to be used by routine for storing intermediate results.
sytrf (USM Version)#
Syntax
namespace oneapi::mkl::lapack {
sycl::event sytrf(sycl::queue &queue, oneapi::mkl::uplo upper_lower, std::int64_t n, T *a, std::int64_t lda, int_64 *ipiv, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
}
Input Parameters
- queue
The queue where the routine should be executed.
- upper_lower
Indicates whether the upper or lower triangular part of \(A\) is stored and how \(A\) is factored:
If
upper_lower=uplo::upper
, the arraya
stores the upper triangular part of the matrix \(A\), and \(A\) is factored as \(UDU^T\).If
upper_lower=uplo::lower
, the arraya
stores the lower triangular part of the matrix \(A\), and \(A\) is factored as \(LDL^T\).- n
The order of matrix \(A\) (\(0 \le n\)).
- a
The pointer to \(A\), size \(\max(1,\text{lda} \cdot n)\), containing either the upper or the lower triangular part of the matrix \(A\) (see
upper_lower
). The second dimension ofa
must be at least \(\max(1, n)\).- lda
The leading dimension of
a
.- 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 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 matrix \(D\) and the multipliers used to obtain the factor \(U\) (or \(L\)).
- ipiv
Pointer to array of size at least \(\max(1, n)\). Contains details of the interchanges and the block structure of \(D\). If \(\text{ipiv}(i)=k>0\), then \(d_{ii}\) is a \(1 \times 1\) block, and the \(i\)-th row and column of \(A\) was interchanged with the \(k\)-th row and column.
If
upper_lower=oneapi::mkl::uplo::upper
and \(\text{ipiv}(i)=\text{ipiv}(i-1)=-m<0\), then \(D\) has a \(2 \times 2\) block in rows/columns \(i\) and \(i-1\), and (\(i-1\))-th row and column of \(A\) was interchanged with the \(m\)-th row and column.If
upper_lower=oneapi::mkl::uplo::lower
and \(\text{ipiv}(i)=\text{ipiv}(i+1)=-m<0\), then \(D\) has a \(2 \times 2\) block in rows/columns \(i\) and \(i+1\), and (\(i+1\))-th row and column of \(A\) was interchanged with the \(m\)-th row and column.- scratchpad
Pointer to scratchpad memory to be used by routine for storing intermediate results.
Return Values
Output event to wait on to ensure computation is complete.
Parent topic: LAPACK Linear Equation Routines