rotmg
Computes the parameters for a modified Givens rotation.
Description
Given Cartesian coordinates (
x1
, y1
) of an
input vector, the rotmg
routines compute the components of a modified
Givens transformation matrix H
that zeros the y
-component of
the resulting vector:
rotmg
supports the following precisions:T |
---|
float |
double |
rotmg (Buffer Version)
Syntax
namespace oneapi::mkl::blas::column_major {
void rotmg(sycl::queue &queue,
sycl::buffer<T,1> &d1,
sycl::buffer<T,1> &d2,
sycl::buffer<T,1> &x1,
sycl::buffer<T,1> &y1,
sycl::buffer<T,1> ¶m)
}
namespace oneapi::mkl::blas::row_major {
void rotmg(sycl::queue &queue,
sycl::buffer<T,1> &d1,
sycl::buffer<T,1> &d2,
sycl::buffer<T,1> &x1,
sycl::buffer<T,1> &y1,
sycl::buffer<T,1> ¶m)
}
Input Parameters
- queue
- The queue where the routine should be executed.
- d1
- Buffer holding the scaling factor forx-coordinate of the input vector.
- d2
- Buffer holding the scaling factor fory-coordinate of the input vector.
- x1
- Buffer holdingx-coordinate of the input vector.
- y1
- Scalar specifyingy-coordinate of the input vector.
Output Parameters
- d1
- Buffer holding the first diagonal element of the updated matrix.
- d2
- Buffer holding the second diagonal element of the updated matrix.
- x1
- Buffer holdingx-coordinate of the rotated vector before scaling
- param
- Buffer holding an array of size 5.The elements of theparamarray are:param[0]contains a switch,flag. The other array elementsparam[1-4]contain the components of the arrayH: h11, h21, h12, and h22, respectively.Depending on the values offlag, the components ofHare set as follows:flag = -1.0:flag = 0.0:flag = 1.0:flag = -2.0:In the last three cases, the matrix entries of 1.0, -1.0, and 0.0 are assumed based on the value offlagand are not required to be set in theparamvector.
rotmg (USM Version)
Syntax
namespace oneapi::mkl::blas::column_major {
sycl::event rotmg(sycl::queue &queue,
T *d1,
T *d2,
T *x1,
T *y1,
T *param,
const std::vector<sycl::event> &dependencies = {})
}
namespace oneapi::mkl::blas::row_major {
sycl::event rotmg(sycl::queue &queue,
T *d1,
T *d2,
T *x1,
T *y1,
T *param,
const std::vector<sycl::event> &dependencies = {})
}
Input Parameters
- queue
- The queue where the routine should be executed.
- d1
- Pointer to the scaling factor forx-coordinate of the input vector.
- d2
- Pointer to the scaling factor fory-coordinate of the input vector.
- x1
- Pointer tox-coordinate of the input vector.
- y1
- Scalar specifyingy-coordinate of the input vector.
- dependencies
- List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
Output Parameters
- d1
- Pointer to the first diagonal element of the updated matrix.
- d2
- Pointer to the second diagonal element of the updated matrix.
- x1
- Pointer tox-coordinate of the rotated vector before scaling
- param
- Pointer to an array of size 5.The elements of theparamarray are:param[0]contains a switch,flag. The other array elementsparam[1-4]contain the components of the arrayH: h11, h21, h12, and h22, respectively.Depending on the values offlag, the components ofHare set as follows:flag = -1.0:flag = 0.0:flag = 1.0:flag = -2.0:In the last three cases, the matrix entries of 1.0, -1.0, and 0.0 are assumed based on the value offlagand are not required to be set in theparamvector.
Return Values
Output event to wait on to ensure computation is complete.