Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/31/2023
Public

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

Document Table of Contents

p?rot

Applies a planar rotation to two distributed vectors.

Syntax

void psrot(MKL_INT* n, float* x, MKL_INT* ix, MKL_INT* jx, MKL_INT* descx, MKL_INT* incx, float* y, MKL_INT* iy, MKL_INT* jy, MKL_INT* descy, MKL_INT* incy, float* cs, float* sn, float* work, MKL_INT* lwork, MKL_INT* info);

void pdrot(MKL_INT* n, double* x, MKL_INT* ix, MKL_INT* jx, MKL_INT* descx, MKL_INT* incx, double* y, MKL_INT* iy, MKL_INT* jy, MKL_INT* descy, MKL_INT* incy, double* cs, double* sn, double* work, MKL_INT* lwork, MKL_INT* info);

Include Files
  • mkl_scalapack.h
Description

p?rot applies a planar rotation defined by cs and sn to the two distributed vectors sub(x) and sub(y).

Input Parameters
n

(global )

The number of elements to operate on when applying the planar rotation to x and y (n0).

x

(local) array of size ( (jx-1)*m_x + ix + ( n - 1 )*abs( incx ) )

This array contains the entries of the distributed vector sub( x ).

ix

(global )

The global row index of the submatrix of the distributed matrix x to operate on. If incx = 1, then it is required that ix = iy. 1 ixm_x.

jx

(global )

The global column index of the submatrix of the distributed matrix x to operate on. If incx = m_x, then it is required that jx = jy. 1 ixn_x.

descx

(global and local) array of size 9

The array descriptor of the distributed matrix x.

incx

(global )

The global increment for the elements of x. Only two values of incx are supported in this version, namely 1 and m_x. Moreover, it must hold that incx = m_x if incy =m_y and that incx = 1 if incy = 1.

y

(local) array of size ( (jy-1)*m_y + iy + ( n - 1 )*abs( incy ) )

This array contains the entries of the distributed vector sub( y ).

iy

(global )

The global row index of the submatrix of the distributed matrix y to operate on. If incy = 1, then it is required that iy = ix. 1 iym_y.

jy

(global )

The global column index of the submatrix of the distributed matrix y to operate on. If incy = m_x, then it is required that jy = jx. 1 jym_y.

descy

(global and local) array of size 9

The array descriptor of the distributed matrix y.

incy

(global )

The global increment for the elements of y. Only two values of incy are supported in this version, namely 1 and m_y. Moreover, it must hold that incy = m_y if incx = m_x and that incy = 1 if incx = 1.

cs, sn

(global)

The parameters defining the properties of the planar rotation. It must hold that 0 cs,sn 1 and that sn2 + cs2 = 1. The latter is hardly checked in finite precision arithmetics.

work

(local workspace) array of size lwork

lwork

(local )

The length of the workspace array work.

If incx = 1 and incy = 1, then lwork = 2*m_x

If lwork = -1, then a workspace query is assumed; the function only calculates the optimal size of the work array, returns this value as the first entry of the IWORK array, and no error message related to LIWORK is issued by pxerbla.

OUTPUT Parameters
x
y
work[0]

On exit, if info = 0, work[0] returns the optimal lwork

info

(global )

= 0: successful exit

< 0: if info = -i, the i-th argument had an illegal value.

If the i-th argument is an array and the j-th entry, indexed j-1, 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.

See Also