gebrd (USM Version)#
Reduces a general matrix to bidiagonal form. This routine belongs to the oneapi::mkl::lapack namespace.
Description#
The routine reduces a general m-by-n matrix A to a
bidiagonal matrix B by an orthogonal (unitary) transformation.
If m ≥ n, the reduction is given by
where B1 is an n-by-n upper diagonal matrix,
Q and P are orthogonal or, for a complex A, unitary
matrices; Q1 consists of the first n columns of
Q.
If m < n, the reduction is given by
where B1 is an m-by-m lower diagonal matrix,
Q and P are orthogonal or, for a complex A, unitary
matrices; P1 consists of the first m columns of
P.
The routine does not form the matrices Q and P explicitly,
but represents them as products of elementary reflectors. Routines
are provided to work with the matrices Q and P in this
representation:
If the matrix A is real,
to compute
QandPexplicitly, call orgbr (USM Version).
If the matrix A is complex,
to compute
QandPexplicitly, call ungbr (USM Version).
API#
Syntax#
namespace oneapi::mkl::lapack {
sycl::event gebrd(sycl::queue &queue,
int64_t m,
int64_t n,
T *a,
int64_t lda,
RealT *d,
RealT *e,
T *tauq,
T *taup,
T *scratchpad,
int64_t scratchpad_size, const std::vector<sycl::event> &events = {})
}
gebrd (USM version) supports the following precisions and
devices:
T |
Devices supported |
|---|---|
|
CPU, GPU* |
|
CPU, GPU* |
|
CPU, GPU* |
|
CPU, GPU* |
*Interface support only; all computations are performed on the CPU.
Input Parameters#
- queue
Device queue where calculations will be performed.
- m
The number of rows in the matrix
A(0 ≤ m).- n
The number of columns in the matrix
A(0 ≤ n).- a
Pointer to matrix
A. The size ofamust be at leastlda*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 gebrd_scratchpad_size function.- events
List of events to wait for before starting computation. Defaults to empty list.
Output Parameters#
- a
If
m ≥ n, the diagonal and first super-diagonal of a are overwritten by the upper bidiagonal matrixB. The elements below the diagonal, with the tauq, represent the orthogonal matrixQas a product of elementary reflectors, and the elements above the first superdiagonal, with the taup, represent the orthogonal matrixPas a product of elementary reflectors.If
m<n, the diagonal and first sub-diagonal of a are overwritten by the lower bidiagonal matrixB. The elements below the first subdiagonal, with the tauq, represent the orthogonal matrixQas a product of elementary reflectors, and the elements above the diagonal, with the taup, represent the orthogonal matrixPas a product of elementary reflectors.- d
Pointer to memory of size at least
max(1, min(m,n)). Contains the diagonal elements ofB.- e
Pointer to memory of size at least
max(1, min(m,n) - 1). Contains the off-diagonal elements ofB.- tauq
Pointer to memory of size at least
max(1, min(m, n)). The scalar factors of the elementary reflectors which represent the orthogonal or unitary matrixQ.- taup
Pointer to memory of size at least
max(1, min(m, n)). The scalar factors of the elementary reflectors which represent the orthogonal or unitary matrixP.
Exceptions#
Exception |
Description |
|---|---|
|
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 If |
Return Values#
Output event to wait on to ensure computation is complete.