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?ormr3

Applies an orthogonal distributed matrix to a general m-by-n distributed matrix.

Syntax

void psormr3 (const char* side, const char* trans, const MKL_INT* m, const MKL_INT* n, const MKL_INT* k, const MKL_INT* l, const float* a, const MKL_INT* ia, const MKL_INT* ja, const MKL_INT* desca, const float* tau, float* c, const MKL_INT* ic, const MKL_INT* jc, const MKL_INT* descc, float* work, const MKL_INT* lwork, MKL_INT* info);

void pdormr3 (const char* side, const char* trans, const MKL_INT* m, const MKL_INT* n, const MKL_INT* k, const MKL_INT* l, const double* a, const MKL_INT* ia, const MKL_INT* ja, const MKL_INT* desca, const double* tau, double* c, const MKL_INT* ic, const MKL_INT* jc, const MKL_INT* descc, double* work, const MKL_INT* lwork, MKL_INT* info);

Include Files

  • mkl_scalapack.h

Description

p?ormr3 overwrites the general real m-by-n distributed matrix sub( C ) = C(ic:ic+m-1,jc:jc+n-1) with

 

side = 'L'

side = 'R'

trans = 'N'

Q * sub( C )

sub( C ) * Q

trans = 'T'

QT * sub( C )

Q * sub( C )

sub( C ) * QT

where Q is a real orthogonal distributed matrix defined as the product of k elementary reflectors

Q = H(1) H(2) . . . H(k)

as returned by p?tzrzf. Q is of order m if side = 'L' and of order n if side = 'R'.

Input Parameters

side

(global)

= 'L': apply Q or QT from the Left;

= 'R': apply Q or QT from the Right.

trans

(global)

= 'N': No transpose, apply Q;

= 'T': Transpose, apply QT.

m

(global)

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

n

(global)

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

k

(global)

The number of elementary reflectors whose product defines the matrix Q.

If side = 'L', m >= k >= 0,

if side = 'R', n >= k >= 0.

l

(global)

The columns of the distributed submatrix sub( A ) containing the meaningful part of the Householder reflectors.

If side = 'L', m >= l >= 0,

if side = 'R', n >= l >= 0.

a

(local)

Pointer into the local memory to an array of size lld_a*LOCc(ja+m-1) if side='L', and lld_a*LOCc(ja+n-1) if side='R', where lld_a >= MAX(1,LOCr(ia+k-1));

On entry, the i-th row must contain the vector which defines the elementary reflector H(i), ia <= i <= ia+k-1, as returned by p?tzrzf in the k rows of its distributed matrix argument A(ia:ia+k-1,ja:*).

A(ia:ia+k-1,ja:*) is modified by the routine but restored on exit.

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.

tau

(local)

Array, size LOCc(ia+k-1).

This array contains the scalar factors tau(i) of the elementary reflectors H(i) as returned by p?tzrzf. tau is tied to the distributed matrix A.

c

(local)

Pointer into the local memory to an array of size lld_c*LOCc(jc+n-1) .

On entry, the local pieces of the distributed matrix sub( C ).

ic

(global)

The row index in the global array c indicating the first row of sub( C ).

jc

(global)

The column index in the global array c indicating the first column of sub( C ).

descc

(global and local)

Array of size dlen_.

The array descriptor for the distributed matrix C.

work

(local)

Array, size (lwork)

lwork

(local)

The size of the array work.

lwork is local input and must be at least

If side = 'L', lwork >= MpC0 + MAX( MAX( 1, NqC0 ), numroc( numroc( m+IROFFC,mb_a,0,0,NPROW ),mb_a,0,0,NqC0 ) );

if side = 'R', lwork >= NqC0 + MAX( 1, MpC0 );

where LCMP = LCM / NPROW

LCM = iclm( NPROW, NPCOL ),

IROFFC = MOD( ic-1, mb_c ),

ICOFFC = MOD( jc-1, nb_c),

ICROW = indxg2p( ic, mb_c, MYROW, rsrc_c, NPROW ),

ICCOL = indxg2p( jc, nb_c, MYCOL, csrc_c, NPCOL ),

MpC0 = numroc( m+IROFFC, mb_c, MYROW, ICROW, NPROW ),

NqC0 = numroc( n+ICOFFC, nb_c, MYCOL, ICCOL, NPCOL ),

ilcm, indxg2p, and numroc are ScaLAPACK tool functions;

MYROW, MYCOL, NPROW and NPCOL can be determined by calling the subroutine blacs_gridinfo.

If lwork = -1, then lwork is global input and a workspace query is assumed; the routine only calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued by pxerbla.

Output Parameters

c

On exit, sub( C ) is overwritten by Q*sub( C ) or Q'*sub( C ) or sub( C )*Q' or sub( C )*Q.

work

On exit, work[0] returns the minimal and optimal lwork.

info

(local)

= 0: successful exit

< 0: If the i-th argument is an array and the j-th entry had an illegal value, then info = -(i*100+j), if the i-th argument is a scalar and had an illegal value, then info = -i.

Application Notes

Alignment requirements

The distributed submatrices A(ia:*, ja:*) and C(ic:ic+m-1,jc:jc+n-1) must verify some alignment properties, namely the following expressions should be true:

If side = 'L',

( nb_a = mb_c .AND. ICOFFA = IROFFC )

If side = 'R',

( nb_a = nb_c .AND. ICOFFA = ICOFFC .AND. IACOL = ICCOL )