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]](../../_images/math/172b7ce934be5cfb5aecc5f4084ef4eb2a3e693a.png)
for i from 1 to n, where H is a modified Givens transformation matrix.
rotm supports the following precisions:
T |
|---|
|
|
rotm (Buffer Version)¶
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> ¶m)
}
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> ¶m)
}
Input Parameters¶
- queue
The queue where the routine should be executed.
- n
Number of elements in vector
x.- x
Buffer holding input vector
x. Size of the buffer must be at least (1 + (n- 1)*abs(incx)). See Matrix Storage for more details.- incx
Stride of vector
x.- y
Buffer holding input vector
y. Size of the buffer must be 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
paramarray are:param[0]contains a switch,flag. The other array elementsparam[1-4]contain the components of the modified Givens transformation matrixH: h11, h21, h12, and h22, respectively.Depending on the values of
flag, the components ofHare set as follows:flag = -1.0:![H = \left[
\begin{array}{ccc}
h_{11} & h_{12} \\
h_{21} & h_{22}
\end{array}
\right]](../../_images/math/8df50b9712ee416b7838117fee834ca8d69806a6.png)
flag = 0.0:![H = \left[
\begin{array}{ccc}
1.0 & h_{12} \\
h_{21} & 1.0
\end{array}
\right]](../../_images/math/29fdfe893bf89408baa4e9af130dd6da47cdc5ac.png)
flag = 1.0:![H = \left[
\begin{array}{ccc}
h_{11} & 1.0 \\
-1.0 & h_{22}
\end{array}
\right]](../../_images/math/e58caaaf89030c3a633ab12bd71c5b05a4e2406e.png)
flag = -2.0:![H = \left[
\begin{array}{ccc}
1.0 & 0.0 \\
0.0 & 1.0
\end{array}
\right]](../../_images/math/e7b9eb5ee7a56f6631e0fb0f142b6adc60cdfd0b.png)
In the last three cases, the matrix entries of 1.0, -1.0, 0.0 are assumed based on the value of
flagand are not required to be set in theparamvector.
Output Parameters¶
- x
Buffer holding updated buffer
x.- y
Buffer holding updated buffer
y.
rotm (USM Version)¶
Syntax¶
namespace oneapi::mkl::blas::column_major {
sycl::event rotm(sycl::queue &queue,
std::int64_t n,
T *x,
std::int64_t incx,
T *y,
std::int64_t incy,
T *param,
const std::vector<sycl::event> &dependencies = {})
}
namespace oneapi::mkl::blas::row_major {
sycl::event rotm(sycl::queue &queue,
std::int64_t n,
T *x,
std::int64_t incx,
T *y,
std::int64_t incy,
T *param,
const std::vector<sycl::event> &dependencies = {})
}
Input Parameters¶
- queue
The queue where the routine should be executed.
- n
Number of elements in vector
x.- x
Pointer to the input vector
x. Size of the array holding vectorxmust be at least (1 + (n- 1)*abs(incx)). See Matrix Storage for more details.- incx
Stride of vector
x.- yparam
Pointer to the input vector
y. Size of the array holding vectorymust be at least (1 + (n- 1)*abs(incy)). See Matrix Storage for more details.- incy
Stride of vector
y.- param
Pointer to an array of size 5. The elements of the
paramarray are:param[0]contains a switch,flag. The other array elementsparam[1-4]contain the components of the modified Givens transformation matrixH: h11, h21, h12, and h22, respectively.Depending on the values of
flag, the components ofHare set as follows:flag = -1.0:![H = \left[
\begin{array}{ccc}
h_{11} & h_{12} \\
h_{21} & h_{22}
\end{array}
\right]](../../_images/math/7b2b20fb1084d3516ea065ac8bb5c9e2230aa45d.png)
flag = 0.0:![H = \left[
\begin{array}{ccc}
1.0 & h_{12} \\
h_{21} & 1.0
\end{array}
\right]](../../_images/math/29fdfe893bf89408baa4e9af130dd6da47cdc5ac.png)
flag = 1.0:![H = \left[
\begin{array}{ccc}
h_{11} & 1.0 \\
-1.0 & h_{22}
\end{array}
\right]](../../_images/math/e58caaaf89030c3a633ab12bd71c5b05a4e2406e.png)
flag = -2.0:![H = \left[
\begin{array}{ccc}
1.0 & 0.0 \\
0.0 & 1.0
\end{array}
\right]](../../_images/math/e7b9eb5ee7a56f6631e0fb0f142b6adc60cdfd0b.png)
In the last three cases, the matrix entries of 1.0, -1.0, 0.0 are assumed based on the value of
flagand are not required to be set in theparamvector.- dependencies
List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
Output Parameters¶
- x
Pointer to updated array
x.- y
Pointer to updated array
y.
Return Values¶
Output event to wait on to ensure computation is complete.