Visible to Intel only — GUID: GUID-DD093EE2-3EB5-4E45-895C-D32B2058D16A
Visible to Intel only — GUID: GUID-DD093EE2-3EB5-4E45-895C-D32B2058D16A
gels_batch (USM Strided Version)
Finds the least squares solutions for a batch of overdetermined linear systems. This routine belongs to the oneapi::mkl::lapack namespace.
Description
Finds the least squares solutions for a batch of overdetermined linear systems.
API
Syntax
namespace oneapi::mkl::lapack { sycl::event gels_batch(sycl::queue &queue, mkl::transpose trans, std::int64_t m, std::int64_t n, std::int64_t nrhs, T *a, std::int64_t lda, std::int64_t stride_a, T *b, std::int64_t ldb, std::int64_t stride_b, std::int64_t batch_size, T *scratchpad, std::int64_t scratchpad_size, const std::vector<sycl::event> &events = {}) }
This function supports the following precisions and devices:
T |
Devices supported |
---|---|
float |
GPU |
double |
GPU |
std::complex<float> |
GPU |
std::complex<double> |
GPU |
Input Parameters
- queue
-
Device queue where calculations will be performed.
- trans
-
Operation assumed to be done on input matrices Ai. Only trans = mkl::transpose::nontrans case is currently supported.
- m
-
The number of rows of the matrices Ai and Bi
- n
-
The number of columns of the matrices Ai
- nrhs
-
The number of right-hand sides: the number of columns in Bi
- a
-
Contains batch_size m-by-n matrices Ai
- lda
-
The leading dimension of Ai
- stride_a
-
The stride between the beginnings of matrices Ai inside the batch array a
- b
-
Contains the matrices Bi of right hand side vectors
- ldb
-
The leading dimensions of Bi
- stride_b
-
The stride between the beginnings of matrices Bi inside the batch array b.
- batch_size
-
The 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 than the value returned by stride version of gels_batch_scratchpad_size (Strided Version) function.
- events
-
List of events to wait for before starting computation. Defaults to empty list.
Output Parameters
- a
-
Overwritten by the factorization data as follows: contains triangular matrix R obtained on the basis of Ai used in least squares computation
- b
-
Overwritten by least squares solutions of the batch of problems
Exceptions
Exception |
Description |
---|---|
mkl::lapack::batch_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 info = -n, the n-th parameter had an illegal value. If info equals the value passed as scratchpad size, and detail() returns non-zero, then the passed scratchpad is of insufficient size, and the required size should be not less then value returned by the detail() method of the exception object. If info is zero, then Ai does not have full rank, and the solve could not be completed. The indexes of such matrices in the batch can be obtained with the ids() method of the exception object. You can obtain the indexes of the first zero diagonal elements in these matrices using the infos() method of the exception object. |
Return Values
Output event to wait on to ensure computation is complete.