laswp#

Functions

void slaswp(
    const INT           n,
          f32* restrict A,
    const INT           lda,
    const INT           k1,
    const INT           k2,
    const INT* restrict ipiv,
    const INT           incx
);
void slaswp(const INT n, f32 *restrict A, const INT lda, const INT k1, const INT k2, const INT *restrict ipiv, const INT incx)#

Performs a series of row interchanges on a general rectangular matrix.

Interchanges row i with row ipiv[k1 + (i - k1) * |incx|] for each of rows k1 through k2 of A.

Note

This function is typically called after sgetrf() or sgetrf2() to apply the same row permutations to other matrices (e.g., the right-hand side matrix B when solving Ax = B).

The implementation processes columns in blocks of 32 for cache efficiency.

Parameters

in
n

The number of columns of the matrix A.

inout
A

On entry, the M-by-N matrix to which the row interchanges will be applied. On exit, the permuted matrix.

in
lda

The leading dimension of the array A (lda >= max(1,m)).

in
k1

The first row of A to which a row interchange will be applied (0-based).

in
k2

The last row of A to which a row interchange will be applied (0-based, k2 >= k1).

in
ipiv

The vector of pivot indices. Row i is interchanged with row ipiv[k1 + (i - k1) * |incx|]. Indices are 0-based.

in
incx

The increment between successive values of ipiv. If incx > 0, pivots are applied from k1 to k2. If incx < 0, pivots are applied from k2 to k1. If incx = 0, returns immediately.

Functions

void dlaswp(
    const INT           n,
          f64* restrict A,
    const INT           lda,
    const INT           k1,
    const INT           k2,
    const INT* restrict ipiv,
    const INT           incx
);
void dlaswp(const INT n, f64 *restrict A, const INT lda, const INT k1, const INT k2, const INT *restrict ipiv, const INT incx)#

Performs a series of row interchanges on a general rectangular matrix.

Interchanges row i with row ipiv[k1 + (i - k1) * |incx|] for each of rows k1 through k2 of A.

Note

This function is typically called after dgetrf() or dgetrf2() to apply the same row permutations to other matrices (e.g., the right-hand side matrix B when solving Ax = B).

The implementation processes columns in blocks of 32 for cache efficiency.

Parameters

in
n

The number of columns of the matrix A.

inout
A

On entry, the M-by-N matrix to which the row interchanges will be applied. On exit, the permuted matrix.

in
lda

The leading dimension of the array A (lda >= max(1,m)).

in
k1

The first row of A to which a row interchange will be applied (0-based).

in
k2

The last row of A to which a row interchange will be applied (0-based, k2 >= k1).

in
ipiv

The vector of pivot indices. Row i is interchanged with row ipiv[k1 + (i - k1) * |incx|]. Indices are 0-based.

in
incx

The increment between successive values of ipiv. If incx > 0, pivots are applied from k1 to k2. If incx < 0, pivots are applied from k2 to k1. If incx = 0, returns immediately.

Functions

void claswp(
    const INT           n,
          c64* restrict A,
    const INT           lda,
    const INT           k1,
    const INT           k2,
    const INT* restrict ipiv,
    const INT           incx
);
void claswp(const INT n, c64 *restrict A, const INT lda, const INT k1, const INT k2, const INT *restrict ipiv, const INT incx)#

Performs a series of row interchanges on a general rectangular matrix.

Interchanges row i with row ipiv[k1 + (i - k1) * |incx|] for each of rows k1 through k2 of A.

Note

This function is typically called after cgetrf() or cgetrf2() to apply the same row permutations to other matrices (e.g., the right-hand side matrix B when solving Ax = B).

The implementation processes columns in blocks of 32 for cache efficiency.

Parameters

in
n

The number of columns of the matrix A.

inout
A

On entry, the M-by-N matrix to which the row interchanges will be applied. On exit, the permuted matrix.

in
lda

The leading dimension of the array A (lda >= max(1,m)).

in
k1

The first row of A to which a row interchange will be applied (0-based).

in
k2

The last row of A to which a row interchange will be applied (0-based, k2 >= k1).

in
ipiv

The vector of pivot indices. Row i is interchanged with row ipiv[k1 + (i - k1) * |incx|]. Indices are 0-based.

in
incx

The increment between successive values of ipiv. If incx > 0, pivots are applied from k1 to k2. If incx < 0, pivots are applied from k2 to k1. If incx = 0, returns immediately.

Functions

void zlaswp(
    const INT            n,
          c128* restrict A,
    const INT            lda,
    const INT            k1,
    const INT            k2,
    const INT*  restrict ipiv,
    const INT            incx
);
void zlaswp(const INT n, c128 *restrict A, const INT lda, const INT k1, const INT k2, const INT *restrict ipiv, const INT incx)#

Performs a series of row interchanges on a general rectangular matrix.

Interchanges row i with row ipiv[k1 + (i - k1) * |incx|] for each of rows k1 through k2 of A.

Note

This function is typically called after zgetrf() or zgetrf2() to apply the same row permutations to other matrices (e.g., the right-hand side matrix B when solving Ax = B).

The implementation processes columns in blocks of 32 for cache efficiency.

Parameters

in
n

The number of columns of the matrix A.

inout
A

On entry, the M-by-N matrix to which the row interchanges will be applied. On exit, the permuted matrix.

in
lda

The leading dimension of the array A (lda >= max(1,m)).

in
k1

The first row of A to which a row interchange will be applied (0-based).

in
k2

The last row of A to which a row interchange will be applied (0-based, k2 >= k1).

in
ipiv

The vector of pivot indices. Row i is interchanged with row ipiv[k1 + (i - k1) * |incx|]. Indices are 0-based.

in
incx

The increment between successive values of ipiv. If incx > 0, pivots are applied from k1 to k2. If incx < 0, pivots are applied from k2 to k1. If incx = 0, returns immediately.