getrs_batch

Solves a system of linear equations with a batch of LU-factored square coefficient matrices, with multiple right-hand sides.

getrs_batch supports the following precisions.

T

float

double

std::complex<float>

std::complex<double>

Description

The routine solves for Xi the following systems of linear equations for a batch of general square matrices A1, A2, …, A:sub:`batch_size`:

Ai * Xi = Bi If trans[i] = onemkl::transpose::notrans

AiT * Xi = Bi If trans[i] = onemkl::transpose::trans

AiH * Xi = Bi If trans[i] = onemkl::transpose::conjtrans

Before calling this routine you must call getrf_batch to compute the LU factorization of A1, A2, …, A:sub:`batch_size`.

getrs_batch (BUFFER Version)

Syntax

void onemkl::lapack::getrs_batch(cl::sycl::queue &queue, std::vector<onemkl::transpose> const &trans, std::vector<std::int64_t> const &n, std::vector<std::int64_t> const &nrhs, std::vector<cl::sycl::buffer<T, 1>> &a, std::vector<std::int64_t> const &lda, std::vector<cl::sycl::buffer<std::int64_t, 1>> &ipiv, std::vector<cl::sycl::buffer<T, 1>> &b, std::vector<std::int64_t> const &ldb, std::vector<cl::sycl::buffer<std::int64_t, 1>> &info)

Input Parameters

queue

The queue where the routine should be executed.

trans

A vector, trans[i] indicates the form of the linear equations.

n

A vector, n[i] is the number of columns of the batch matrix Ai(0≤n[i]).

nrhs

A vector, the number of right hand sides (0≤nrhs[i]).

a

A vector of buffers returned by getrf_batch. a[i] must be of size at least lda[i]*max(1, n[i]).

lda

A vector, lda[i] is the leading dimension of a[i] (n[i]≤lda[i]).

ipiv

A vector of buffers, ipiv is the batch of pivots returned by getrf_batch.

b

A vector of buffers, b[i] contains the matrix Bi whose columns are the right-hand sides for the systems of equations. The second dimension of bi must be at least max(1,nrhs[i]).

ldb

A vector, ldb[i] is the leading dimension of b[i].

Output Parameters

b

A vector of buffers, b[i] is overwritten by the solution matrix Xi.

info

Vector of buffers containing error information.

If info[i]=0, the execution is successful.

If info[i]=k, the k-th diagonal element of U is zero, and the solve could not be completed.

If info[i]=-k, the k-th parameter had an illegal value.