libflame revision_anchor
Functions
FLA_Trsm_luh_unb_var2.c File Reference

(r)

Functions

FLA_Error FLA_Trsm_luh_unb_var2 (FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)

Function Documentation

FLA_Error FLA_Trsm_luh_unb_var2 ( FLA_Diag  diagA,
FLA_Obj  alpha,
FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Cont_with_3x1_to_2x1(), FLA_Cont_with_3x3_to_2x2(), FLA_Gerc_external(), FLA_Inv_scalc_external(), FLA_MINUS_ONE, FLA_Obj_length(), FLA_Part_2x1(), FLA_Part_2x2(), FLA_Repart_2x1_to_3x1(), FLA_Repart_2x2_to_3x3(), and FLA_Scal_external().

Referenced by FLA_Trsm_luh().

{
  FLA_Obj ATL,   ATR,      A00,  a01,     A02, 
          ABL,   ABR,      a10t, alpha11, a12t,
                           A20,  a21,     A22;

  FLA_Obj BT,              B0,
          BB,              b1t,
                           B2;

  FLA_Scal_external( alpha, B );

  FLA_Part_2x2( A,    &ATL, &ATR,
                      &ABL, &ABR,     0, 0, FLA_TL );

  FLA_Part_2x1( B,    &BT, 
                      &BB,            0, FLA_TOP );

  while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){

    FLA_Repart_2x2_to_3x3( ATL, /**/ ATR,       &A00,  /**/ &a01,     &A02,
                        /* ************* */   /* ************************** */
                                                &a10t, /**/ &alpha11, &a12t,
                           ABL, /**/ ABR,       &A20,  /**/ &a21,     &A22,
                           1, 1, FLA_BR );

    FLA_Repart_2x1_to_3x1( BT,                &B0, 
                        /* ** */            /* *** */
                                              &b1t, 
                           BB,                &B2,        1, FLA_BOTTOM );

    /*------------------------------------------------------------*/

    /* b1t = b1t / alpha11'; */
    if ( diagA != FLA_UNIT_DIAG )
      FLA_Inv_scalc_external( FLA_CONJUGATE, alpha11, b1t );

    /* B2 = B2 - a12t' * b1t; */
    FLA_Gerc_external( FLA_CONJUGATE, FLA_NO_CONJUGATE, FLA_MINUS_ONE, a12t, b1t, B2 );

    /*------------------------------------------------------------*/

    FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR,       A00,  a01,     /**/ A02,
                                                     a10t, alpha11, /**/ a12t,
                            /* ************** */  /* ************************ */
                              &ABL, /**/ &ABR,       A20,  a21,     /**/ A22,
                              FLA_TL );

    FLA_Cont_with_3x1_to_2x1( &BT,                B0, 
                                                  b1t, 
                            /* ** */           /* *** */
                              &BB,                B2,     FLA_TOP );

  }

  return FLA_SUCCESS;
}