FLA_LQ_UT.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_LQ_UT (FLA_Obj A, FLA_Obj T)
FLA_Error FLA_LQ_UT_internal (FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
FLA_Error FLA_LQ_UT_create_T (FLA_Obj A, FLA_Obj *T)
FLA_Error FLA_LQ_UT_recover_tau (FLA_Obj T, FLA_Obj t)


Function Documentation

FLA_Error FLA_LQ_UT ( FLA_Obj  A,
FLA_Obj  T 
)

References FLA_Blocksize_set(), FLA_Check_error_level(), FLA_LQ_UT_check(), FLA_LQ_UT_internal(), and FLA_Obj_width().

00038 {
00039   FLA_Error r_val;
00040   dim_t     nb_alg;
00041 
00042   // Check parameters.
00043   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00044     FLA_LQ_UT_check( A, T );
00045 
00046   // Inspect the width of T to get the implied blocksize.
00047   nb_alg = FLA_Obj_width( T );
00048 
00049   // Adjust the top parent control tree node based on the implied blocksize.
00050   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_lqut_cntl_leaf ),
00051                      nb_alg, nb_alg, nb_alg, nb_alg );
00052 
00053   // Invoke FLA_LQ_UT_internal() with the standard control tree.
00054   //r_val = FLA_LQ_UT_blk_var1( A, T, fla_lqut_cntl_leaf );
00055   r_val = FLA_LQ_UT_internal( A, T, fla_lqut_cntl_leaf );
00056 
00057   return r_val;
00058 }

FLA_Error FLA_LQ_UT_create_T ( FLA_Obj  A,
FLA_Obj T 
)

References FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Query_blocksize().

Referenced by fla_lq_ut_create_t_f().

00036 {
00037   FLA_Datatype datatype;
00038   dim_t        b, m;
00039 
00040   // Query the datatype of A.
00041   datatype = FLA_Obj_datatype( A );
00042 
00043   // Query the blocksize from the library.
00044   b = FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
00045 
00046   // Query the length of A.
00047   m = FLA_Obj_length( A );
00048 
00049   // Create an m x b matrix to hold the block Householder transforms that will be
00050   // accumulated within the LQ factorization algorithm.
00051   FLA_Obj_create( datatype, m, b, T );
00052 
00053   return FLA_SUCCESS;
00054 }

FLA_Error FLA_LQ_UT_internal ( FLA_Obj  A,
FLA_Obj  T,
fla_lqut_t cntl 
)

References FLA_Check_error_level(), FLA_LQ_UT_Accum_T_blk_var1(), FLA_LQ_UT_Accum_T_unb_external(), FLA_LQ_UT_blk_var2(), and FLA_LQ_UT_internal_check().

00036 {
00037     FLA_Error r_val = FLA_SUCCESS;
00038 
00039     if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
00040         FLA_LQ_UT_internal_check( A, T, cntl );
00041     
00042     if      ( FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
00043     {
00044         //r_val = FLA_LQ_UT_task( A, T, cntl );
00045         r_val = FLA_LQ_UT_Accum_T_unb_external( A, T );
00046     }
00047     else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 )
00048     {
00049         r_val = FLA_LQ_UT_Accum_T_blk_var1( A, T, cntl );
00050     }
00051     else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
00052     {
00053         r_val = FLA_LQ_UT_blk_var2( A, T, cntl );
00054     }
00055 
00056     return r_val;
00057 }

FLA_Error FLA_LQ_UT_recover_tau ( FLA_Obj  T,
FLA_Obj  t 
)

References FLA_Check_error_level(), FLA_Cont_with_3x1_to_2x1(), FLA_LQ_UT_recover_tau_check(), FLA_LQ_UT_recover_tau_submatrix(), FLA_Obj_length(), FLA_Obj_width(), FLA_Part_2x1(), and FLA_Repart_2x1_to_3x1().

Referenced by fla_lq_ut_recover_tau_f().

00038 {
00039   FLA_Obj TT,              T0,
00040           TB,              T1,
00041                            T2;
00042 
00043   FLA_Obj tT,              t0,
00044           tB,              t1,
00045                            t2;
00046 
00047   dim_t b;
00048   dim_t b_alg;
00049 
00050   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00051     FLA_LQ_UT_recover_tau_check( T, t );
00052 
00053   b_alg = FLA_Obj_width( T );
00054 
00055   FLA_Part_2x1( T,    &TT, 
00056                       &TB,            0, FLA_TOP );
00057 
00058   FLA_Part_2x1( t,    &tT, 
00059                       &tB,            0, FLA_TOP );
00060 
00061   while ( FLA_Obj_length( TT ) < FLA_Obj_length( T ) ){
00062 
00063     b = min( FLA_Obj_length( TB ), b_alg );
00064 
00065     FLA_Repart_2x1_to_3x1( TT,                &T0, 
00066                         /* ** */            /* ** */
00067                                               &T1, 
00068                            TB,                &T2,        b, FLA_BOTTOM );
00069 
00070     FLA_Repart_2x1_to_3x1( tT,                &t0, 
00071                         /* ** */            /* ** */
00072                                               &t1, 
00073                            tB,                &t2,        b, FLA_BOTTOM );
00074 
00075     /*------------------------------------------------------------*/
00076 
00077     FLA_LQ_UT_recover_tau_submatrix( T1, t1 );
00078 
00079     /*------------------------------------------------------------*/
00080 
00081     FLA_Cont_with_3x1_to_2x1( &TT,                T0, 
00082                                                   T1, 
00083                             /* ** */           /* ** */
00084                               &TB,                T2,     FLA_TOP );
00085 
00086     FLA_Cont_with_3x1_to_2x1( &tT,                t0, 
00087                                                   t1, 
00088                             /* ** */           /* ** */
00089                               &tB,                t2,     FLA_TOP );
00090   }
00091 
00092   return FLA_SUCCESS;
00093 }


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