Computes the parameters for a modified Givens rotation.
event rotmg(queue &exec_queue, T *d1, T *d2, T *x1, T *y1, T *param, const vector_class<event> &dependencies = {});
The USM version of rotmg supports the following precisions and devices.
T | Devices Supported |
---|---|
float | Host, CPU, and GPU |
double | Host, CPU, and GPU |
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:
The queue where the routine should be executed.
Pointer to the scaling factor for the x-coordinate of the input vector.
Pointer to the scaling factor for the y-coordinate of the input vector.
Pointer to the x-coordinate of the input vector.
Scalar specifying the y-coordinate of the input vector.
List of events to wait for before starting computation, if any. If omitted, defaults to no dependencies.
Pointer to the first diagonal element of the updated matrix.
Pointer to the second diagonal element of the updated matrix.
Pointer to the x-coordinate of the rotated vector before scaling
Pointer to an array of size 5.
The elements of the param array are:
param[0] contains a switch, flag. The other array elements param[1-4] contain the components of the array H: h11, h21, h12, and h22, respectively.
Depending on the values of flag, the components of H are 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 of flag and are not required to be set in the param vector.
Output event to wait on to ensure computation is complete.