Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

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

Document Table of Contents

?laror

Pre- or post-multiplies an m-by-n matrix by a random orthogonal/unitary matrix.

Syntax

void slaror (char *side, char *init, lapack_int *m, lapack_int *n, float *a, lapack_int *lda, lapack_int *iseed, float *x, lapack_int *info);

void dlaror (char *side, char *init, lapack_int *m, lapack_int *n, double *a, lapack_int *lda, lapack_int *iseed, double *x, lapack_int *info);

void claror (char *side, char *init, lapack_int *m, lapack_int *n, lapack_complex *a, lapack_int *lda, lapack_int *iseed, lapack_complex *x, lapack_int *info);

void zlaror (char *side, char *init, lapack_int *m, lapack_int *n, lapack_complex_double *a, lapack_int *lda, lapack_int *iseed, lapack_complex_double *x, lapack_int *info);

Include Files

  • mkl.h

Description

The routine ?laror pre- or post-multiplies an m-by-n matrix A by a random orthogonal or unitary matrix U, overwriting A. A may optionally be initialized to the identity matrix before multiplying by U. U is generated using the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409).

Input Parameters

side

Specifies whether A is multiplied by U on the left or right.

for slaror and dlaror:

If side = 'L', multiply A on the left (premultiply) by U.

If side = 'R', multiply A on the right (postmultiply) by UT.

If side = 'C' or 'T', multiply A on the left by U and the right by UT.

for claror and zlaror:

If side = 'L', multiply A on the left (premultiply) by U.

If side = 'R', multiply A on the right (postmultiply) by UC>.

If side = 'C', multiply A on the left by U and the right by UC>

Ifside = 'T', multiply A on the left by U and the right by UT.

init

Specifies whether or not a should be initialized to the identity matrix.

If init = 'I', initialize a to (a section of) the identity matrix before applying U.

If init = 'N', no initialization. Apply U to the input matrix A.

init = 'I' generates square or rectangular orthogonal matrices:

For m = n and side = 'L' or 'R', the rows and the columns are orthogonal to each other.

For rectangular matrices where m < n:

  • If side = 'R', ?laror produces a dense matrix in which rows are orthogonal and columns are not.

  • If side= 'L', ?laror produces a matrix in which rows are orthogonal, first m columns are orthogonal, and remaining columns are zero.

For rectangular matrices where m > n:

  • If side = 'L', ?laror produces a dense matrix in which columns are orthogonal and rows are not.

  • If side = 'R', ?laror produces a matrix in which columns are orthogonal, first m rows are orthogonal, and remaining rows are zero.

m

The number of rows of A.

n

The number of columns of A.

a

Array, size lda by n.

lda

The leading dimension of the array a.

lda max(1, m).

iseed

Array, size (4).

On entry, specifies the seed of the random number generator. The array elements must be between 0 and 4095; if not they are reduced mod 4096. Also, iseed[3] must be odd.

x

Workspace array, size (3*max( m, n )) .

Value of side Length of workspace
'L' 2*m + n
'R' 2*n + m
'C' or 'T' 3*n

Output Parameters

a

On exit, overwritten

by UA ( if side = 'L' ),

by AU ( if side = 'R' ),

by UAUT ( if side = 'C' or 'T').

iseed

The values of iseed are changed on exit, and can be used in the next call to continue the same random number sequence.

info

Array, size (4).

For slaror and dlaror:

If info = 0, the execution is successful.

If info < 0, the i -th parameter had an illegal value.

If info = 1, the random numbers generated by ?laror are bad.

For claror and zlaror:

If info = 0, the execution is successful.

If info = -1, side is not 'L', 'R', 'C', or 'T'.

If info = -3, if m is negative.

If info = -4, if m is negative or if side is 'C' or 'T' and n is not equal to m .

If info = -6, if lda is less than m .