| 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 |
|
| 15 |
FLA_Error FLA_Syr2k_ln_unb_var8( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C ) |
| 16 |
{ |
| 17 |
FLA_Obj AT, A0, |
| 18 |
AB, a1t, |
| 19 |
A2; |
| 20 |
|
| 21 |
FLA_Obj BT, B0, |
| 22 |
BB, b1t, |
| 23 |
B2; |
| 24 |
|
| 25 |
FLA_Obj CTL, CTR, C00, c01, C02, |
| 26 |
CBL, CBR, c10t, gamma11, c12t, |
| 27 |
C20, c21, C22; |
| 28 |
|
| 29 |
|
| 30 |
FLA_Scalr_external( FLA_LOWER_TRIANGULAR, beta, C ); |
| 31 |
|
| 32 |
FLA_Part_2x1( A, &AT, |
| 33 |
&AB, 0, FLA_BOTTOM ); |
| 34 |
|
| 35 |
FLA_Part_2x1( B, &BT, |
| 36 |
&BB, 0, FLA_BOTTOM ); |
| 37 |
|
| 38 |
FLA_Part_2x2( C, &CTL, &CTR, |
| 39 |
&CBL, &CBR, 0, 0, FLA_BR ); |
| 40 |
|
| 41 |
while ( FLA_Obj_length( AB ) < FLA_Obj_length( A ) ){ |
| 42 |
|
| 43 |
|
| 44 |
FLA_Repart_2x1_to_3x1( AT, &A0, |
| 45 |
&a1t, |
| 46 |
/* ** */ /* ** */ |
| 47 |
AB, &A2, 1, FLA_TOP ); |
| 48 |
|
| 49 |
FLA_Repart_2x1_to_3x1( BT, &B0, |
| 50 |
&b1t, |
| 51 |
/* ** */ /* ** */ |
| 52 |
BB, &B2, 1, FLA_TOP ); |
| 53 |
|
| 54 |
FLA_Repart_2x2_to_3x3( CTL, /**/ CTR, &C00, &c01, /**/ &C02, |
| 55 |
&c10t, &gamma11, /**/ &c12t, |
| 56 |
/* ************* */ /* ************************** */ |
| 57 |
CBL, /**/ CBR, &C20, &c21, /**/ &C22, |
| 58 |
1, 1, FLA_TL ); |
| 59 |
|
| 60 |
/*------------------------------------------------------------*/ |
| 61 |
|
| 62 |
/* c10t = c10t + a1t * B0' */ |
| 63 |
FLA_Gemv_external( FLA_NO_TRANSPOSE, alpha, B0, a1t, FLA_ONE, c10t ); |
| 64 |
|
| 65 |
/* c10t = c10t + b1t * A0' */ |
| 66 |
FLA_Gemv_external( FLA_NO_TRANSPOSE, alpha, A0, b1t, FLA_ONE, c10t ); |
| 67 |
|
| 68 |
/* gamma11 = gamma11 + a1t * b1t' + b1t * a1t' */ |
| 69 |
FLA_Dot2s_external( alpha, a1t, b1t, FLA_ONE, gamma11 ); |
| 70 |
|
| 71 |
/*------------------------------------------------------------*/ |
| 72 |
|
| 73 |
FLA_Cont_with_3x1_to_2x1( &AT, A0, |
| 74 |
/* ** */ /* ** */ |
| 75 |
a1t, |
| 76 |
&AB, A2, FLA_BOTTOM ); |
| 77 |
|
| 78 |
FLA_Cont_with_3x1_to_2x1( &BT, B0, |
| 79 |
/* ** */ /* ** */ |
| 80 |
b1t, |
| 81 |
&BB, B2, FLA_BOTTOM ); |
| 82 |
|
| 83 |
FLA_Cont_with_3x3_to_2x2( &CTL, /**/ &CTR, C00, /**/ c01, C02, |
| 84 |
/* ************** */ /* ************************ */ |
| 85 |
c10t, /**/ gamma11, c12t, |
| 86 |
&CBL, /**/ &CBR, C20, /**/ c21, C22, |
| 87 |
FLA_BR ); |
| 88 |
|
| 89 |
} |
| 90 |
|
| 91 |
return FLA_SUCCESS; |
| 92 |
} |
| 93 |
|
| 94 |
#endif |