Developer Reference for Intel® oneAPI Math Kernel Library for C
?rotm
Performs modified Givens rotation of points in the plane.
Syntax
void cblas_srotm(const MKL_INT n, float *x, const MKL_INT incx, float *y, const MKL_INT incy,
const float *param);
void cblas_drotm(const MKL_INT n, double *x, const MKL_INT incx, double *y, const MKL_INT incy,
const double *param);
Include Files
mkl.h
Description
Given two vectors \(x\) and \(y\) of length \(n\), each vector element of these vectors is replaced as follows:
\[\begin{split}\begin{bmatrix} x_i \\ y_i \end{bmatrix} = H \begin{bmatrix} x_i \\ y_i \end{bmatrix} \quad \textrm{for } i = 1, \dots, n \,,\end{split}\]
where \(H\) is a modified Givens transformation matrix whose values are specified by param. See discussion on the param input parameter.
Input Parameters
- n
-
Specifies the number of elements in vectors x and y.
- x
-
Array, size at least 1 + (n - 1) * abs(incx).
- incx
-
Specifies the increment for the elements of x.
- y
-
Array, size at least 1 + (n - 1) * abs(incy).
- incy
-
Specifies the increment for the elements of y.
- param
-
Array, size 5.
param[0] contains a switch. param[1] to param[4] 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[0], the elements of \(H\) are set as follows:
param[0] = -1.0:
\[\begin{split}H = \begin{bmatrix} h_{11} & h_{12} \\ h_{21} & h_{22} \end{bmatrix}\end{split}\]
param[0] = 0.0:
\[\begin{split}H = \begin{bmatrix} 1.0 & h_{12} \\ h_{21} & 1.0 \end{bmatrix}\end{split}\]
param[0] = 1.0:
\[\begin{split}H = \begin{bmatrix} h_{11} & 1.0 \\ -1.0 & h_{22} \end{bmatrix}\end{split}\]
param[0] = -2.0:
\[\begin{split}H = \begin{bmatrix} 1.0 & 0.0 \\ 0.0 & 1.0 \end{bmatrix}\end{split}\]
In the last three cases, the matrix entries of 1.0, -1.0, and 0.0 are assumed based on the value of param[0] 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
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.