FLA_Apply_househ2_UT.c File Reference

(r)


Functions

FLA_Error FLA_Apply_househ2_UT (FLA_Obj tau, FLA_Obj u2, FLA_Obj a1t, FLA_Obj A2)

Function Documentation

FLA_Error FLA_Apply_househ2_UT ( FLA_Obj  tau,
FLA_Obj  u2,
FLA_Obj  a1t,
FLA_Obj  A2 
)

References FLA_Apply_househ2_UT_check(), FLA_Axpy_external(), FLA_Check_error_level(), FLA_Copy_external(), FLA_Gemvc_external(), FLA_Ger_external(), FLA_Inv_scalc_external(), FLA_MINUS_ONE, FLA_Obj_create_conf_to(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), and FLA_ONE.

Referenced by FLA_QR_UT_Accum_T_unb_var1(), and FLA_QR_UT_UD_Accum_T_unb_var1().

00039              :=  / I - 1/tau / 1  \ ( 1  u2^H ) \ / a1t \ 
00040     \ A2  /      \           \ u2 /             / \ A2  / 
00041  
00042   w = ( a1t + u2' * A2 ) / conj( tau );
00043 
00044   a1t = - w + a1t;
00045   A2  = - u2 * w + A2;
00046 */
00047 {
00048   FLA_Obj w1t;
00049 
00050   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00051     FLA_Apply_househ2_UT_check( tau, u2, a1t, A2 );
00052 
00053   if ( FLA_Obj_has_zero_dim( a1t ) ) return FLA_SUCCESS;
00054 
00055   // w1t = a1t;
00056   FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, a1t, &w1t );
00057   FLA_Copy_external( a1t, w1t );
00058 
00059   // w1t = w1t + u2' * A2;
00060   // w1t = w1t + A2^T * conj(u2);
00061   //FLA_Gemv_external( FLA_TRANSPOSE, FLA_ONE, A2, u2, FLA_ONE, w1t );
00062   FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A2, u2, FLA_ONE, w1t );
00063 
00064   // w1t = w1t / conj( tau );
00065   FLA_Inv_scalc_external( FLA_CONJUGATE, tau, w1t );
00066 
00067   // a1t = - w1t + a1t;
00068   FLA_Axpy_external( FLA_MINUS_ONE, w1t, a1t );
00069 
00070   // A2 = - u2 * w1t + A2;
00071   FLA_Ger_external( FLA_MINUS_ONE, u2, w1t, A2 );
00072 
00073   FLA_Obj_free( &w1t );
00074 
00075   return FLA_SUCCESS;
00076 }


Generated on Mon Jul 6 05:45:53 2009 for libflame by  doxygen 1.5.9