Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
?rotm
Performs modified Givens rotation of points in the plane.
Syntax
call srotm(n, x, incx, y, incy, param)
call drotm(n, x, incx, y, incy, param)
call rotm(x, y, param)
Include Files
mkl.fi, mkl_blas.f90
Description
Given two vectors \(x\) and \(y\) of length \(n\), each vector element of these vectors is replaced as follows:
\[\begin{bmatrix} x_i \\ y_i \end{bmatrix} = H \begin{bmatrix} x_i \\ y_i \end{bmatrix} \quad \textrm{for } i = 1, \dots, n \,, \]
where \(H\) is a modified Givens transformation matrix whose values are specified by param. See discussion on the param input parameter.
Input Parameters
- n
-
INTEGER. Specifies the number of elements in vectors x and y.
- x
-
REAL array for srotm
DOUBLE PRECISION array for drotm
The size is at least 1 + (n - 1) * abs(incx).
- incx
-
INTEGER. Specifies the increment for the elements of x.
- y
-
REAL array for srotm
DOUBLE PRECISION array for drotm
The size is at least 1 + (n - 1) * abs(incy).
- incy
-
INTEGER. Specifies the increment for the elements of y.
- param
-
REAL array for srotm
DOUBLE PRECISION array for drotm
The size is 5.
param(1) contains a switch. param(2) to param(5) may be used to set the elements of the matrix \(H\), \(h_{11}\), \(h_{21}\), \(h_{12}\), and \(h_{22}\), respectively. Depending on the value of param(1), the elements of \(H\) are set as follows:
param(1) = -1.0:
\[H = \begin{bmatrix} h_{11} & h_{12} \\ h_{21} & h_{22} \end{bmatrix} \]
param(1) = 0.0:
\[H = \begin{bmatrix} 1.0 & h_{12} \\ h_{21} & 1.0 \end{bmatrix} \]
param(1) = 1.0:
\[H = \begin{bmatrix} h_{11} & 1.0 \\ -1.0 & h_{22} \end{bmatrix} \]
param(1) = -2.0:
\[H = \begin{bmatrix} 1.0 & 0.0 \\ 0.0 & 1.0 \end{bmatrix} \]
In the last three cases, the matrix entries of 1.0, -1.0, and 0.0 are assumed based on the value of param(1) and are not required to be set in param.
Output Parameters
- x
-
Each element x(i) is replaced by \(h_{11} \cdot {}\)x(i)\({} + h_{12} \cdot {}\)y(i).
- y
-
Each element y(i) is replaced by \(h_{21} \cdot {}\)x(i)\({} + h_{22} \cdot {}\)y(i).
BLAS 95 Interface Notes
Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see BLAS 95 Interface Conventions.
Specific details for the routine rotm interface are the following:
- x
-
Holds the vector with the number of elements n.
- y
-
Holds the vector with the number of elements n.