| 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_un_unb_var10( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C ) |
| 16 |
{ |
| 17 |
FLA_Obj AL, AR, A0, a1t, A2; |
| 18 |
|
| 19 |
FLA_Obj BL, BR, B0, b1t, B2; |
| 20 |
|
| 21 |
FLA_Scalr_external( FLA_UPPER_TRIANGULAR, beta, C ); |
| 22 |
|
| 23 |
FLA_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT ); |
| 24 |
|
| 25 |
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT ); |
| 26 |
|
| 27 |
while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){ |
| 28 |
|
| 29 |
|
| 30 |
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &a1t, /**/ &A2, |
| 31 |
1, FLA_LEFT ); |
| 32 |
|
| 33 |
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &b1t, /**/ &B2, |
| 34 |
1, FLA_LEFT ); |
| 35 |
|
| 36 |
/*------------------------------------------------------------*/ |
| 37 |
|
| 38 |
/* C = C + a1t * b1t' + b1t * a1t' */ |
| 39 |
FLA_Syr2_external( FLA_UPPER_TRIANGULAR, alpha, a1t, b1t, C ); |
| 40 |
|
| 41 |
/*------------------------------------------------------------*/ |
| 42 |
|
| 43 |
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ a1t, A2, |
| 44 |
FLA_RIGHT ); |
| 45 |
|
| 46 |
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ b1t, B2, |
| 47 |
FLA_RIGHT ); |
| 48 |
|
| 49 |
} |
| 50 |
|
| 51 |
return FLA_SUCCESS; |
| 52 |
} |
| 53 |
|
| 54 |
#endif |