libflame  revision_anchor
Functions
FLA_LQ_UT_form_Q.c File Reference

(r)

Functions

FLA_Error FLA_LQ_UT_form_Q (FLA_Obj A, FLA_Obj T, FLA_Obj Q)
 

Function Documentation

◆ FLA_LQ_UT_form_Q()

FLA_Error FLA_LQ_UT_form_Q ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  Q 
)
14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 
17  // Flip a base once.
18  FLA_Obj_flip_base( &A );
19  if ( FLA_Obj_is( A, Q ) == FALSE )
20  FLA_Obj_flip_base( &Q );
21 
22  // Dimensions of the both matrices should be flipped.
23  FLA_Obj_flip_view( &A );
24  FLA_Obj_flip_view( &Q );
25 
26  // Run the QR utility function.
27  r_val = FLA_QR_UT_form_Q( A, T, Q );
28 
29  // Apply conjugation on Q as we use QR_UT_form_Q.
30  if ( FLA_Obj_is_complex( Q ) )
31  FLA_Conjugate( Q );
32 
33  // Recover the base object.
34  if ( FLA_Obj_is( A, Q ) == FALSE )
35  FLA_Obj_flip_base( &Q );
36  FLA_Obj_flip_base( &A );
37 
38  return r_val;
39 }
FLA_Error FLA_QR_UT_form_Q(FLA_Obj A, FLA_Obj T, FLA_Obj Q)
Definition: FLA_QR_UT_form_Q.c:13
FLA_Error FLA_Obj_flip_view(FLA_Obj *obj)
Definition: FLA_Obj.c:669
FLA_Error FLA_Obj_flip_base(FLA_Obj *obj)
Definition: FLA_Obj.c:647
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
FLA_Bool FLA_Obj_is(FLA_Obj A, FLA_Obj B)
Definition: FLA_Query.c:460
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Conjugate(FLA_Obj A)
Definition: FLA_Conjugate.c:13

References FLA_Conjugate(), FLA_Obj_flip_base(), FLA_Obj_flip_view(), FLA_Obj_is(), FLA_Obj_is_complex(), and FLA_QR_UT_form_Q().

Referenced by FLA_Bidiag_UT_form_V_ext().