libflame  revision_anchor
Functions
FLA_Apply_H2_UT_l.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Apply_H2_UT_l_unb_var1 (FLA_Obj tau, FLA_Obj u2, FLA_Obj a1t, FLA_Obj A2)
 
FLA_Error FLA_Apply_H2_UT_l_opt_var1 (FLA_Obj tau, FLA_Obj u2, FLA_Obj a1t, FLA_Obj A2)
 
FLA_Error FLA_Apply_H2_UT_l_ops_var1 (int m_u2_A2, int n_a1t, float *tau, float *u2, int inc_u2, float *a1t, int inc_a1t, float *A2, int rs_A2, int cs_A2)
 
FLA_Error FLA_Apply_H2_UT_l_opd_var1 (int m_u2_A2, int n_a1t, double *tau, double *u2, int inc_u2, double *a1t, int inc_a1t, double *A2, int rs_A2, int cs_A2)
 
FLA_Error FLA_Apply_H2_UT_l_opc_var1 (int m_u2_A2, int n_a1t, scomplex *tau, scomplex *u2, int inc_u2, scomplex *a1t, int inc_a1t, scomplex *A2, int rs_A2, int cs_A2)
 
FLA_Error FLA_Apply_H2_UT_l_opz_var1 (int m_u2_A2, int n_a1t, dcomplex *tau, dcomplex *u2, int inc_u2, dcomplex *a1t, int inc_a1t, dcomplex *A2, int rs_A2, int cs_A2)
 

Function Documentation

◆ FLA_Apply_H2_UT_l_opc_var1()

FLA_Error FLA_Apply_H2_UT_l_opc_var1 ( int  m_u2_A2,
int  n_a1t,
scomplex tau,
scomplex u2,
int  inc_u2,
scomplex a1t,
int  inc_a1t,
scomplex A2,
int  rs_A2,
int  cs_A2 
)
275 {
276  scomplex* one_p = FLA_COMPLEX_PTR( FLA_ONE );
277  scomplex* minus_one_p = FLA_COMPLEX_PTR( FLA_MINUS_ONE );
278  int inc_w1t;
279 
280  // FLA_Obj w1t;
281  scomplex* w1t;
282 
283  if ( n_a1t == 0 || ( tau->real == 0.0F && tau->imag == 0.0F ) ) return FLA_SUCCESS;
284 
285  // FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, a1t, &w1t );
286  w1t = ( scomplex* ) FLA_malloc( n_a1t * sizeof( *a1t ) );
287  inc_w1t = 1;
288 
289  // // w1t = a1t;
290  // FLA_Copy_external( a1t, w1t );
292  n_a1t,
293  a1t, inc_a1t,
294  w1t, inc_w1t );
295 
296  // // w1t = w1t + u2' * A2;
297  // // w1t = w1t + A2^T * conj(u2);
298  // FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A2, u2, FLA_ONE, w1t );
301  m_u2_A2,
302  n_a1t,
303  one_p,
304  A2, rs_A2, cs_A2,
305  u2, inc_u2,
306  one_p,
307  w1t, inc_w1t );
308 
309  // // w1t = w1t / tau;
310  // FLA_Inv_scalc_external( FLA_NO_CONJUGATE, tau, w1t );
312  n_a1t,
313  tau,
314  w1t, inc_w1t );
315 
316  // // a1t = - w1t + a1t;
317  // FLA_Axpy_external( FLA_MINUS_ONE, w1t, a1t );
319  n_a1t,
320  minus_one_p,
321  w1t, inc_w1t,
322  a1t, inc_a1t );
323 
324  // // A2 = - u2 * w1t + A2;
325  // FLA_Ger_external( FLA_MINUS_ONE, u2, w1t, A2 );
328  m_u2_A2,
329  n_a1t,
330  minus_one_p,
331  u2, inc_u2,
332  w1t, inc_w1t,
333  A2, rs_A2, cs_A2 );
334 
335  // FLA_Obj_free( &w1t );
336  FLA_free( w1t );
337 
338  return FLA_SUCCESS;
339 }
FLA_Obj FLA_MINUS_ONE
Definition: FLA_Init.c:22
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
void FLA_free(void *ptr)
Definition: FLA_Memory.c:247
void * FLA_malloc(size_t size)
Definition: FLA_Memory.c:111
void bl1_caxpyv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_axpyv.c:29
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
void bl1_cgemv(trans1_t transa, conj1_t conjx, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
Definition: bl1_gemv.c:125
void bl1_cger(conj1_t conjx, conj1_t conjy, int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
Definition: bl1_ger.c:111
void bl1_cinvscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_invscalv.c:52
@ BLIS1_TRANSPOSE
Definition: blis_type_defs.h:55
@ BLIS1_CONJUGATE
Definition: blis_type_defs.h:82
@ BLIS1_NO_CONJUGATE
Definition: blis_type_defs.h:81
Definition: blis_type_defs.h:133
float imag
Definition: blis_type_defs.h:134
float real
Definition: blis_type_defs.h:134

References bl1_caxpyv(), bl1_ccopyv(), bl1_cgemv(), bl1_cger(), bl1_cinvscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_TRANSPOSE, FLA_free(), FLA_malloc(), FLA_MINUS_ONE, FLA_ONE, scomplex::imag, and scomplex::real.

Referenced by FLA_Apply_H2_UT_l_opt_var1(), FLA_Bidiag_UT_u_step_opc_var1(), FLA_CAQR2_UT_opc_var1(), FLA_Hess_UT_step_opc_var1(), FLA_QR2_UT_opc_var1(), FLA_QR_UT_form_Q_opc_var1(), FLA_QR_UT_opc_var1(), and FLA_QR_UT_opc_var2().

◆ FLA_Apply_H2_UT_l_opd_var1()

FLA_Error FLA_Apply_H2_UT_l_opd_var1 ( int  m_u2_A2,
int  n_a1t,
double *  tau,
double *  u2,
int  inc_u2,
double *  a1t,
int  inc_a1t,
double *  A2,
int  rs_A2,
int  cs_A2 
)
201 {
202  double* one_p = FLA_DOUBLE_PTR( FLA_ONE );
203  double* minus_one_p = FLA_DOUBLE_PTR( FLA_MINUS_ONE );
204  int inc_w1t;
205 
206  // FLA_Obj w1t;
207  double* w1t;
208 
209  if ( n_a1t == 0 && *tau == 0.0 ) return FLA_SUCCESS;
210 
211  // FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, a1t, &w1t );
212  w1t = ( double* ) FLA_malloc( n_a1t * sizeof( *a1t ) );
213  inc_w1t = 1;
214 
215  // // w1t = a1t;
216  // FLA_Copy_external( a1t, w1t );
218  n_a1t,
219  a1t, inc_a1t,
220  w1t, inc_w1t );
221 
222  // // w1t = w1t + u2' * A2;
223  // // w1t = w1t + A2^T * conj(u2);
224  // FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A2, u2, FLA_ONE, w1t );
227  m_u2_A2,
228  n_a1t,
229  one_p,
230  A2, rs_A2, cs_A2,
231  u2, inc_u2,
232  one_p,
233  w1t, inc_w1t );
234 
235  // // w1t = w1t / tau;
236  // FLA_Inv_scalc_external( FLA_NO_CONJUGATE, tau, w1t );
238  n_a1t,
239  tau,
240  w1t, inc_w1t );
241 
242  // // a1t = - w1t + a1t;
243  // FLA_Axpy_external( FLA_MINUS_ONE, w1t, a1t );
245  n_a1t,
246  minus_one_p,
247  w1t, inc_w1t,
248  a1t, inc_a1t );
249 
250  // // A2 = - u2 * w1t + A2;
251  // FLA_Ger_external( FLA_MINUS_ONE, u2, w1t, A2 );
254  m_u2_A2,
255  n_a1t,
256  minus_one_p,
257  u2, inc_u2,
258  w1t, inc_w1t,
259  A2, rs_A2, cs_A2 );
260 
261  // FLA_Obj_free( &w1t );
262  FLA_free( w1t );
263 
264  return FLA_SUCCESS;
265 }
void bl1_daxpyv(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy)
Definition: bl1_axpyv.c:21
void bl1_dcopyv(conj1_t conj, int m, double *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:42
void bl1_dgemv(trans1_t transa, conj1_t conjx, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
Definition: bl1_gemv.c:69
void bl1_dger(conj1_t conjx, conj1_t conjy, int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
Definition: bl1_ger.c:62
void bl1_dinvscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition: bl1_invscalv.c:26

References bl1_daxpyv(), bl1_dcopyv(), bl1_dgemv(), bl1_dger(), bl1_dinvscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_TRANSPOSE, FLA_free(), FLA_malloc(), FLA_MINUS_ONE, and FLA_ONE.

Referenced by FLA_Apply_H2_UT_l_opt_var1(), FLA_Bidiag_UT_u_step_opd_var1(), FLA_CAQR2_UT_opd_var1(), FLA_Hess_UT_step_opd_var1(), FLA_QR2_UT_opd_var1(), FLA_QR_UT_form_Q_opd_var1(), FLA_QR_UT_opd_var1(), and FLA_QR_UT_opd_var2().

◆ FLA_Apply_H2_UT_l_ops_var1()

FLA_Error FLA_Apply_H2_UT_l_ops_var1 ( int  m_u2_A2,
int  n_a1t,
float *  tau,
float *  u2,
int  inc_u2,
float *  a1t,
int  inc_a1t,
float *  A2,
int  rs_A2,
int  cs_A2 
)
127 {
128  float* one_p = FLA_FLOAT_PTR( FLA_ONE );
129  float* minus_one_p = FLA_FLOAT_PTR( FLA_MINUS_ONE );
130  int inc_w1t;
131 
132  // FLA_Obj w1t;
133  float* w1t;
134 
135  if ( n_a1t == 0 || *tau == 0.0F ) return FLA_SUCCESS;
136 
137  // FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, a1t, &w1t );
138  w1t = ( float* ) FLA_malloc( n_a1t * sizeof( *a1t ) );
139  inc_w1t = 1;
140 
141  // // w1t = a1t;
142  // FLA_Copy_external( a1t, w1t );
144  n_a1t,
145  a1t, inc_a1t,
146  w1t, inc_w1t );
147 
148  // // w1t = w1t + u2' * A2;
149  // // w1t = w1t + A2^T * conj(u2);
150  // FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A2, u2, FLA_ONE, w1t );
153  m_u2_A2,
154  n_a1t,
155  one_p,
156  A2, rs_A2, cs_A2,
157  u2, inc_u2,
158  one_p,
159  w1t, inc_w1t );
160 
161  // // w1t = w1t / tau;
162  // FLA_Inv_scalc_external( FLA_NO_CONJUGATE, tau, w1t );
164  n_a1t,
165  tau,
166  w1t, inc_w1t );
167 
168  // // a1t = - w1t + a1t;
169  // FLA_Axpy_external( FLA_MINUS_ONE, w1t, a1t );
171  n_a1t,
172  minus_one_p,
173  w1t, inc_w1t,
174  a1t, inc_a1t );
175 
176  // // A2 = - u2 * w1t + A2;
177  // FLA_Ger_external( FLA_MINUS_ONE, u2, w1t, A2 );
180  m_u2_A2,
181  n_a1t,
182  minus_one_p,
183  u2, inc_u2,
184  w1t, inc_w1t,
185  A2, rs_A2, cs_A2 );
186 
187  // FLA_Obj_free( &w1t );
188  FLA_free( w1t );
189 
190  return FLA_SUCCESS;
191 }
void bl1_saxpyv(conj1_t conj, int n, float *alpha, float *x, int incx, float *y, int incy)
Definition: bl1_axpyv.c:13
void bl1_scopyv(conj1_t conj, int m, float *x, int incx, float *y, int incy)
Definition: bl1_copyv.c:35
void bl1_sgemv(trans1_t transa, conj1_t conjx, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
Definition: bl1_gemv.c:13
void bl1_sger(conj1_t conjx, conj1_t conjy, int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
Definition: bl1_ger.c:13
void bl1_sinvscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition: bl1_invscalv.c:13

References bl1_saxpyv(), bl1_scopyv(), bl1_sgemv(), bl1_sger(), bl1_sinvscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_TRANSPOSE, FLA_free(), FLA_malloc(), FLA_MINUS_ONE, and FLA_ONE.

Referenced by FLA_Apply_H2_UT_l_opt_var1(), FLA_Bidiag_UT_u_step_ops_var1(), FLA_CAQR2_UT_ops_var1(), FLA_Hess_UT_step_ops_var1(), FLA_QR2_UT_ops_var1(), FLA_QR_UT_form_Q_ops_var1(), FLA_QR_UT_ops_var1(), and FLA_QR_UT_ops_var2().

◆ FLA_Apply_H2_UT_l_opt_var1()

FLA_Error FLA_Apply_H2_UT_l_opt_var1 ( FLA_Obj  tau,
FLA_Obj  u2,
FLA_Obj  a1t,
FLA_Obj  A2 
)
26 {
27  FLA_Datatype datatype;
28  int m_u2_A2;
29  int n_a1t;
30  int inc_u2;
31  int inc_a1t;
32  int rs_A2;
33  int cs_A2;
34 
35  // The house-holder transformation in libFLAME never creates a zero tau value.
36  // However, when libFLAME is mixed with LAPACK, zero tau means to apply an
37  // identity matrix that does nothing here.
38  if ( FLA_Obj_has_zero_dim( a1t ) || FLA_Obj_equals( tau, FLA_ZERO) ) return FLA_SUCCESS;
39 
40  datatype = FLA_Obj_datatype( A2 );
41 
42  m_u2_A2 = FLA_Obj_length( A2 );
43  n_a1t = FLA_Obj_width( a1t );
44  inc_u2 = FLA_Obj_vector_inc( u2 );
45  inc_a1t = FLA_Obj_vector_inc( a1t );
46  rs_A2 = FLA_Obj_row_stride( A2 );
47  cs_A2 = FLA_Obj_col_stride( A2 );
48 
49  switch ( datatype )
50  {
51  case FLA_FLOAT:
52  {
53  float* tau_p = ( float* ) FLA_FLOAT_PTR( tau );
54  float* u2_p = ( float* ) FLA_FLOAT_PTR( u2 );
55  float* a1t_p = ( float* ) FLA_FLOAT_PTR( a1t );
56  float* A2_p = ( float* ) FLA_FLOAT_PTR( A2 );
57 
58  if ( *tau_p != 0.0F )
59  FLA_Apply_H2_UT_l_ops_var1( m_u2_A2, n_a1t,
60  tau_p,
61  u2_p, inc_u2,
62  a1t_p, inc_a1t,
63  A2_p, rs_A2, cs_A2 );
64  break;
65  }
66 
67  case FLA_DOUBLE:
68  {
69  double* tau_p = ( double* ) FLA_DOUBLE_PTR( tau );
70  double* u2_p = ( double* ) FLA_DOUBLE_PTR( u2 );
71  double* a1t_p = ( double* ) FLA_DOUBLE_PTR( a1t );
72  double* A2_p = ( double* ) FLA_DOUBLE_PTR( A2 );
73 
74  if ( *tau_p != 0.0 )
75  FLA_Apply_H2_UT_l_opd_var1( m_u2_A2, n_a1t,
76  tau_p,
77  u2_p, inc_u2,
78  a1t_p, inc_a1t,
79  A2_p, rs_A2, cs_A2 );
80  break;
81  }
82 
83  case FLA_COMPLEX:
84  {
85  scomplex* tau_p = ( scomplex* ) FLA_COMPLEX_PTR( tau );
86  scomplex* u2_p = ( scomplex* ) FLA_COMPLEX_PTR( u2 );
87  scomplex* a1t_p = ( scomplex* ) FLA_COMPLEX_PTR( a1t );
88  scomplex* A2_p = ( scomplex* ) FLA_COMPLEX_PTR( A2 );
89 
90  if ( tau_p->real != 0.0F && tau_p->imag != 0.0F )
91  FLA_Apply_H2_UT_l_opc_var1( m_u2_A2, n_a1t,
92  tau_p,
93  u2_p, inc_u2,
94  a1t_p, inc_a1t,
95  A2_p, rs_A2, cs_A2 );
96  break;
97  }
98 
99  case FLA_DOUBLE_COMPLEX:
100  {
101  dcomplex* tau_p = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( tau );
102  dcomplex* u2_p = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( u2 );
103  dcomplex* a1t_p = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( a1t );
104  dcomplex* A2_p = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A2 );
105 
106  if ( tau_p->real != 0.0 && tau_p->imag != 0.0 )
107  FLA_Apply_H2_UT_l_opz_var1( m_u2_A2, n_a1t,
108  tau_p,
109  u2_p, inc_u2,
110  a1t_p, inc_a1t,
111  A2_p, rs_A2, cs_A2 );
112  break;
113  }
114  }
115 
116  return FLA_SUCCESS;
117 }
FLA_Error FLA_Apply_H2_UT_l_opd_var1(int m_u2_A2, int n_a1t, double *tau, double *u2, int inc_u2, double *a1t, int inc_a1t, double *A2, int rs_A2, int cs_A2)
Definition: FLA_Apply_H2_UT_l_opt_var1.c:195
FLA_Error FLA_Apply_H2_UT_l_opz_var1(int m_u2_A2, int n_a1t, dcomplex *tau, dcomplex *u2, int inc_u2, dcomplex *a1t, int inc_a1t, dcomplex *A2, int rs_A2, int cs_A2)
Definition: FLA_Apply_H2_UT_l_opt_var1.c:343
FLA_Error FLA_Apply_H2_UT_l_ops_var1(int m_u2_A2, int n_a1t, float *tau, float *u2, int inc_u2, float *a1t, int inc_a1t, float *A2, int rs_A2, int cs_A2)
Definition: FLA_Apply_H2_UT_l_opt_var1.c:121
FLA_Error FLA_Apply_H2_UT_l_opc_var1(int m_u2_A2, int n_a1t, scomplex *tau, scomplex *u2, int inc_u2, scomplex *a1t, int inc_a1t, scomplex *A2, int rs_A2, int cs_A2)
Definition: FLA_Apply_H2_UT_l_opt_var1.c:269
FLA_Obj FLA_ZERO
Definition: FLA_Init.c:20
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition: FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
FLA_Bool FLA_Obj_equals(FLA_Obj A, FLA_Obj B)
Definition: FLA_Query.c:507
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int FLA_Datatype
Definition: FLA_type_defs.h:49
Definition: blis_type_defs.h:138
double real
Definition: blis_type_defs.h:139
double imag
Definition: blis_type_defs.h:139

References FLA_Apply_H2_UT_l_opc_var1(), FLA_Apply_H2_UT_l_opd_var1(), FLA_Apply_H2_UT_l_ops_var1(), FLA_Apply_H2_UT_l_opz_var1(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_equals(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_vector_inc(), FLA_Obj_width(), FLA_ZERO, scomplex::imag, dcomplex::imag, scomplex::real, and dcomplex::real.

Referenced by FLA_Apply_H2_UT_internal().

◆ FLA_Apply_H2_UT_l_opz_var1()

FLA_Error FLA_Apply_H2_UT_l_opz_var1 ( int  m_u2_A2,
int  n_a1t,
dcomplex tau,
dcomplex u2,
int  inc_u2,
dcomplex a1t,
int  inc_a1t,
dcomplex A2,
int  rs_A2,
int  cs_A2 
)
349 {
350  dcomplex* one_p = FLA_DOUBLE_COMPLEX_PTR( FLA_ONE );
351  dcomplex* minus_one_p = FLA_DOUBLE_COMPLEX_PTR( FLA_MINUS_ONE );
352  int inc_w1t;
353 
354  // FLA_Obj w1t;
355  dcomplex* w1t;
356 
357  if ( n_a1t == 0 || ( tau->real == 0.0 && tau->imag == 0.0 ) ) return FLA_SUCCESS;
358 
359  // FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, a1t, &w1t );
360  w1t = ( dcomplex* ) FLA_malloc( n_a1t * sizeof( *a1t ) );
361  inc_w1t = 1;
362 
363  // // w1t = a1t;
364  // FLA_Copy_external( a1t, w1t );
366  n_a1t,
367  a1t, inc_a1t,
368  w1t, inc_w1t );
369 
370  // // w1t = w1t + u2' * A2;
371  // // w1t = w1t + A2^T * conj(u2);
372  // FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A2, u2, FLA_ONE, w1t );
375  m_u2_A2,
376  n_a1t,
377  one_p,
378  A2, rs_A2, cs_A2,
379  u2, inc_u2,
380  one_p,
381  w1t, inc_w1t );
382 
383  // // w1t = w1t / tau;
384  // FLA_Inv_scalc_external( FLA_NO_CONJUGATE, tau, w1t );
386  n_a1t,
387  tau,
388  w1t, inc_w1t );
389 
390  // // a1t = - w1t + a1t;
391  // FLA_Axpy_external( FLA_MINUS_ONE, w1t, a1t );
393  n_a1t,
394  minus_one_p,
395  w1t, inc_w1t,
396  a1t, inc_a1t );
397 
398  // // A2 = - u2 * w1t + A2;
399  // FLA_Ger_external( FLA_MINUS_ONE, u2, w1t, A2 );
402  m_u2_A2,
403  n_a1t,
404  minus_one_p,
405  u2, inc_u2,
406  w1t, inc_w1t,
407  A2, rs_A2, cs_A2 );
408 
409  // FLA_Obj_free( &w1t );
410  FLA_free( w1t );
411 
412  return FLA_SUCCESS;
413 }
void bl1_zaxpyv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_axpyv.c:60
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
void bl1_zgemv(trans1_t transa, conj1_t conjx, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
Definition: bl1_gemv.c:255
void bl1_zger(conj1_t conjx, conj1_t conjy, int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
Definition: bl1_ger.c:194
void bl1_zinvscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_invscalv.c:78

References bl1_zaxpyv(), bl1_zcopyv(), bl1_zgemv(), bl1_zger(), bl1_zinvscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_TRANSPOSE, FLA_free(), FLA_malloc(), FLA_MINUS_ONE, FLA_ONE, dcomplex::imag, and dcomplex::real.

Referenced by FLA_Apply_H2_UT_l_opt_var1(), FLA_Bidiag_UT_u_step_opz_var1(), FLA_CAQR2_UT_opz_var1(), FLA_Hess_UT_step_opz_var1(), FLA_QR2_UT_opz_var1(), FLA_QR_UT_form_Q_opz_var1(), FLA_QR_UT_opz_var1(), and FLA_QR_UT_opz_var2().

◆ FLA_Apply_H2_UT_l_unb_var1()

FLA_Error FLA_Apply_H2_UT_l_unb_var1 ( FLA_Obj  tau,
FLA_Obj  u2,
FLA_Obj  a1t,
FLA_Obj  A2 
)
65 {
66  FLA_Obj w1t;
67 
68  if ( FLA_Obj_has_zero_dim( a1t ) || FLA_Obj_equals( tau, FLA_ZERO ) ) return FLA_SUCCESS;
69 
70  // w1t = a1t;
71  FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, a1t, &w1t );
72  FLA_Copy_external( a1t, w1t );
73 
74  // w1t = w1t + u2' * A2;
75  // w1t = w1t + A2^T * conj(u2);
76  FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A2, u2, FLA_ONE, w1t );
77 
78  // w1t = w1t / tau;
79  FLA_Inv_scalc_external( FLA_NO_CONJUGATE, tau, w1t );
80 
81  // a1t = a1t - w1t;
82  FLA_Axpy_external( FLA_MINUS_ONE, w1t, a1t );
83 
84  // A2 = A2 - u2 * w1t;
85  FLA_Ger_external( FLA_MINUS_ONE, u2, w1t, A2 );
86 
87  FLA_Obj_free( &w1t );
88 
89  return FLA_SUCCESS;
90 }
FLA_Error FLA_Inv_scalc_external(FLA_Conj conjalpha, FLA_Obj alpha, FLA_Obj A)
Definition: FLA_Inv_scalc_external.c:13
FLA_Error FLA_Axpy_external(FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition: FLA_Axpy_external.c:13
FLA_Error FLA_Copy_external(FLA_Obj A, FLA_Obj B)
Definition: FLA_Copy_external.c:13
FLA_Error FLA_Gemvc_external(FLA_Trans transa, FLA_Conj conjx, FLA_Obj alpha, FLA_Obj A, FLA_Obj x, FLA_Obj beta, FLA_Obj y)
Definition: FLA_Gemvc_external.c:13
FLA_Error FLA_Ger_external(FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj A)
Definition: FLA_Ger_external.c:13
FLA_Error FLA_Obj_create_conf_to(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition: FLA_Obj.c:286
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
Definition: FLA_type_defs.h:159

References FLA_Axpy_external(), FLA_Copy_external(), FLA_Gemvc_external(), FLA_Ger_external(), FLA_Inv_scalc_external(), FLA_MINUS_ONE, FLA_Obj_create_conf_to(), FLA_Obj_equals(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_ONE, and FLA_ZERO.