-
Notifications
You must be signed in to change notification settings - Fork 98
BLAS 1::rotmg
Luc Berger edited this page Apr 23, 2024
·
1 revision
Header File: KokkosBlas1_rotmg.hpp
Usage: KokkosBlas::rotmg(space, d1, d2, x1, y1, params);
KokkosBlas::rotmg(d1, d2, x1, y1, params);
Computes the modified Givens rotation coefficients that zeroes out the second entry of vector (sqrt(d1)*x1, sqrt(d2)*y1). The flag flag=params(0)
dictates the structure of the matrix H
flag=-1.0 | flag= 0.0 | flag= 1.0 | flag=-2.0 |
---|---|---|---|
[h11 h12] | [1.0 h12] | [h11 1.0] | [1.0 0.0] |
[h21 h22] | [h21 1.0] | [-1. h12] | [0.0 1.0] |
Note that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in params
.
template <class execution_space, class DXView, class YView, class PView>
void rotmg(execution_space const& space, DXView const& d1, DXView const& d2,
DXView const& x1, YView const& y1, PView const& param)
template <class DXView, class YView, class PView>
void rotmg(DXView const& d1, DXView const& d2, DXView const& x1,
YView const& y1, PView const& param)
- execution_space: the backend that will be used to run this kernel
- DXView: the type of the input views
d1
,d2
andx1
- YView: the type of the input view
y1
- PView: the type of the params input
- space: the execution space instance passed to the Kokkos execution policy to run the kernel on
- d1: Input, first scaling factor
- d2: Input, second scaling factor
- x1: Input, first component of the vector to rotate
- y1: Input, second component of the vector to rotate
- params: the params(0) is the control flag and params(1:4) are the coefficients of the rotation matrix
H