20 const uint32_t lanes =
static_cast<uint32_t
>(g.get_local_linear_range());
23 if constexpr (internal::is_complex<T>::value) {
27 for (uint32_t offset = lanes / 2; offset > 0; offset >>= 1) {
28 re += permute_group_by_xor(g, re, offset);
29 im += permute_group_by_xor(g, im, offset);
33 for (uint32_t offset = lanes / 2; offset > 0; offset >>= 1) {
34 v += permute_group_by_xor(g, v, offset);
52 const Real xsq = x_active ? internal::abs2_if_complex(x) : Real(0);
55 const Real xnorm = sycl::sqrt(sumsq);
59 const T alpha_leader = select_from_group(part, alpha,
static_cast<uint32_t
>(alpha_lane));
61 T beta_b = alpha_leader;
65 const auto scalars = internal::larfg(alpha_leader, xnorm, len);
66 beta_b = scalars.beta;
68 scale_b = scalars.scale;
73 if (lane == alpha_lane) {
75 }
else if (x_active && tau != T(0)) {
97 for (int32_t k = n - 1; k >= 1; --k) {
99 const int32_t alpha_row = k - 1;
100 const int32_t col = k;
102 const bool in_vec = (lane < m);
103 const bool is_alpha = (lane == alpha_row);
104 const bool x_active = (lane < (m - 1));
109 const T a_val = A_local[lane + col * LDA];
117 const T taui =
larfg_small<T>(part, m, lane, alpha_row, alpha, x, x_active);
121 A_local[lane + col * LDA] = x;
125 A_local[lane + col * LDA] = alpha;
131 const T v_lane = (lane < m)
132 ? ((lane == alpha_row) ? T(1) : A_local[lane + col * LDA])
134 V_local[lane] = v_lane;
139 A_local[alpha_row + col * LDA] = T(1);
140 A_local[col + alpha_row * LDA] = T(1);
147 for (int32_t c = 0; c < m; ++c) {
148 const T a_rc = A_local[lane + c * LDA];
149 const T v_c = V_local[c];
159 const T alpha2 = T(-0.5) * taui * dot;
162 W_local[lane] = W_local[lane] + alpha2 * V_local[lane];
167 const T v_r = V_local[lane];
168 const T w_r = W_local[lane];
169 for (int32_t c = 0; c < m; ++c) {
170 const T v_c = V_local[c];
171 const T w_c = W_local[c];
172 const int32_t idx = lane + c * LDA;
179 A_local[alpha_row + col * LDA] = alpha;
The batched containers: Matrix (owning), MatrixView (non-owning), KernelMatrixView (device-side),...
T larfg_small(const Partition &part, int32_t len, int32_t lane, int32_t alpha_lane, T &alpha, T &x, bool x_active)