ungqr_batch#
Generates the complex unitary matrices \(Q_i\) of the batch of QR factorizations formed by the geqrf_batch function.
Description
ungqr_batch supports the following precisions.
T
std::complex<float>
std::complex<double>
ungqr_batch (Buffer Version)#
Description
The buffer version of ungqr_batch supports only the strided API.
Strided API
The routine generates the wholes or parts of :math`m times m` unitary matrices \(Q_i\) of the batch of QR factorization formed by the Strided API of the geqrf_batch (Buffer Version).Usually \(Q_i\) is determined from the QR factorization of an \(m \times p\) matrix \(A_i\) with :math`m ge p`.To compute the whole matrices \(Q_i\), use:ungqr_batch(queue, m, m, p, a, ...)To compute the leading \(p\) columns of \(Q_i\) (which form an orthonormal basis in the space spanned by the columns of \(A_i\)):ungqr_batch(queue, m, p, p, a, ...)To compute the matrices \(Q_i`^k\) of the QR factorizations of leading \(k\) columns of the matrices \(A_i\):ungqr_batch(queue, m, m, k, a, ...)To compute the leading \(k\) columns of \(Q_i^k\) (which form an orthonormal basis in the space spanned by leading \(k\) columns of the matrices \(A_i\)):ungqr_batch(queue, m, k, k, a, ...)
Syntax
namespace oneapi::math::lapack {
  void ungqr_batch(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t k, cl::sycl::buffer<T> &a, std::int64_t lda, std::int64_t stride_a, cl::sycl::buffer<T> &tau, std::int64_t stride_tau, std::int64_t batch_size, cl::sycl::buffer<T> &scratchpad, std::int64_t scratchpad_size)
}
Input Parameters
- queue
 Device queue where calculations will be performed.
- m
 Number of rows in the matrices \(A_i\) (\(0 \le m\)).
- n
 Number of columns in the matrices \(A_i\) (\(0\le n\)).
- k
 Number of elementary reflectors whose product defines the matrices \(Q_i\) (\(0 \le k \le n\)).
- a
 Array resulting after call to the Strided API of the geqrf_batch (USM Version) function.
- lda
 Leading dimension of \(A_i\) (\(\text{lda} \le m\)).
- stride_a
 Stride between the beginnings of matrices \(A_i\) inside the batch array
a.- tau
 Array resulting after call to the Strided API of the geqrf_batch (USM Version) function.
- stride_tau
 Stride between the beginnings of arrays \(tau_i\) inside the array
tau.- batch_size
 Number of problems in a batch.
- scratchpad
 Scratchpad memory to be used by 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 then the value returned by strided version of the Strided API of the ungqr_batch_scratchpad_size function.
Output Parameters
- a
 Array data is overwritten by
abatch of n leading columns of the \(m \times m\) unitary matrices \(Q_i\).
Throws
This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.
oneapi::math::lapack::batch_error
oneapi::math::unsupported_device
oneapi::math::lapack::invalid_argument
Exception is thrown in case of problems during calculations. The info code of the problem can be obtained by info() method of exception object:
If
info = -n, the \(n\)-th parameter had an illegal value.If
infoequals to value passed as scratchpad size, and detail() returns non zero, then passed scratchpad is of insufficient size, and required size should be not less then value returned by detail() method of exception object.If
infois not zero and detail() returns zero, then there were some errors for some of the problems in the supplied batch andinfocode contains the number of failed calculations in a batch.
ungqr_batch (USM Version)#
Description
The USM version of ungqr_batch supports the group API and strided API.
Group API
The routine generates the wholes or parts of :math`m times m` unitary matrices \(Q_i\) of the batch of QR factorization formed by the Group API of the geqrf_batch (Buffer Version).Usually \(Q_i\) is determined from the QR factorization of an \(m \times p\) matrix \(A_i\) with :math`m ge p`.To compute the whole matrices \(Q_i\), use:ungqr_batch(queue, m, m, p, a, ...)To compute the leading \(p\) columns of \(Q_i\) (which form an orthonormal basis in the space spanned by the columns of \(A_i\)):ungqr_batch(queue, m, p, p, a, ...)To compute the matrices \(Q_i`^k\) of the QR factorizations of leading \(k\) columns of the matrices \(A_i\):ungqr_batch(queue, m, m, k, a, ...)To compute the leading \(k\) columns of \(Q_i^k\) (which form an orthonormal basis in the space spanned by leading \(k\) columns of the matrices \(A_i\)):ungqr_batch(queue, m, k, k, a, ...)
Syntax
namespace oneapi::math::lapack {
  cl::sycl::event ungqr_batch(cl::sycl::queue &queue, std::int64_t *m, std::int64_t *n, std::int64_t *k, T **a, std::int64_t *lda, const T * const *tau, std::int64_t group_count, std::int64_t *group_sizes, T *scratchpad, std::int64_t scratchpad_size, const std::vector<cl::sycl::event> &events = {})
}
Input Parameters
- queue
 Device queue where calculations will be performed.
- m
 Array of
group_count\(m_g\) parameters as previously supplied to the Group API of the geqrf_batch (USM Version) function.- n
 Array of
group_count\(n_g\) parameters as previously supplied to the Group API of the geqrf_batch (USM Version) function.- k
 - Array of
group_count\(k_g\) parameters as previously supplied to the Group API of the geqrf_batch (USM Version) function.The number of elementary reflectors whose product defines the matrices \(Q_i\) (\(0 \le k_g \le n_g\)). - a
 Array resulting after call to the Group API of the geqrf_batch (USM Version) function.
- lda
 Array of leading dimensions of \(A_i\) as previously supplied to the Group API of the geqrf_batch (USM Version) function.
- tau
 Array resulting after call to the Group API of the geqrf_batch (USM Version) function.
- group_count
 Number of groups of parameters. Must be at least 0.
- group_sizes
 Array of
group_countintegers. Array element with index \(g\) specifies the number of problems to solve for each of the groups of parameters \(g\). So the total number of problems to solve,batch_size, is a sum of all parameter group sizes.- scratchpad
 Scratchpad memory to be used by 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 then the value returned by Group API of the ungqr_batch_scratchpad_size function.- events
 List of events to wait for before starting computation. Defaults to empty list.
Output Parameters
- a
 Matrices pointed to by array
aare overwritten by \(n_g\) leading columns of the \(m_g \times m_g\) orthogonal matrices \(Q_i\), where \(g\) is an index of group of parameters corresponding to \(Q_i\).
Return Values
Output event to wait on to ensure computation is complete.
Throws
This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.
oneapi::math::lapack::batch_error
oneapi::math::unsupported_device
oneapi::math::lapack::invalid_argument
The
infocode of the problem can be obtained by info() method of exception object:If
info = -n, the \(n\)-th parameter had an illegal value. Ifinfoequals to value passed as scratchpad size, and detail() returns non zero, then passed scratchpad is of insufficient size, and required size should be not less then value returned by detail() method of exception object.If
infois not zero and detail() returns zero, then there were some errors for some of the problems in the supplied batch andinfocode contains the number of failed calculations in a batch.
Strided API
The routine generates the wholes or parts of :math`m times m` unitary matrices \(Q_i\) of the batch of QR factorization formed by the Strided API of the geqrf_batch (USM Version).Usually \(Q_i\) is determined from the QR factorization of an \(m \times p\) matrix \(A_i\) with :math`m ge p`.To compute the whole matrices \(Q_i\), use:ungqr_batch(queue, m, m, p, a, ...)To compute the leading \(p\) columns of \(Q_i\) (which form an orthonormal basis in the space spanned by the columns of \(A_i\)):ungqr_batch(queue, m, p, p, a, ...)To compute the matrices \(Q_i`^k\) of the QR factorizations of leading \(k\) columns of the matrices \(A_i\):ungqr_batch(queue, m, m, k, a, ...)To compute the leading \(k\) columns of \(Q_i^k\) (which form an orthonormal basis in the space spanned by leading \(k\) columns of the matrices \(A_i\)):ungqr_batch(queue, m, k, k, a, ...)
Syntax
namespace oneapi::math::lapack {
  cl::sycl::event ungqr_batch(cl::sycl::queue &queue, std::int64_t m, std::int64_t n, std::int64_t k, T *a, std::int64_t lda, std::int64_t stride_a, const T *tau, std::int64_t stride_tau, std::int64_t batch_size, T *scratchpad, std::int64_t scratchpad_size, const std::vector<cl::sycl::event> &events = {})
};
Input Parameters
- queue
 Device queue where calculations will be performed.
- m
 Number of rows in the matrices \(A_i\) (\(0 \le m\)).
- n
 Number of columns in the matrices \(A_i\) (\(0\le n\)).
- k
 Number of elementary reflectors whose product defines the matrices \(Q_i\) (\(0 \le k \le n\)).
- a
 Array resulting after call to the Strided API of the geqrf_batch (USM Version) function.
- lda
 Leading dimension of \(A_i\) (\(\text{lda} \le m\)).
- stride_a
 Stride between the beginnings of matrices \(A_i\) inside the batch array
a.- tau
 Array resulting after call to the Strided API of the geqrf_batch (USM Version) function.
- stride_tau
 Stride between the beginnings of arrays \(tau_i\) inside the array
tau.- batch_size
 Number of problems in a batch.
- scratchpad
 Scratchpad memory to be used by 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 then the value returned by strided version of the Strided API of the ungqr_batch_scratchpad_size function.- events
 List of events to wait for before starting computation. Defaults to empty list.
Output Parameters
- a
 Array data is overwritten by
abatch of n leading columns of the \(m \times m\) unitary matrices \(Q_i\).
Return Values
Output event to wait on to ensure computation is complete.
Throws
This routine shall throw the following exceptions if the associated condition is detected. An implementation may throw additional implementation-specific exception(s) in case of error conditions not covered here.
oneapi::math::lapack::batch_error
oneapi::math::unsupported_device
oneapi::math::lapack::invalid_argument
The
infocode of the problem can be obtained by info() method of exception object:If
info = -n, the \(n\)-th parameter had an illegal value.If
infoequals to value passed as scratchpad size, and detail() returns non zero, then passed scratchpad is of insufficient size, and required size should be not less then value returned by detail() method of exception object.If
infois not zero and detail() returns zero, then there were some errors for some of the problems in the supplied batch andinfocode contains the number of failed calculations in a batch.
Parent topic: LAPACK-like Extensions Routines