|
libflame
revision_anchor
|
Functions | |
| FLA_Error | FLA_Bidiag_UT_form_V (FLA_Obj A, FLA_Obj S, FLA_Obj V) |
| FLA_Error FLA_Bidiag_UT_form_V | ( | FLA_Obj | A, |
| FLA_Obj | S, | ||
| FLA_Obj | V | ||
| ) |
References FLA_Bidiag_UT_form_V_check(), FLA_Check_error_level(), FLA_Copyrt(), FLA_Obj_length(), FLA_Obj_width(), FLA_ONE, FLA_Part_1x2(), FLA_Part_2x2(), FLA_QR_UT_form_Q(), FLA_Set(), and FLA_ZERO.
Referenced by FLA_Svd_uv_unb_var1(), and FLA_Svd_uv_unb_var2().
{
FLA_Uplo uplo;
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Bidiag_UT_form_V_check( A, S, V );
uplo = ( FLA_Obj_length( A ) >= FLA_Obj_width( A ) ?
FLA_UPPER_TRIANGULAR :
FLA_LOWER_TRIANGULAR );
if ( uplo == FLA_UPPER_TRIANGULAR )
{
FLA_Obj ATL, ATR,
ABL, ABR;
FLA_Obj VTL, VTR,
VBL, VBR;
FLA_Obj SL, SR;
dim_t n_A = FLA_Obj_width( A );
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, n_A-1, n_A-1, FLA_TR );
FLA_Part_2x2( V, &VTL, &VTR,
&VBL, &VBR, 1, 1, FLA_TL );
FLA_Part_1x2( S, &SL, &SR, 1, FLA_RIGHT );
FLA_Set( FLA_ONE, VTL );
FLA_Set( FLA_ZERO, VBL );
FLA_Set( FLA_ZERO, VTR );
//FLA_LQ_UT_form_Q( ATR, SL, VBR );
FLA_Copyrt( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, ATR, VBR );
FLA_QR_UT_form_Q( VBR, SL, VBR );
}
else // if ( uplo == FLA_LOWER_TRIANGULAR )
{
//FLA_LQ_UT_form_Q( A, S, V );
FLA_Copyrt( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, A, V );
FLA_QR_UT_form_Q( V, S, V );
}
return FLA_SUCCESS;
}
1.7.6.1