rotm

Performs modified Givens rotation of points in the plane.

Description

Given two vectors x and y, each vector element of these vectors is replaced as follows:

\left[
   \begin{array}{ccc}
   x_i \\ y_i
   \end{array}
\right] =
H
\left[
   \begin{array}{ccc}
   x_i \\ y_i
   \end{array}
\right]

for i from 1 to n, where H is a modified Givens transformation matrix.

API

Syntax

namespace oneapi::mkl::blas::column_major {
    void rotm(sycl::queue &queue,
              std::int64_t n,
              sycl::buffer<T,1> &x,
              std::int64_t incx,
              sycl::buffer<T,1> &y,
              std::int64_t incy,
              sycl::buffer<T,1> &param)
}
namespace oneapi::mkl::blas::row_major {
    void rotm(sycl::queue &queue,
              std::int64_t n,
              sycl::buffer<T,1> &x,
              std::int64_t incx,
              sycl::buffer<T,1> &y,
              std::int64_t incy,
              sycl::buffer<T,1> &param)
}

rotm supports the following precisions and devices.

T

Devices Supported

float

Host, CPU, and GPU

double

Host, CPU, and GPU

Input Parameters

exec_queue

The queue where the routine should be executed.

n

Number of elements in vector x.

x

Buffer holding input vector x. The buffer must be of size at least (1 + (n - 1)*abs(incx)). See Matrix Storage for more details.

incx

Stride of vector x.

y

Buffer holding input vector x. The buffer must be of size at least (1 + (n - 1)*abs(incy)). See :ref:`matrix-storage for more details.

incy

Stride of vector y.

param

Buffer holding an array of size 5. The elements of the param array are:

param[0] contains a switch, flag,

param[1-4] contain h11,h21, h12,h22 respectively, the components ofthe modified Givens transformation matrix H.

Depending on the values of flag, thecomponents of H are set as follows:

flag = -1.0:

H = \left[
\begin{array}{ccc}
h_{11} & h_{12} \\
h_{21} & h_{22}
\end{array}
\right]

flag = 0.0:

H = \left[
\begin{array}{ccc}
1.0 & h_{12} \\
h_{21} & 1.0
\end{array}
\right]

flag = 1.0:

H = \left[
\begin{array}{ccc}
h_{11} & 1.0 \\
-1.0 & h_{22}
\end{array}
\right]

flag = -2.0:

H = \left[
\begin{array}{ccc}
1.0 & 0.0 \\
0.0 & 1.0
\end{array}
\right]

In the last three cases, the matrix entries of 1.0, -1.0, 0.0 are assumed based on the value of flag and are not required to be set in the param vector.

Output Parameters

x

Buffer holding updated buffer x.

y

Buffer holding updated buffer y.