|
libflame
revision_anchor
|
Functions | |
| FLA_Error | FLA_Syr2k_ut_unb_var5 (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C) |
References FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x3_to_2x2(), FLA_Dot2s_external(), FLA_Gemv_external(), FLA_Obj_width(), FLA_ONE, FLA_Part_1x2(), FLA_Part_2x2(), FLA_Repart_1x2_to_1x3(), FLA_Repart_2x2_to_3x3(), and FLA_Scalr_external().
Referenced by FLA_Syr2k_ut().
{
FLA_Obj AL, AR, A0, a1, A2;
FLA_Obj BL, BR, B0, b1, B2;
FLA_Obj CTL, CTR, C00, c01, C02,
CBL, CBR, c10t, gamma11, c12t,
C20, c21, C22;
FLA_Scalr_external( FLA_UPPER_TRIANGULAR, beta, C );
FLA_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
FLA_Part_2x2( C, &CTL, &CTR,
&CBL, &CBR, 0, 0, FLA_BR );
while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &a1, /**/ &A2,
1, FLA_LEFT );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &b1, /**/ &B2,
1, FLA_LEFT );
FLA_Repart_2x2_to_3x3( CTL, /**/ CTR, &C00, &c01, /**/ &C02,
&c10t, &gamma11, /**/ &c12t,
/* ************* */ /* ************************** */
CBL, /**/ CBR, &C20, &c21, /**/ &C22,
1, 1, FLA_TL );
/*------------------------------------------------------------*/
/* c01 = c01 + A0' * b1 */
FLA_Gemv_external( FLA_TRANSPOSE, alpha, A0, b1, FLA_ONE, c01 );
/* c01 = c01 + B0' * a1 */
FLA_Gemv_external( FLA_TRANSPOSE, alpha, B0, a1, FLA_ONE, c01 );
/* gamma11 = gamma11 + a1' * b1 + b1' * a1 */
FLA_Dot2s_external( alpha, a1, b1, FLA_ONE, gamma11 );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ a1, A2,
FLA_RIGHT );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ b1, B2,
FLA_RIGHT );
FLA_Cont_with_3x3_to_2x2( &CTL, /**/ &CTR, C00, /**/ c01, C02,
/* ************** */ /* ************************ */
c10t, /**/ gamma11, c12t,
&CBL, /**/ &CBR, C20, /**/ c21, C22,
FLA_BR );
}
return FLA_SUCCESS;
}
1.7.6.1