gels_batch (Buffer 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,
sycl::buffer<T> &a,
std::int64_t lda,
std::int64_t stride_a,
sycl::buffer<T> &b,
std::int64_t ldb,
std::int64_t stride_b,
std::int64_t batch_size,
sycl::buffer<T> &scratchpad,
std::int64_t scratchpad_size)
}
This function supports the following precisions and devices:
T |
Devices supported |
---|---|
|
GPU |
|
GPU |
|
GPU |
|
GPU |
Input Parameters¶
- queue
Device queue where calculations will be performed.
- trans
Operation assumed to be done on input matrices
A
i. Onlytrans = mkl::transpose::nontrans
case is currently supported.- m
The number of rows of the matrices
A
i andB
i (m ≥ 0
).- n
The number of columns of the matrices
A
i (n ≥ 0
).- nrhs
The number of right-hand sides: the number of columns in
B
i (nrhs ≥ 0
).- a
Contains batch_size m-by-n matrices
A
i- lda
The leading dimension of
A
i (lda
≥max(1,m)
).- stride_a
The stride between the beginnings of matrices
A
i inside the batch arraya
(stride_a
≥max(1, lda * n)
).- b
Contains the matrices
B
i of right hand side vectors- ldb
The leading dimensions of
B
i (ldb
≥max(1,max(m,n))
).- stride_b
The stride between the beginnings of matrices
B
i inside the batch arrayb
(stride_b
≥max(1, ldb * nrhs)
).- batch_size
The number of problems in a batch (
batch_size
≥ 0).- 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.
Output Parameters¶
- a
Overwritten by the factorization data as follows: contains triangular matrix R obtained on the basis of
A
i used in least squares computation- b
Overwritten by least squares solutions of the batch of problems
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 If |