Functions | |
FLA_Error | FLA_QR_UT_inc_blk_var1 (FLA_Obj A, FLA_Obj TW, fla_qrutinc_t *cntl) |
FLA_Error FLA_QR_UT_inc_blk_var1 | ( | FLA_Obj | A, | |
FLA_Obj | TW, | |||
fla_qrutinc_t * | cntl | |||
) |
References FLA_Apply_Q_UT_internal(), FLA_Apply_Q_UT_UD_internal(), FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Obj_min_dim(), FLA_Part_2x2(), FLA_QR_UT_internal(), FLA_QR_UT_UD_internal(), and FLA_Repart_2x2_to_3x3().
Referenced by FLASH_QR_UT_inc_noopt().
00036 { 00037 FLA_Obj ATL, ATR, A00, A01, A02, 00038 ABL, ABR, A10, A11, A12, 00039 A20, A21, A22; 00040 00041 FLA_Obj TTL, WTR, T00, W01, W02, 00042 TBL, TBR, T10, T11, W12, 00043 T20, T21, T22; 00044 00045 dim_t b; 00046 00047 FLA_Part_2x2( A, &ATL, &ATR, 00048 &ABL, &ABR, 0, 0, FLA_TL ); 00049 00050 FLA_Part_2x2( TW, &TTL, &WTR, 00051 &TBL, &TBR, 0, 0, FLA_TL ); 00052 00053 while ( FLA_Obj_min_dim( ABR ) > 0 ){ 00054 00055 b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) ); 00056 00057 FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02, 00058 /* ************* */ /* ******************** */ 00059 &A10, /**/ &A11, &A12, 00060 ABL, /**/ ABR, &A20, /**/ &A21, &A22, 00061 b, b, FLA_BR ); 00062 00063 FLA_Repart_2x2_to_3x3( TTL, /**/ WTR, &T00, /**/ &W01, &W02, 00064 /* ************* */ /* ******************** */ 00065 &T10, /**/ &T11, &W12, 00066 TBL, /**/ TBR, &T20, /**/ &T21, &T22, 00067 b, b, FLA_BR ); 00068 00069 /*------------------------------------------------------------*/ 00070 00071 /* 00072 Perform a QR factorization (via UT transform) on A11: 00073 00074 [ A11, T11 ] = QR_UT( A11, T11 ); 00075 00076 where T11 refers to a single storage block that refers to an 00077 nb_alg-by-b row-panel of upper triangular block Householder 00078 transforms. Here, b is the storage blocksize while nb_alg is 00079 the algorithmic blocksize used by the QR factorization. 00080 Typically nb_alg << b. 00081 00082 */ 00083 00084 FLA_QR_UT_internal( A11, T11, 00085 FLA_Cntl_sub_qrut( cntl ) ); 00086 00087 00088 /* 00089 Apply Q^H to A12 from the left: 00090 00091 A12 = Q^H * A12 00092 00093 where Q is formed from A11 and T11. Note that W12 refers 00094 to a row-panel of blocks where each block refers to an 00095 nb_alg-by-b row-panel of workspace. 00096 */ 00097 00098 FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE, 00099 A11, T11, W12, A12, 00100 FLA_Cntl_sub_apqut( cntl ) ); 00101 00102 00103 /* 00104 Update QR factorization of A11 with each block of A21, storing 00105 block Householder transforms into corresponding blocks of T21. 00106 00107 [ A11, ... 00108 A21, T21 ] = QR_UT_UD( A11, ... 00109 A21, T21 ); 00110 */ 00111 00112 FLA_QR_UT_UD_internal( A11, 00113 A21, T21, 00114 FLA_Cntl_sub_qrutud( cntl ) ); 00115 00116 00117 /* 00118 Apply Q^H to A12 and A22 from the left: 00119 00120 / A12 \ = Q^H * / A12 \ 00121 \ A22 / \ A22 / 00122 00123 where Q is formed from A21 and T21. 00124 */ 00125 00126 FLA_Apply_Q_UT_UD_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE, 00127 A21, T21, W12, A12, 00128 A22, 00129 FLA_Cntl_sub_apqutud( cntl ) ); 00130 00131 /*------------------------------------------------------------*/ 00132 00133 FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02, 00134 A10, A11, /**/ A12, 00135 /* ************** */ /* ****************** */ 00136 &ABL, /**/ &ABR, A20, A21, /**/ A22, 00137 FLA_TL ); 00138 00139 FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &WTR, T00, W01, /**/ W02, 00140 T10, T11, /**/ W12, 00141 /* ************** */ /* ****************** */ 00142 &TBL, /**/ &TBR, T20, T21, /**/ T22, 00143 FLA_TL ); 00144 00145 } 00146 00147 return FLA_SUCCESS; 00148 }