LASWP - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
template<typename T>
void laswp(integer *n, T *a, integer *lda, integer *k1, integer *k2, integer *ipiv, integer *incx)#

Swap rows.

Purpose:

 Perform a series of row interchanges on the matrix a.
 One row interchange is initiated for each of rows k1 through k2 of A.
Parameters:
  • n[in]

    n is integer*

    The number of columns of the matrix a.

  • a[inout]

    a is float/double/COMPLEX/COMPLEX*16 array, dimension (lda,n)

    On entry, the matrix of column dimension n to which the row interchanges will be applied.

    On exit, the permuted matrix.
  • lda[in]

    lda is integer*

    The leading dimension of the array a.

  • k1[in]

    k1 is integer*

    The first element of ipiv for which a row interchange will be done.

  • k2[in]

    k2 is integer*

    (k2-k1+1) is the number of elements of ipiv for which a row interchange will be done.

  • ipiv[in]

    ipiv is integer array, dimension (k1+(k2-k1)*abs(incx))

    The vector of pivot indices. Only the elements in positions k1 through k1+(k2-k1)*abs(incx) of ipiv are accessed.

    ipiv(k1+(K-k1)*abs(incx)) = L implies rows K and L are to be interchanged.
  • incx[in]

    incx is integer*

    The increment between successive values of ipiv. If incx is negative, the pivots are applied in reverse order.