FLA_QR_UT_inc.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLASH_QR_UT_inc (FLA_Obj A, FLA_Obj TW)
FLA_Error FLASH_QR_UT_inc_noopt (FLA_Obj A, FLA_Obj TW)
FLA_Error FLASH_QR_UT_inc_opt1 (FLA_Obj A, FLA_Obj TW)
FLA_Error FLA_QR_UT_inc_blk_var1 (FLA_Obj A, FLA_Obj TW, fla_qrutinc_t *cntl)
FLA_Error FLA_QR_UT_inc_blk_var2 (FLA_Obj A, FLA_Obj TW, FLA_Obj U, fla_qrutinc_t *cntl)
FLA_Error FLA_QR_UT_inc_create_U_panel (FLA_Obj A, FLA_Obj *U)
FLA_Error FLA_QR_UT_inc_free_U_panel (FLA_Obj *U)
FLA_Error FLA_QR_UT_inc_create_U (FLA_Obj A, FLA_Obj *U)
FLA_Error FLA_QR_UT_inc_free_U (FLA_Obj U)
FLA_Error FLASH_QR_UT_inc_create_hier_matrices (FLA_Obj A_flat, dim_t depth, dim_t *b_flash, dim_t b_alg, FLA_Obj *A, FLA_Obj *TW)
dim_t FLASH_QR_UT_inc_determine_alg_blocksize (FLA_Obj A)


Function Documentation

FLA_Error FLA_QR_UT_inc_blk_var1 ( FLA_Obj  A,
FLA_Obj  TW,
fla_qrutinc_t cntl 
)

References FLA_Apply_Q_UT_internal(), FLA_Apply_Q_UT_UD_internal(), FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Obj_min_dim(), FLA_Part_2x2(), FLA_QR_UT_internal(), FLA_QR_UT_UD_internal(), and FLA_Repart_2x2_to_3x3().

Referenced by FLASH_QR_UT_inc_noopt().

00036 {
00037   FLA_Obj ATL,   ATR,      A00, A01, A02, 
00038           ABL,   ABR,      A10, A11, A12,
00039                            A20, A21, A22;
00040 
00041   FLA_Obj TTL,   WTR,      T00, W01, W02, 
00042           TBL,   TBR,      T10, T11, W12,
00043                            T20, T21, T22;
00044 
00045   dim_t b;
00046 
00047   FLA_Part_2x2( A,    &ATL, &ATR,
00048                       &ABL, &ABR,     0, 0, FLA_TL );
00049 
00050   FLA_Part_2x2( TW,   &TTL, &WTR,
00051                       &TBL, &TBR,     0, 0, FLA_TL );
00052 
00053   while ( FLA_Obj_min_dim( ABR ) > 0 ){
00054 
00055     b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) );
00056 
00057     FLA_Repart_2x2_to_3x3( ATL, /**/ ATR,       &A00, /**/ &A01, &A02,
00058                         /* ************* */   /* ******************** */
00059                                                 &A10, /**/ &A11, &A12,
00060                            ABL, /**/ ABR,       &A20, /**/ &A21, &A22,
00061                            b, b, FLA_BR );
00062 
00063     FLA_Repart_2x2_to_3x3( TTL, /**/ WTR,       &T00, /**/ &W01, &W02,
00064                         /* ************* */   /* ******************** */
00065                                                 &T10, /**/ &T11, &W12,
00066                            TBL, /**/ TBR,       &T20, /**/ &T21, &T22,
00067                            b, b, FLA_BR );
00068 
00069     /*------------------------------------------------------------*/
00070 
00071     /*
00072        Perform a QR factorization (via UT transform) on A11:
00073      
00074          [ A11, T11 ] = QR_UT( A11, T11 );
00075 
00076        where T11 refers to a single storage block that refers to an
00077        nb_alg-by-b row-panel of upper triangular block Householder
00078        transforms. Here, b is the storage blocksize while nb_alg is
00079        the algorithmic blocksize used by the QR factorization.
00080        Typically nb_alg << b.
00081        
00082     */
00083 
00084     FLA_QR_UT_internal( A11, T11,
00085                         FLA_Cntl_sub_qrut( cntl ) );
00086 
00087 
00088     /*
00089        Apply Q^H to A12 from the left:
00090      
00091          A12 = Q^H * A12
00092      
00093        where Q is formed from A11 and T11. Note that W12 refers
00094        to a row-panel of blocks where each block refers to an
00095        nb_alg-by-b row-panel of workspace.
00096     */
00097 
00098     FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE,
00099                              A11, T11, W12, A12,
00100                              FLA_Cntl_sub_apqut( cntl ) );
00101 
00102 
00103     /*
00104        Update QR factorization of A11 with each block of A21, storing
00105        block Householder transforms into corresponding blocks of T21.
00106      
00107          [ A11, ...
00108            A21, T21 ] = QR_UT_UD( A11, ...
00109                                   A21, T21 );
00110     */
00111 
00112     FLA_QR_UT_UD_internal( A11,
00113                            A21, T21, 
00114                            FLA_Cntl_sub_qrutud( cntl ) );
00115 
00116 
00117     /*
00118        Apply Q^H to A12 and A22 from the left:
00119      
00120            / A12 \ = Q^H * / A12 \
00121            \ A22 /         \ A22 / 
00122      
00123        where Q is formed from A21 and T21.
00124     */
00125 
00126     FLA_Apply_Q_UT_UD_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE,
00127                                 A21, T21, W12, A12,
00128                                                A22,
00129                                 FLA_Cntl_sub_apqutud( cntl ) );
00130 
00131     /*------------------------------------------------------------*/
00132 
00133     FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR,       A00, A01, /**/ A02,
00134                                                      A10, A11, /**/ A12,
00135                             /* ************** */  /* ****************** */
00136                               &ABL, /**/ &ABR,       A20, A21, /**/ A22,
00137                               FLA_TL );
00138 
00139     FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &WTR,       T00, W01, /**/ W02,
00140                                                      T10, T11, /**/ W12,
00141                             /* ************** */  /* ****************** */
00142                               &TBL, /**/ &TBR,       T20, T21, /**/ T22,
00143                               FLA_TL );
00144 
00145   }
00146 
00147   return FLA_SUCCESS;
00148 }

FLA_Error FLA_QR_UT_inc_blk_var2 ( FLA_Obj  A,
FLA_Obj  TW,
FLA_Obj  U,
fla_qrutinc_t cntl 
)

References FLA_Apply_Q_UT_internal(), FLA_Apply_Q_UT_UD_internal(), FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Obj_min_dim(), FLA_Part_1x2(), FLA_Part_2x2(), FLA_QR_UT_copy_internal(), FLA_QR_UT_UD_internal(), FLA_Repart_1x2_to_1x3(), and FLA_Repart_2x2_to_3x3().

Referenced by FLASH_QR_UT_inc_opt1().

00036 {
00037   FLA_Obj ATL,   ATR,      A00, A01, A02, 
00038           ABL,   ABR,      A10, A11, A12,
00039                            A20, A21, A22;
00040 
00041   FLA_Obj TTL,   WTR,      T00, W01, W02, 
00042           TBL,   TBR,      T10, T11, W12,
00043                            T20, T21, T22;
00044 
00045   FLA_Obj UL,    UR,       U0,  U11,  U2;
00046 
00047   dim_t b;
00048 
00049   FLA_Part_2x2( A,    &ATL, &ATR,
00050                       &ABL, &ABR,     0, 0, FLA_TL );
00051 
00052   FLA_Part_2x2( TW,   &TTL, &WTR,
00053                       &TBL, &TBR,     0, 0, FLA_TL );
00054 
00055   FLA_Part_1x2( U,    &UL,  &UR,      0, FLA_LEFT );
00056 
00057   while ( FLA_Obj_min_dim( ABR ) > 0 ){
00058 
00059     b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) );
00060 
00061     FLA_Repart_2x2_to_3x3( ATL, /**/ ATR,       &A00, /**/ &A01, &A02,
00062                         /* ************* */   /* ******************** */
00063                                                 &A10, /**/ &A11, &A12,
00064                            ABL, /**/ ABR,       &A20, /**/ &A21, &A22,
00065                            b, b, FLA_BR );
00066 
00067     FLA_Repart_2x2_to_3x3( TTL, /**/ WTR,       &T00, /**/ &W01, &W02,
00068                         /* ************* */   /* ******************** */
00069                                                 &T10, /**/ &T11, &W12,
00070                            TBL, /**/ TBR,       &T20, /**/ &T21, &T22,
00071                            b, b, FLA_BR );
00072 
00073     FLA_Repart_1x2_to_1x3( UL,  /**/ UR,        &U0, /**/ &U11, &U2,
00074                            b, FLA_RIGHT );
00075 
00076     /*------------------------------------------------------------*/
00077 
00078     /*
00079        Use U11 to hold a copy of A11 to avoid a false
00080        write-after-read dependency so that FLA_QR_UT_UD() may proceed
00081        while FLA_Apply_Q_UT() executes.
00082     */
00083 
00084 
00085     /*
00086        Perform a QR factorization (via UT transform) on A11:
00087      
00088          [ A11, T11 ] = QR_UT( A11, T11 );
00089 
00090        where T11 refers to a single storage block that refers to an
00091        nb_alg-by-b row-panel of upper triangular block Householder
00092        transforms. Here, b is the storage blocksize while nb_alg is
00093        the algorithmic blocksize used by the QR factorization.
00094        Typically nb_alg << b.
00095        
00096        After the factorization is complete, A11 is copied into U11.
00097      
00098     */
00099 
00100     FLA_QR_UT_copy_internal( A11, T11, U11,
00101                              FLA_Cntl_sub_qrut( cntl ) );
00102 
00103 
00104     /*
00105        Apply Q^H to A12 from the left:
00106      
00107          A12 = Q^H * A12
00108      
00109        where Q is formed from A11 and T11. Note that W12 refers
00110        to a row-panel of blocks where each block refers to an
00111        nb_alg-by-b row-panel of workspace.
00112     */
00113 
00114     FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE,
00115                              U11, T11, W12, A12,
00116                              FLA_Cntl_sub_apqut( cntl ) );
00117 
00118 
00119     /*
00120        Update QR factorization of A11 with each block of A21, storing
00121        block Householder transforms into corresponding blocks of T21.
00122      
00123          [ A11, ...
00124            A21, T21 ] = QR_UT_UD( A11, ...
00125                                   A21, T21 );
00126     */
00127 
00128     FLA_QR_UT_UD_internal( A11,
00129                            A21, T21, 
00130                            FLA_Cntl_sub_qrutud( cntl ) );
00131 
00132 
00133     /*
00134        Apply Q^H to A12 and A22 from the left:
00135      
00136            / A12 \ = Q^H * / A12 \
00137            \ A22 /         \ A22 / 
00138      
00139        where Q is formed from A21 and T21.
00140     */
00141 
00142     FLA_Apply_Q_UT_UD_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_COLUMNWISE,
00143                                 A21, T21, W12, A12,
00144                                                A22,
00145                                 FLA_Cntl_sub_apqutud( cntl ) );
00146 
00147     /*------------------------------------------------------------*/
00148 
00149     FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR,       A00, A01, /**/ A02,
00150                                                      A10, A11, /**/ A12,
00151                             /* ************** */  /* ****************** */
00152                               &ABL, /**/ &ABR,       A20, A21, /**/ A22,
00153                               FLA_TL );
00154 
00155     FLA_Cont_with_3x3_to_2x2( &TTL, /**/ &WTR,       T00, W01, /**/ W02,
00156                                                      T10, T11, /**/ W12,
00157                             /* ************** */  /* ****************** */
00158                               &TBL, /**/ &TBR,       T20, T21, /**/ T22,
00159                               FLA_TL );
00160 
00161     FLA_Cont_with_1x3_to_1x2( &UL,  /**/ &UR,        U0, U11, /**/ U2,
00162                               FLA_LEFT );
00163 
00164   }
00165 
00166   return FLA_SUCCESS;
00167 }

FLA_Error FLA_QR_UT_inc_create_U ( FLA_Obj  A,
FLA_Obj U 
)

References FLASH_Obj_create_conf_to().

00114 {
00115     FLASH_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, U );
00116 
00117     return FLA_SUCCESS;
00118 }

FLA_Error FLA_QR_UT_inc_create_U_panel ( FLA_Obj  A,
FLA_Obj U 
)

References FLA_Obj_datatype(), FLA_Obj_length(), FLA_Part_1x2(), FLA_Part_2x2(), FLASH_Obj_create(), and FLASH_Obj_scalar_length().

Referenced by FLASH_QR_UT_inc_opt1().

00036 {
00037     FLA_Datatype datatype;
00038     FLA_Obj      ATL,  ATR,
00039                  ABL,  ABR;
00040     dim_t        b_flash;
00041     dim_t        b_flash_last;
00042     dim_t        n_blocks_mn;
00043     dim_t        m_U, n_U;
00044 
00045     // Acquire the datatype of the matrix to be factored.
00046     datatype = FLA_Obj_datatype( A );
00047 
00048     // Acquire the storage blocksize of the top-left element.
00049     FLA_Part_2x2( A,   &ATL, &ATR,
00050                        &ABL, &ABR,     1, 1, FLA_TL );
00051 
00052     b_flash = FLASH_Obj_scalar_length( ATL );
00053 
00054     // Get the number of storage blocks in the m dimension of A (which
00055     // should be the same as the number of storage blocks in the n
00056     // dimension since A should be square).
00057     n_blocks_mn = FLA_Obj_length( A );
00058 
00059     // Compute the scalar length and width of U.
00060     m_U = b_flash;
00061     n_U = n_blocks_mn * b_flash;
00062 
00063     // Create U with storage blocksize of b_flash.
00064     FLASH_Obj_create( datatype, m_U, n_U, 1, &b_flash, U );
00065 
00066     // The last, bottom-right-most diagonal block of A might be smaller
00067     // than the other diagonal blocks. Compute the size of this block.
00068     b_flash_last = FLASH_Obj_scalar_length( A ) % b_flash;
00069 
00070     // If the remainder is zero, then A does not need its last block
00071     // shrunk and thus it is ready as-is. However, if b_flash_last is
00072     // non-zero, then we must manually adjust the size of the last block of
00073     // U. Note that we are not freeing and re-allocating memory, just
00074     // changing the size of the view into the last block.
00075 
00076     if ( b_flash_last > 0 )
00077     {
00078         FLA_Obj  UL,    UR;
00079         FLA_Obj  URTL,  URTR,
00080                  URBL,  URBR;
00081         FLA_Obj* UR_p;
00082 
00083         // Repartition U so we can access the last block object.
00084         FLA_Part_1x2( *U,   &UL, &UR,    1, FLA_RIGHT );
00085 
00086         // Dereference the 1x1 object reference to get a pointer to
00087         // the actual block object in U.
00088         UR_p = FLASH_OBJ_PTR_AT( UR );
00089 
00090         // Repartition the last block object so that URTL is the
00091         // correct size.
00092         FLA_Part_2x2( *UR_p,    &URTL, &URTR,
00093                                 &URBL, &URBR,     b_flash_last,
00094                                                   b_flash_last, FLA_TL );
00095 
00096         // Overwrite the original object pointed to by UR_p with the
00097         // corrected object URTL.
00098         *UR_p = URTL;
00099     }
00100 
00101     return FLA_SUCCESS;
00102 }

FLA_Error FLA_QR_UT_inc_free_U ( FLA_Obj  U  ) 

References FLA_Obj_free(), FLA_Obj_free_task(), and FLASH_Queue_get_enabled().

00121 {
00122     if ( FLASH_Queue_get_enabled() )
00123     {
00124         // Enqueue task.
00125         ENQUEUE_FLASH_Obj_free( *FLASH_OBJ_PTR_AT( U ),
00126                                 NULL );
00127 
00128         // Manually free the top level of the hierarchy that was
00129         // created in FLA_QR_UT_inc_create_U().
00130         FLA_Obj_free( &U );
00131     }
00132     else
00133     {
00134         // Execute task immediately.
00135         FLA_Obj_free_task( *FLASH_OBJ_PTR_AT( U ), 
00136                            NULL );
00137 
00138         // Manually free the top level of the hierarchy that was
00139         // created in FLA_QR_UT_inc_create_U().
00140         //FLA_Obj_free( &U );
00141     }
00142 
00143     return FLA_SUCCESS;
00144 }

FLA_Error FLA_QR_UT_inc_free_U_panel ( FLA_Obj U  ) 

References FLASH_Obj_free().

Referenced by FLASH_QR_UT_inc_opt1().

00105 {
00106     FLASH_Obj_free( U );
00107 
00108     return FLA_SUCCESS;
00109 }

FLA_Error FLASH_QR_UT_inc ( FLA_Obj  A,
FLA_Obj  TW 
)

References FLASH_QR_UT_inc_opt1().

00036 {
00037   FLA_Error r_val;
00038 
00039   r_val = FLASH_QR_UT_inc_opt1( A, TW );
00040 
00041   return r_val;
00042 }

FLA_Error FLASH_QR_UT_inc_create_hier_matrices ( FLA_Obj  A_flat,
dim_t  depth,
dim_t b_flash,
dim_t  b_alg,
FLA_Obj A,
FLA_Obj TW 
)

References FLA_Abort(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_width(), FLA_Print_message(), FLASH_Obj_create_ext(), FLASH_Obj_create_hier_copy_of_flat(), and FLASH_QR_UT_inc_determine_alg_blocksize().

00036 {
00037     FLA_Datatype datatype;
00038     dim_t        m, n;
00039     
00040     // *** The current QR_UT_inc algorithm implemented assumes that
00041     // the matrix has a hierarchical depth of 1. We check for that here
00042     // because we anticipate that we'll use a more general algorithm in the
00043     // future, and we don't want to forget to remove the constraint. ***
00044     if ( depth != 1 )
00045     {
00046        FLA_Print_message( "FLASH_QR_UT_inc() currently only supports matrices of depth 1",
00047                           __FILE__, __LINE__ );
00048        FLA_Abort();
00049     }
00050 
00051     // Create hierarchical copy of matrix A_flat.
00052     FLASH_Obj_create_hier_copy_of_flat( A_flat, depth, b_flash, A );
00053 
00054     // Query the datatype of matrix A_flat.
00055     datatype = FLA_Obj_datatype( A_flat );
00056     
00057     // If the user passed in zero for b_alg, then we need to set the
00058     // algorithmic (inner) blocksize to a reasonable default value.
00059     if ( b_alg == 0 )
00060     {
00061         b_alg = FLASH_QR_UT_inc_determine_alg_blocksize( *A );
00062     }
00063 
00064     // Query the element (not scalar) dimensions of the new hierarchical
00065     // matrix. This is done so we can create TH with full blocks for the
00066     // bottom and right "edge cases" of A.
00067     m = FLA_Obj_length( *A );
00068     n = FLA_Obj_width ( *A );
00069 
00070     // Create hierarchical matrices T and W. T is lower triangular where
00071     // each block is b_alg-by-b_flash and W is strictly upper triangular
00072     // where each block is b_alg-by-b_flash. So we can create them
00073     // simultaneously as part of the same hierarchical matrix.
00074     FLASH_Obj_create_ext( datatype, m * b_alg, n * b_flash[0], 
00075                           depth, &b_alg, b_flash, 
00076                           TW );
00077        
00078     return FLA_SUCCESS;
00079 }

dim_t FLASH_QR_UT_inc_determine_alg_blocksize ( FLA_Obj  A  ) 

References FLA_Obj_length().

Referenced by FLASH_QR_UT_inc_create_hier_matrices().

00083 {
00084     dim_t b_alg;
00085     dim_t b_flash;
00086 
00087     // Acquire the storage blocksize.
00088     b_flash = FLA_Obj_length( *FLASH_OBJ_PTR_AT( A ) );
00089 
00090     // Scale the storage blocksize by a pre-defined scalar to arrive at a
00091     // reasonable algorithmic blocksize, but make sure it's at least 1.
00092     b_alg = max( b_flash * FLA_QR_INNER_TO_OUTER_B_RATIO, 1 );
00093 
00094     return b_alg;
00095 }

FLA_Error FLASH_QR_UT_inc_noopt ( FLA_Obj  A,
FLA_Obj  TW 
)

References FLA_Blocksize_set(), FLA_Check_error_level(), FLA_Part_2x2(), FLA_QR_UT_inc_blk_var1(), FLA_QR_UT_inc_check(), FLASH_Obj_scalar_length(), FLASH_Queue_begin(), and FLASH_Queue_end().

00043 {
00044   FLA_Error r_val;
00045   int       nb_alg;
00046   FLA_Obj   TWTL, WTR,
00047             TBL, TWBR;
00048 
00049   // Check parameters.
00050   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00051     FLA_QR_UT_inc_check( A, TW );
00052 
00053   // Inspect the length of a the top-left element of T to get the algorithmic
00054   // blocksize we'll use throughout the QR_UT_inc algorithm.
00055   FLA_Part_2x2( TW,   &TWTL, &WTR,
00056                       &TBL, &TWBR,     1, 1, FLA_TL );
00057   nb_alg = FLASH_Obj_scalar_length( TWTL );
00058 
00059   // Adjust the blocksizes of the leaf control tree nodes, which are invoked
00060   // by the individual QR_UT_inc tasks.
00061   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrut_cntl_leaf ),
00062                      nb_alg, nb_alg, nb_alg, nb_alg );
00063   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqut_cntl_leaf ),
00064                      nb_alg, nb_alg, nb_alg, nb_alg );
00065   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrutud_cntl_leaf ),
00066                      nb_alg, nb_alg, nb_alg, nb_alg );
00067   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqutud_cntl_leaf ),
00068                      nb_alg, nb_alg, nb_alg, nb_alg );
00069 
00070   // Begin a parallel region.
00071   FLASH_Queue_begin();
00072 
00073   // Invoke FLA_QR_UT_inc_blk_var1() with the standard control tree.
00074   r_val = FLA_QR_UT_inc_blk_var1( A, TW, flash_qrutinc_cntl );
00075 
00076   // End the parallel region.
00077   FLASH_Queue_end();
00078 
00079   return r_val;
00080 }

FLA_Error FLASH_QR_UT_inc_opt1 ( FLA_Obj  A,
FLA_Obj  TW 
)

References FLA_Blocksize_set(), FLA_Check_error_level(), FLA_Part_2x2(), FLA_QR_UT_inc_blk_var2(), FLA_QR_UT_inc_check(), FLA_QR_UT_inc_create_U_panel(), FLA_QR_UT_inc_free_U_panel(), FLASH_Obj_scalar_length(), FLASH_Queue_begin(), and FLASH_Queue_end().

Referenced by FLASH_QR_UT_inc().

00043 {
00044   FLA_Error r_val;
00045   int       nb_alg;
00046   FLA_Obj   TWTL, WTR,
00047             TBL, TWBR;
00048   FLA_Obj   U;
00049 
00050   // Check parameters.
00051   if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
00052     FLA_QR_UT_inc_check( A, TW );
00053 
00054   // Inspect the length of a the top-left element of T to get the algorithmic
00055   // blocksize we'll use throughout the QR_UT_inc algorithm.
00056   FLA_Part_2x2( TW,   &TWTL, &WTR,
00057                       &TBL, &TWBR,     1, 1, FLA_TL );
00058   nb_alg = FLASH_Obj_scalar_length( TWTL );
00059 
00060   // Adjust the blocksizes of the leaf control tree nodes, which are invoked
00061   // by the individual QR_UT_inc tasks.
00062   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrut_cntl_leaf ),
00063                      nb_alg, nb_alg, nb_alg, nb_alg );
00064   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqut_cntl_leaf ),
00065                      nb_alg, nb_alg, nb_alg, nb_alg );
00066   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_qrutud_cntl_leaf ),
00067                      nb_alg, nb_alg, nb_alg, nb_alg );
00068   FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqutud_cntl_leaf ),
00069                      nb_alg, nb_alg, nb_alg, nb_alg );
00070 
00071   // Create a temporary matrix to hold copies of all of the blocks along the
00072   // diagonal of A.
00073   FLA_QR_UT_inc_create_U_panel( A, &U );
00074 
00075   // Begin a parallel region.
00076   FLASH_Queue_begin();
00077 
00078   // Invoke FLA_QR_UT_inc_blk_var2() with the standard control tree.
00079   r_val = FLA_QR_UT_inc_blk_var2( A, TW, U, flash_qrutinc_cntl );
00080 
00081   // End the parallel region.
00082   FLASH_Queue_end();
00083 
00084   // Free the temporary matrix.
00085   FLA_QR_UT_inc_free_U_panel( &U );
00086 
00087   return r_val;
00088 }


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