1 /*
2 
3     Copyright (C) 2014, The University of Texas at Austin
4 
5     This file is part of libflame and is available under the 3-Clause
6     BSD license, which can be found in the LICENSE file at the top-level
7     directory, or at http://opensource.org/licenses/BSD-3-Clause
8 
9 */
10 
11 #include "FLAME.h"
12 
13 #ifdef FLA_ENABLE_NON_CRITICAL_CODE
14 
FLA_Trsm_llc_unb_var4(FLA_Diag diagA,FLA_Obj alpha,FLA_Obj A,FLA_Obj B)15 FLA_Error FLA_Trsm_llc_unb_var4( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
16 {
17   FLA_Obj BL,    BR,       B0,  b1,  B2;
18 
19   FLA_Scal_external( alpha, B );
20 
21   FLA_Part_1x2( B,    &BL,  &BR,      0, FLA_RIGHT );
22 
23   while ( FLA_Obj_width( BR ) < FLA_Obj_width( B ) ){
24 
25     FLA_Repart_1x2_to_1x3( BL,  /**/ BR,        &B0, &b1, /**/ &B2,
26                            1, FLA_LEFT );
27 
28     /*------------------------------------------------------------*/
29 
30     /* b1 = tril( A ) * b1; */
31     FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diagA, A, b1 );
32 
33     /*------------------------------------------------------------*/
34 
35     FLA_Cont_with_1x3_to_1x2( &BL,  /**/ &BR,        B0, /**/ b1, B2,
36                               FLA_RIGHT );
37 
38   }
39 
40   return FLA_SUCCESS;
41 }
42 
43 #endif
44