Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

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

Document Table of Contents

p?lapv2

Applies a permutation to an m-by-n distributed matrix.

Syntax

void pslapv2 (const char* direc, const char* rowcol, const MKL_INT* m, const MKL_INT* n, float* a, const MKL_INT* ia, const MKL_INT* ja, const MKL_INT* desca, const MKL_INT* ipiv, const MKL_INT* ip, const MKL_INT* jp, const MKL_INT* descip);

void pdlapv2 (const char* direc, const char* rowcol, const MKL_INT* m, const MKL_INT* n, double* a, const MKL_INT* ia, const MKL_INT* ja, const MKL_INT* desca, const MKL_INT* ipiv, const MKL_INT* ip, const MKL_INT* jp, const MKL_INT* descip);

void pclapv2 (const char* direc, const char* rowcol, const MKL_INT* m, const MKL_INT* n, MKL_Complex8* a, const MKL_INT* ia, const MKL_INT* ja, const MKL_INT* desca, const MKL_INT* ipiv, const MKL_INT* ip, const MKL_INT* jp, const MKL_INT* descip);

void pzlapv2 (const char* direc, const char* rowcol, const MKL_INT* m, const MKL_INT* n, MKL_Complex16* a, const MKL_INT* ia, const MKL_INT* ja, const MKL_INT* desca, const MKL_INT* ipiv, const MKL_INT* ip, const MKL_INT* jp, const MKL_INT* descip);

Include Files

  • mkl_scalapack.h

Description

p?lapv2 applies either P (permutation matrix indicated by ipiv) or inv( P ) to an m-by-n distributed matrix sub( A ) denoting A(ia:ia+m-1,ja:ja+n-1), resulting in row or column pivoting. The pivot vector should be aligned with the distributed matrix A. For pivoting the rows of sub( A ), ipiv should be distributed along a process column and replicated over all process rows. Similarly, ipiv should be distributed along a process row and replicated over all process columns for column pivoting.

Input Parameters

direc

(global)

Specifies in which order the permutation is applied:

= 'F' (Forward) Applies pivots Forward from top of matrix. Computes P * sub( A );

= 'B' (Backward) Applies pivots Backward from bottom of matrix. Computes inv( P ) * sub( A ).

rowcol

(global)

Specifies if the rows or columns are to be permuted:

= 'R' Rows will be permuted,

= 'C' Columns will be permuted.

m

(global)

The number of rows to be operated on, i.e. the number of rows of the distributed submatrix sub( A ). m >= 0.

n

(global)

The number of columns to be operated on, i.e. the number of columns of the distributed submatrix sub( A ). n >= 0.

a

Pointer into local memory to an array of size lld_a*LOCc(ja+n-1) .

On entry, this local array contains the local pieces of the distributed matrix sub( A ) to which the row or columns interchanges will be applied.

ia

(global)

The row index in the global array a indicating the first row of sub( A ).

ja

(global)

The column index in the global array a indicating the first column of sub( A ).

desca

(global and local)

Array of size dlen_.

The array descriptor for the distributed matrix A.

ipiv

Array, size >= LOCr(m_a)+mb_a if rowcol = 'R', LOCc(n_a)+nb_a otherwise.

It contains the pivoting information. ipiv[i - 1] is the global row (column), local row (column) i was swapped with. The last piece of the array of size mb_a or nb_a is used as workspace. ipiv is tied to the distributed matrix A.

ip

(global)

The global row index of ipiv, which points to the beginning of the submatrix on which to operate.

jp

(global)

The global column index of ipiv, which points to the beginning of the submatrix on which to operate.

descip

(global and local)

Array of size 8.

The array descriptor for the distributed matrix ipiv.

Output Parameters

a

On exit, this array contains the local pieces of the permuted distributed matrix.