Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?getrs_batch_strided

Solves a group of systems of linear equations, each with an LU-factored square coefficient matrix and multiple right hand sides.

Syntax

call sgetrs_batch_strided(trans, n, nrhs, A, lda, stride_a, ipiv, stride_ipiv, b, ldb, stride_b, batch_size, info)

call dgetrs_batch_strided(trans, n, nrhs, A, lda, stride_a, ipiv, stride_ipiv, b, ldb, stride_b, batch_size, info)

call cgetrs_batch_strided(trans, n, nrhs, A, lda, stride_a, ipiv, stride_ipiv, b, ldb, stride_b, batch_size, info)

call zgetrs_batch_strided(trans, n, nrhs, A, lda, stride_a, ipiv, stride_ipiv, b, ldb, stride_b, batch_size, info)

Include Files

mkl.fi

Description

The ?getrs_batch_strided routines are similar to the ?getrs counterparts, but instead solve a group of systems of linear equations. Before calling this routine, you must call ?getrf_batch_strided to compute the LU factorization of the square coefficient matrix of each linear system.

All coefficient matrices, Ai have the same parameters (matrix size, leading dimension) and are stored at constant stride_a from each other. Similarly, all right-hand-side matrices, Bi, have the same parameters and are stored at constant stride_b from each other. The respective pivot array associated with each of the LU-factored Ai matrices are stored at constant stride_ipiv from each other. The operation is defined as

for i = 0 … batch_size-1
    Ai, Bi are matrices at offset i * stride_a, i * stride_b from A and B
    ipivi is an array at offset i * stride_ipiv from ipiv 
    Solve the system
	Ai * Xi = Bi  , if trans=’N’
	 * Xi = Bi  , if trans=’T’
	 * Xi = Bi , if trans=’C’ (for complex matrices)
end for


Input Parameters
trans

CHARACTER*1. Must be 'N', 'T', or 'C'.

Indicates the form of the systems of linear equations:

If trans = 'N', Ai * Xi = Bi is solved for Xi.

If trans = 'T', * Xi = Bi is solved for Xi.

If trans = 'C', * Xi = Bi is solved for Xi.

n

INTEGER. The order fo the Ai matrices; n ≥ 0.

nrhs

INTEGER. The number of right hand sides in each linear system of equations (nrhs ≥ 0).

A, B

REAL for sgetrs_batch_strided

DOUBLE PRECISION for dgetrs_batch_strided

COMPLEX for cgetrs_batch_strided

DOUBLE COMPLEX for zgetrs_batch_strided

The A array of size at least stride_a * batch_size holding the LU-factorized Ai matrices resulting from the call to ?getrf_batch_strided.

The B array of size at least stride_b * batch_size holding the Bi matrices, whose columns are the right -hand sides for each linear system of equations.

lda

INTEGER. Specifies the leading dimension of the Ai matrices; lda ≥ max(1,n).

ldb

INTEGER. Specifies the leading dimension of the Bi matrices; ldb ≥ max(1,n).

stride_a

INTEGER.

Stride between two consecutive Ai matrices; stride_alda * n.

stride_b

INTEGER.

Stride between two consecutive Bi matrices; stride_bldb * nrhs.

ipiv

INTEGER.

Array of size at least stride_ipiv * batch_size holding the pivoting indices for each LU-factorized matrix Ai.

stride_ipiv

INTEGER.

Stride between two consecutive pivot arrays; stride_ipivn).

batch_size

INTEGER.

Number of linear systems to be solved; batch_size ≥ 0.

Output Parameters
B

Array is overwritten by the solution matrices Xi.

info

INTEGER.

Array of size at least batch_size, which reports the status for each linear system solve.

If info(i) = 0, the execution is successful for Ai.

If info(i) = -j, the j-th parameter had an illegal value for Ai.